Author Topic: Build log cannot find file  (Read 2448 times)

Offline Archy

  • Single posting newcomer
  • *
  • Posts: 4
Build log cannot find file
« on: January 23, 2017, 03:34:17 pm »
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









Offline Archy

  • Single posting newcomer
  • *
  • Posts: 4
Re: Build log cannot find file
« Reply #1 on: January 23, 2017, 03:35:17 pm »
some more pictures of the settings

Offline Archy

  • Single posting newcomer
  • *
  • Posts: 4
Re: Build log cannot find file
« Reply #2 on: January 23, 2017, 03:35:54 pm »
more

Offline Archy

  • Single posting newcomer
  • *
  • Posts: 4
Re: Build log cannot find file
« Reply #3 on: January 23, 2017, 03:37:16 pm »
last but not least

Online stahta01

  • Lives here!
  • ****
  • Posts: 6800
    • My Best Post
Re: Build log cannot find file
« Reply #4 on: January 23, 2017, 04:16:34 pm »
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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online stahta01

  • Lives here!
  • ****
  • Posts: 6800
    • My Best Post
Re: Build log cannot find file
« Reply #5 on: January 23, 2017, 04:19:33 pm »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2626
Re: Build log cannot find file
« Reply #6 on: January 23, 2017, 07:43:34 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

Offline sodev

  • Regular
  • ***
  • Posts: 365
Re: Build log cannot find file
« Reply #7 on: January 23, 2017, 08:47:23 pm »
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.