News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

"No such file" error due to blank setting

Started by iainc, April 12, 2010, 06:15:23 PM

Previous topic - Next topic

iainc

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!


-------------- 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!

stahta01

Quote from: iainc on April 12, 2010, 06:15:23 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.
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]

iainc

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

iainc

Quoteit 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:

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.