Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: iainc on April 12, 2010, 06:15:23 pm

Title: "No such file" error due to blank setting
Post by: iainc on April 12, 2010, 06:15:23 pm
I'm having trouble getting a project with multiple files to compile - I've used C::B with a single, monolithic source file in the past, but I wanted to try multiple source files.  I think that I've inadvertently set a compiler/linker option but left a blank field for it!

Code
-------------- Build: Debug in dbc-parse ---------------

mingw32-g++.exe -Wall -fexceptions  -g  -Wall   -IC:\boostlibs_1-42\include\boost-1_42 -IC:\boostlibs_1-42\include\boost-1_42  -c C:\code-blocks\dbc-parse\progParams.cpp -o obj\Debug\progParams.o
mingw32-g++.exe -Wall -fexceptions  -g  -Wall   -IC:\boostlibs_1-42\include\boost-1_42 -IC:\boostlibs_1-42\include\boost-1_42  -c C:\code-blocks\dbc-parse\errorHandler.cpp -o obj\Debug\errorHandler.o
mingw32-g++.exe -Wall -fexceptions  -g  -Wall   -IC:\boostlibs_1-42\include\boost-1_42 -IC:\boostlibs_1-42\include\boost-1_42  -c C:\code-blocks\dbc-parse\dataFile.cpp -o obj\Debug\dataFile.o
mingw32-g++.exe -Wall -fexceptions  -g  -Wall   -IC:\boostlibs_1-42\include\boost-1_42 -IC:\boostlibs_1-42\include\boost-1_42  -c C:\code-blocks\dbc-parse\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -L  -o bin\Debug\dbc-parse.exe obj\Debug\progParams.o obj\Debug\errorHandler.o obj\Debug\dataFile.o obj\Debug\main.o   -Wl,--enable-auto-import  ..\..\boostlibs_1-42\lib\libboost_filesystem-mgw44-mt.lib ..\..\boostlibs_1-42\lib\libboost_program_options-mgw44-mt.lib ..\..\boostlibs_1-42\lib\libboost_system-mgw44-mt.lib
mingw32-g++.exe: bin\Debug\dbc-parse.exe: No such file or directory

I'm pretty sure that the problem is the additional "-L" in the final command - I've checked through my settings but I just can't seem to find one with a blank entry that may be causing this!  Any suggestions for where I should be looking will be gratefully received!
Title: Re: "No such file" error due to blank setting
Post by: stahta01 on April 12, 2010, 06:25:58 pm
I'm pretty sure that the problem is the additional "-L" in the final command - I've checked through my settings but I just can't seem to find one with a blank entry that may be causing this!  Any suggestions for where I should be looking will be gratefully received!

Check the compiler and linker extra setting; and verify the linker search directory does not have a entry of just spaces.

Tim S.
Title: Re: "No such file" error due to blank setting
Post by: iainc on April 12, 2010, 08:06:35 pm
Thanks,

I tried adding and deleting to the various settings to try and establish where the problem lay, but to no avail.

I've solved the issue in the end by deleting my project configuration file and recreating the project - it now builds just fine!

Iain
Title: Re: "No such file" error due to blank setting
Post by: iainc on April 13, 2010, 01:57:52 pm
Quote
it now builds just fine

And for the sake of completeness, I found the source of the error in the end just now as I inadvertently re-introduced it!

Under: project > build options > search directories > linker
I had $(#boost.libs) instead of $(#boost.lib)

By fixing this I now get the expected:

Code
g++.exe -LC:\boostlibs_1-42\lib  -o bin\Debug\dbc-parse.exe obj\Debug\errorHandler.o obj\Debug\main.o obj\Debug\progParams.o obj\Debug\dataFile.o   -Wl,--enable-auto-import  ..\..\boostlibs_1-42\lib\libboost_filesystem-mgw44-mt.lib ..\..\boostlibs_1-42\lib\libboost_program_options-mgw44-mt.lib ..\..\boostlibs_1-42\lib\libboost_system-mgw44-mt.lib 

Thanks again for the pointer of where to look.