User forums > Using Code::Blocks

How to tell Code::Blocks where wxWidgets is?

<< < (3/4) > >>

BlueHazzard:
i do not understand your last answer... But in general:
Backticks

--- Code: ---`this is executed`
--- End code ---
are executed by codeblocks and the stdout output of this program replaces the text within the backticks....

For example

--- Code: ---`wx-config --cflags`
--- End code ---
will be replaced by

--- Code: ----I/usr/local/lib/wx/include/gtk2-unicode-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread

--- End code ---
on my machine....

"Normal" ticks

--- Code: ---'this is passed trough the command line'
--- End code ---
will expand to

--- Code: ---'this is passed trough the command line'
--- End code ---

In your last build log are still the normal ticks for the compiler flags...
If you have changed them and still get errors post the new build log...

spflanze:
When these flags are in effect:

--- Code: ---`/usr/local/bin/wx-config --cxxflags`
`/usr/local/bin/wx-config --libs`

--- End code ---
The build log is:

--- Quote ----------------- Clean: Debug in TIA Designer (compiler: GNU GCC Compiler)---------------

Cleaned "TIA Designer - Debug"

-------------- Build: Debug in TIA Designer (compiler: GNU GCC Compiler)---------------

g++ -Wall -I/usr/local/lib/wx/include/gtk2-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread -I/usr/local/lib/wx/include/gtk2-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread -g '/usr/local/bin/wx-config --cxxflags' 'wx-config --cxxflags' -I/usr/local/lib/wx/include/gtk2-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread -g -I../Libraries/cminpack-1.3.6 -Iinclude -c "/home/me/Engineering Software/Libraries/cminpack-1.3.6/cpp/dpmpar.cpp" -o obj/Debug/Libraries/cminpack-1.3.6/cpp/dpmpar.o
/usr/local/bin/wx-config: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

--- End quote ---

So now I get the same error whether  ' or `is used. This time I was closing and reopening Code::Blocks after this was changed and before the compile attempt.

When these flags are in effect:

--- Code: ---'/usr/local/bin/wx-config --cxxflags'
'/usr/local/bin/wx-config --libs'

--- End code ---
The build log is:

--- Quote ----------------- Clean: Debug in TIA Designer (compiler: GNU GCC Compiler)---------------

Cleaned "TIA Designer - Debug"

-------------- Build: Debug in TIA Designer (compiler: GNU GCC Compiler)---------------

g++ -Wall -I/usr/local/lib/wx/include/gtk2-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread '/usr/local/bin/wx-config --cxxflags' -g 'wx-config --cxxflags' '/usr/local/bin/wx-config --cxxflags' -g -I/usr/local/lib/wx/include/gtk2-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread -I../Libraries/cminpack-1.3.6 -Iinclude -c "/home/me/Engineering Software/Libraries/cminpack-1.3.6/cpp/dpmpar.cpp" -o obj/Debug/Libraries/cminpack-1.3.6/cpp/dpmpar.o
/usr/local/bin/wx-config: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

--- End quote ---
So now I get the same error. This time I was closing and reopening Code::Blocks after the change and before the compile attempt.

For the wx global variable in Settings => Global I have as base:

--- Quote ---/home/me/Packages/wxWidgets-3.0.3

--- End quote ---
This path does not exist on my drive. The path:

--- Quote ---/usr/include/wx-3.0-unofficial

--- End quote ---
does.  Is this what I should set wx to?
I believe this path was put there by the commands I used to do the install instrucitons at: http://codelite.org/LiteEditor/WxWidgets303Binaries





oBFusCATed:
1. When using wx-config you don't care for any other settings or paths
2. Please inspect all project settings and global settings and remove the inappropriate wx-config values. From your log it is pretty clear that you've entered different and incorrect (using '' instead of ``) in at least two places! I guess there are more. And make sure you don't mix different wx-configs. You'll suffer a lot if you do it and it will be really hard to debug!

spflanze:
The two places you see it, I do not have control over. The opening and closing " you see after -Iinclude -c enclose a path to a file that was brought in to the project by right clicking the project in the Manager's Projects tab and selecting "Add files".

I have eliminated the wx global variable.

I still get the same error. I have attached the latest project file.

oBFusCATed:
This is a simple text search in the file you've sent:

--- Code: ---$ grep wx-config TIA\ Designer.cbp
<Add option="&apos;/usr/local/bin/wx-config --cxxflags&apos;" />
<Add option="&apos;/usr/local/bin/wx-config --libs&apos;" />
<Add option="&apos;/usr/local/bin/wx-config --cxxflags&apos;" />
<Add option="&apos;/usr/local/bin/wx-config --libs&apos;" />
<Add option="`/usr/local/bin/wx-config --cxxflags`" />
<Add option="`/usr/local/bin/wx-config --libs`" />

--- End code ---
So you have 4 time the incorrect version of the wx-config.

Go inspect the configurations for all targets and the project options. On the left side of the dialog Project -> Build options you should see a tree control. This control is used to select the build targets or project options. Please inspect and fix them all.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version