When I try to build a C++ project I get the error message in the title line. I am trying to help my son move his development from a unix cluster to his laptop. He is running Windows XP Pro and has installed the Eclipse IDE for C/C++ Developers. The version is Helios Repease 20100617-1415. He also has installed cygwin 1.7.7. The problem is (I think) related to ticpp. The error message from the compiler is

make: ***target pattern contains no '%'. Stop.

When I click on the error message it takes me to the following section of subdir.mk

# Each subdirectory must supply rules for building sources it contributes
ticpp-read-only/ticpp.o: D:/FRODAN/frodaN_home/ticpp-read-only/ticpp.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cygwin C++ Compiler'
g++ -IE:/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include -I"D:\FRODAN\frodaN_home\frodaN" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"
@echo 'Finished building: $<'
@echo ' '

Can anyone tell me what this error message means and what I can do to resolve it? I have done most of my development in (many years of coding) with a simple text editor. Any projects developed under a GUI were in Visual Studio so I know very little about eclipse.

Recommended Answers

All 6 Replies

I'd speculate that $@ (your target) is a Windows-style path with the "<drive>:\" pattern. The colon from Windows paths can cause this error because suddenly you're looking at an unexpected separator in the pattern rather than a complete target.

What does your make invocation on the command line look like?

I'd speculate that $@ (your target) is a Windows-style path with the "<drive>:\" pattern. The colon from Windows paths can cause this error because suddenly you're looking at an unexpected separator in the pattern rather than a complete target.

What does your make invocation on the command line look like?

I don't know what you are asking. I do not "invoke" the compiler on the command line. I use "Project -> Build All" from the Eclipse menu. There are literally hundreds of options and I do not know where to look.

Unfortunately, I'm not familiar enough with Eclipse to walk you through the build settings. Perhaps someone else will be able to pick up the thread from here.

The standard recommendation is to replace all the windows style paths with cygwin paths, such as /cygdrive/d/FRODAN/whatever. make dropped support for windows style paths since at least 2006.

The standard recommendation is to replace all the windows style paths with cygwin paths, such as /cygdrive/d/FRODAN/whatever. make dropped support for windows style paths since at least 2006.

Well then, that's a problem because I did not enter any paths by typing them in. In all cases I selected folders from within dialogs presented by Eclipse. God only knows where all of that information is stored. If Eclipse wants to store the paths in a form that is not compatible with the compiler then that just plain seems wrong.

Regarding Eclipse, I am as illiterate as you are. However, I know for sure that Eclipse works very well with cygwin. I do recommend to either
- redo the whole import again, making sure that at each step the cygwin compatible option is selected, OR
- find all makefiles and their fragments of the project, and replace the paths cygwin style anywhere they are spelled out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.