User forums > General (but related to Code::Blocks)
backtick execution broken
BlueHazzard:
Hello,
i don't know if only i have this bug, but backtick execution isn't working for me in the actual nightly build (8484) on Windows 7.
I use the backtick execution for wx-config. Under Build Options -> Compiler Settings -> Other options i have written
--- Code: ---`wx-config --cflags --unicode=yes --wxcfg=gcc_dll\mswud`
-posix
--- End code ---
but the wx-config is never called as shown in the build log:
--- Code: ---mingw32-g++.exe -std=c++0x -Wall -posix -std=gnu++0x -D__GNUWIN32__ -D__WXMSW__ -DUNICODE -g -D_GLIBCXX_DEBUG -Iinclude -Iutils\rapidxml-1.13 -I..\boost_1_50_0 -Iutils\libusbx\include\libusbx-1.0 -I XXXX -c XXXX -o XXXX
--- End code ---
if i call wx-config in the cmd:
--- Code: ---wx-config --cflags --unicode=yes --wxcfg=gcc_dll\mswud
-mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -Ic:\wxWidgets-2.
9.4\lib\gcc_dll\mswud -Ic:\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-p
rivacy -pipe -fmessage-length=0 -posix
--- End code ---
So is this my fault, or is it a bug?
stahta01:
Rumor says the backticks are only used on CB start-up.
1. save project
2. close CB
3. open CB
4. load project
Did it work?
If yes, it supports the rumor.
If no, likely a bug has been added
Tim S.
EDIT: The backslash (\) might be the cause; you might try a forward slash or two backward slashes.
oBFusCATed:
--- Quote from: stahta01 on November 08, 2012, 10:58:21 pm ---Rumor says the backticks are only used on CB start-up.
--- End quote ---
This is not correct. What C::B does is to cache them, so if the backtick expression has returned garbage the first time it is executed,
then its value will be garbage until C::B is restarted.
BlueHazzard:
thanks for the reply.
I tried to replace the backslash with a forward slash, and restart C::B but still not working...
OT: is this caching a good idea? what if the program i'm calling in backticks changes its output?
Jenna:
--- Quote from: BlueHazzard on November 08, 2012, 11:23:28 pm ---thanks for the reply.
I tried to replace the backslash with a forward slash, and restart C::B but still not working...
OT: is this caching a good idea? what if the program i'm calling in backticks changes its output?
--- End quote ---
Then you need to restart the process.
Think of a large wxWidgets project like C::B.
Without caching we would need to call wx-config for (nearly) each compiled filed and that would surely slow down compiling a lot.
Navigation
[0] Message Index
[#] Next page
Go to full version