User forums > Using Code::Blocks

SOLVED wxMathPlot compiling on Linux with Code::Blocks

<< < (2/3) > >>

Pecan:

--- Quote from: tiwag on October 18, 2006, 04:02:23 pm ---i guess, your problem is, that wx-config isn't installed on your linux computer,
or you don't have it in your path


--- Quote ----------------- Build: Debug in TestPlot ---------------
g++ -L/usr/lib  -o bin/Debug/TestPlot obj/Debug/mathplot.o obj/Debug/mp1.o  `wx-config --libs` 

--- End quote ---

`wx-config --libs` should expand to the wx libraries

the erros are coming, because g++ can't find the necessary libraries

brgds, tiwag

--- End quote ---

Most windows systems do not have wx-config. It's a linux thingie.
However, you can go to your linux machine and start a shell, then type

"wx-config --cflags" (without quotes) to see the compile flags needed,
and
"wx-config --libs" (without quotes) to see the libraries needed.

put those in the build options for your project. You may need to specify the windows paths for those libs  (as opposed to the linux paths)


For Example:

.


tiwag:

--- Quote from: eranif on October 18, 2006, 05:10:59 pm ---1. try to replace in your makefile, `wx-config --libs` with $(shell wx-config --libs), I saw some versions of makefiles that do not expand command line properly and needed this 'shell' command to help them out.

--- End quote ---
he is using the codeblocks project file to build (see download link)

i could build his project fine, just some modifications to the mathplot lib were necessary,
because i build and link it statically, and it was setup for building a shared library.
therefore i had only to
#undef WXDLLEXPORT
#define WXDLLEXPORT
in mathplot.h

but the project setup is ok !

and you are right, if wx-config wouldn't exist, he would have got errors during compiling.
strange...

takeshimiya:
Just clearing some misconceptions:


--- Quote from: eranif on October 18, 2006, 05:10:59 pm ---1. try to replace in your makefile, `wx-config --libs` with $(shell wx-config --libs), I saw some versions of makefiles that do not expand command line properly and needed this 'shell' command to help them out.

--- End quote ---
the $(shell command) variant is for shells that doesn't support backticks, just like cmd.exe / command.com in Windows.


--- Quote from: eranif on October 18, 2006, 05:10:59 pm ---2. If I am not mistaken, wx-config accepts another parameters after the '--libs' flags, for example: "--debug=yes --unicode=no". but I can be wrong on this one and it has default parameters ( I dont have my Linux box infront of me, so cant really say)

--- End quote ---
Yes those flags exists both in Windows and Linux versions, however most of the time they're not necessary unless you have multiple configurations.


--- Quote from: Pecan on October 18, 2006, 05:31:01 pm ---Most windows systems do not have wx-config. It's a linux thingie.

--- End quote ---
Not really, http://wxconfig.googlepages.com
Coming soon as option for wxWidgets wizard, wxSmith wizard and C::B Plugin wizard (indeed I've already made them, just waiting for patch approval :) ).

arwen:
In my linux box (fedora core 5) wx-config is installed and I can compile in C:B the
project created with the wxWidgetApplication template without problem.

 

--- Quote ---
tiwag wrote

i could build his project fine, just some modifications to the mathplot lib were necessary,
because i build and link it statically, and it was setup for building a shared library.
therefore i had only to
#undef WXDLLEXPORT
#define WXDLLEXPORT
in mathplot.h

--- End quote ---

How I must modify mathplot.h to compile .

Thanks to all

tiwag:

--- Quote from: Takeshi Miya on October 18, 2006, 05:47:36 pm ---
--- Quote from: Pecan on October 18, 2006, 05:31:01 pm ---Most windows systems do not have wx-config. It's a linux thingie.

--- End quote ---
Not really, http://wxconfig.googlepages.com
Coming soon as option for wxWidgets wizard, wxSmith wizard and C::B Plugin wizard ...
--- End quote ---

i used your wx-config-win too and it works very well indeed.

there is only one big problem: codecompletion isn't working when
you setup your cb-project using wx-config, because the path to the
include files isn't know for CB during editing.

therefore i switched back to the standard custom-variables project setup
for my default projects.

just my expierience with that issue ...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version