0

I have a really quick question. But it does bother me a lot.

I am using Linux eclipse IDE. And my program was built without any problems when using debug method. However, when I changed it to release method, I got an error like:

make:***[my_program_name]error1

This is what I get by using make clean && make -n in debug and release file:

Debug:

rm -rf  ./src/solution3.o ./src/tttgame.o  ./src/solution3.d ./src/tttgame.d  solution3

echo 'Building file: ../src/solution3.cpp'
echo 'Invoking: Cross G++ Compiler'
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/solution3.d" -MT"src/solution3.d" -o "src/solution3.o" "../src/solution3.cpp"
echo 'Finished building: ../src/solution3.cpp'
echo ' '
echo 'Building file: ../src/tttgame.cpp'
echo 'Invoking: Cross G++ Compiler'
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/tttgame.d" -MT"src/tttgame.d" -o "src/tttgame.o" "../src/tttgame.cpp"
echo 'Finished building: ../src/tttgame.cpp'
echo ' '
echo 'Building target: solution3'
echo 'Invoking: Cross G++ Linker'
g++ -L/usr/include -o "solution3"  ./src/solution3.o ./src/tttgame.o   -lboost_filesystem -lboost_system
echo 'Finished building target: solution3'
echo ' '

Release:

rm -rf  ./src/solution3.o ./src/tttgame.o  ./src/solution3.d ./src/tttgame.d  solution3

echo 'Building file: ../src/solution3.cpp'
echo 'Invoking: Cross G++ Compiler'
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/solution3.d" -MT"src/solution3.d" -o "src/solution3.o" "../src/solution3.cpp"
echo 'Finished building: ../src/solution3.cpp'
echo ' '
echo 'Building file: ../src/tttgame.cpp'
echo 'Invoking: Cross G++ Compiler'
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/tttgame.d" -MT"src/tttgame.d" -o "src/tttgame.o" "../src/tttgame.cpp"
echo 'Finished building: ../src/tttgame.cpp'
echo ' '
echo 'Building target: solution3'
echo 'Invoking: Cross G++ Linker'
g++  -o "solution3"  ./src/solution3.o ./src/tttgame.o   
echo 'Finished building target: solution3'
echo ' '

Can anyone give a hint what I might do wrong here?

Thanks!

yxw
  • 133
  • 1
  • 8
  • 1
    The actual error you are running into is *above* that line. Please include the full error output. – Etan Reisner Jul 15 '15 at 13:54
  • Look at the most useful answer: http://stackoverflow.com/a/8047488/184968. In your makefile there is a program that finishes with error. Just find it. –  Jul 15 '15 at 14:00
  • Hi, thank you for your answers. However I only use IDE and don't know much about makefile. How can I get more specific information about this error? make***[solution]error1 is the only error message given in the IDE. – yxw Jul 15 '15 at 14:11
  • *What* IDE? There are many. – Drew Dormann Jul 15 '15 at 14:12
  • @Drew Dormann, I think It is Eclipse CDT –  Jul 15 '15 at 14:19
  • Yes, it is eclipse @DrewDormann – yxw Jul 15 '15 at 14:20
  • @Drew Dormann, I pointed to a wrong answer, the question should be reopened. –  Jul 15 '15 at 14:22
  • @yxw, there are two files in your project: ./Release/makefile and ./Debug/makefile. They are in your project. By default they are here: ~/workspace/. So first change in ./Debug and run make clean && make -n. Next change in ./Release and do make clean && make -n. You will see commands that must be executed in each case. This will hint you in fixing the problem. –  Jul 15 '15 at 14:33
  • @yxw, there is a simpler way what commands are executed. Set these flag: `-n` in options for your building project to see what commands are executed. It might be clear what command fails –  Jul 15 '15 at 14:48
  • @skwllsp, thank you so much. I tried your first method and put what I got in the original question. – yxw Jul 15 '15 at 15:30
  • @skwllsp, i can see some difference between these two. It seems like the makefile in the debug linked to boost library while release does not. Is this the problem? If so, how to tackle it? – yxw Jul 15 '15 at 15:33
  • @yxw, It is possible. there are settings in Project Properties "C/C++ Build/Setting/GCC Linker". Check them if they are equal between two configuration. There might be "-lboost_filesystem -lboost_system" there. –  Jul 15 '15 at 15:43

0 Answers0