News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Build log cannot find file

Started by Archy, January 23, 2017, 03:34:17 PM

Previous topic - Next topic

Archy

Hello everyone,

I have just installed Code Blocks for Windows7 (64bit)and wrote a small program to test if it works.
After building the Build log says:

g++.exe -LC:\MinGW\lib -LC:\MinGW\Boost\lib -o bin\Debug\Projekt1.exe obj\Debug\main.o   -lboost_system-mgw-mt -lboost_filesystem-mgw-mt
C:/MinGW/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lboost_system-mgw-mt
C:/MinGW/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lboost_filesystem-mgw-mt
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
3 error(s), 0 warning(s) (0 minute(s), 0 second(s))


The build message says:

---Build: Debug in Projekt1 (compiler: GNU GCC Compiler) ---
ld.exe cannot find -lboost_system-mgw-mt
ld.exe cannot find -lboost_filesystem-mgw-mt
error: ld returned 1 exit status

--Build failed: 3 errors, 0 warnings, 0 minutes, 0 seconds


I added some pictures with changes I made in the settings. Can anyone help me to fix this error, please?


Kind regards,

Archy









Archy

some more pictures of the settings

Archy


Archy


stahta01

Post the build log in Code Tags. http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Do you have the Library on your Computer?
Did you tell the Compiler where to find it?

Tim S.

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

BlueHazzard

Quote from: Archy on January 23, 2017, 03:34:17 PM
g++.exe -LC:\MinGW\lib -LC:\MinGW\Boost\lib -o bin\Debug\Projekt1.exe obj\Debug\main.o   -lboost_system-mgw-mt -lboost_filesystem-mgw-mt
C:/MinGW/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lboost_system-mgw-mt
C:/MinGW/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lboost_filesystem-mgw-mt
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
3 error(s), 0 warning(s) (0 minute(s), 0 second(s))


The build message says:

You are clearly missing the linker library path...
You have to add the path to the boost libraries under Project->Build options->Search directories->Linker

greetings

sodev

And most probably the library names are wrong as well. There are three different options regarding the naming of the libraries and your names seem to match none of these.