User forums > Using Code::Blocks

How to tell Code::Blocks where wxWidgets is?

(1/4) > >>

spflanze:
I installed wxWidgets 3.0.3 using the command sequence for my Ubuntu 16.04 OS (xenial) using these instructions:
http://codelite.org/LiteEditor/WxWidgets303Binaries
I am using wxWidgets 3.0.3 because that was the latest and greatest when the project was started on a Windows 7 Machine. On that Windows 7 machine I tried to upgrade to wxWidgets 3.0.4 and got a lot of errors I did not have time to deal with. Now attempting to migrate it to my Ubuntu machine using  Code::Blocks 17.12 with wxWidgets 3.0.3

Now in Ubuntu Code::Blocks  does not know where wxWidgets is. All wxWigets classes got undefined errors. So I followed the instructions at:
https://wiki.wxwidgets.org/Wx-Config
As I understand them. To do this I went to Project => Build Options => Compiler Flags .  In this tab I right clicked and selected "New Flag". I selected the General Category. In the Name field I entered: "wxWidgets". In the Compiler flags field I entered `wx-config --cxxflags`. And in the Linker flags field I entered: `wx-config --libs`

When attempted to compile I got the error:

--- Quote ---wx-config  No such file or directory
--- End quote ---
So I executed this command on and got this respoonse:

--- Code: ---which wx-config
/usr/local/bin/wx-config

--- End code ---
And then put the path in the flags such that I have now for those two flags:

--- Code: ---Compiler flags: `/usr/local/bin/wx-config --cxxflags`
Linker Flags: `/usr/local/bin/wx-config --libs`

--- End code ---

And got the same error. Then I tried exchanging ` for ' so that now I have:

--- Code: ---Compiler flags: '/usr/local/bin/wx-config --cxxflags'
Linker Flags: '/usr/local/bin/wx-config --libs'

--- End code ---

And I got the compile error:

--- Quote ---error ld returned 1 exit status
--- End quote ---
I do not know where to go with this from here. Do I have the wx-config flags entered correctly? If they are what is to be done about the "ld returned 1" error?

oBFusCATed:
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)

spflanze:
That link is broken due to a missing closing ) character. I got to the page you intended though.

That error message was from the "Build messages" tab. From the link you gave me I know to look in the "Build log" tab. The error I see there is:

--- Quote ---/usr/local/bin/wx-config: file not recognized: File format not recognized
--- End quote ---
Why is this file format not recognized?

oBFusCATed:
If you post the full build we might be able to tell you.
Most probably you're not using the correct quotation character (backtick, ` `).

spflanze:
The project files can be downloaded from: http://www.mediafire.com/file/4mryj4428z2nf11/TIA_Designer_2018-08-03_for_forum.zip/file .

In the included cbp file I changed the apostrophe back to the back tick.

Your help is much appreciated.

Navigation

[0] Message Index

[#] Next page

Go to full version