User forums > Help
BUG: $exe_output macro not quoted with "
(1/1)
fabrizio.benedetti:
I have errors in linking executable files. Logging the command line I see C::B is launching this:
--- Code: ---mingw32-g++.exe -LS:\wxWidgets2.8\lib\gcc_lib -o O:\Projects\InterfaceBuilder\CodeBlocks\Debug Win32 (MinGW)\InterfaceBuilder.exe [etcetcetc]
--- End code ---
Obviously, the path after -o has to be quoted. As a quick fix, I added quotes around $exe_output in the Advanced compiler options for the "Link object files to executable" command (I think the command "Link object files to console executable" is affected too).
I should add that in my case the output file name comes from a further parsing of macros - precisely, this is what is written in the project options:
--- Code: ---$(#OutPath)\Projects\InterfaceBuilder\CodeBlocks\$(TARGET_NAME)\InterfaceBuilder.exe
--- End code ---
Maybe QuoteIfNeeded() runs before the macros expansion?
Jenna:
Which version of C::B do you use ?
I just tested it on debian with the target "Debug (Linux)", "Output filename" set to "bin/$(TARGET_NAME)/test" and "Objects output dir" set to "obj/$(TARGET_NAME)/".
Here's my build log:
--- Code: ----------------- Build: Debug (Linux) in test ---------------
g++ -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXGTK__ -pthread -Wall -g -c /tmp/test/testApp.cpp -o "obj/Debug (Linux)/testApp.o"
g++ -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXGTK__ -pthread -Wall -g -c /tmp/test/testMain.cpp -o "obj/Debug (Linux)/testMain.o"
g++ -o "bin/Debug (Linux)/test" "obj/Debug (Linux)/testApp.o" "obj/Debug (Linux)/testMain.o" -pthread -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings
--- End code ---
fabrizio.benedetti:
I use an SVN build on WinXP SP2; this morning I updated my working copy at revision 5193 and nothing changed on the $exe_output quoting subject.
I removed all the macros from the executable output name in the project properties and everything runs fine (with spaces in the exe path and without quotes in the compiler definition command). After replacing the parts with spaces in the exe path with the $(TARGET_NAME) macro, the issue is back.
I couldn't trace the issue in debugging - I watched the creation of m_Output in compilercommandgenerator.cpp(333) and (443) but couldn't get to anything :?
Navigation
[0] Message Index
Go to full version