Hi installed wxWidgets using "yum install wxGTK-devel" (I'm using fedora 20). I'm trying to compile the following example file:
#include <wx/wx.h>
int main(void)
{
return 0;
}
using this line:
g++ -I/usr/include/wx-2.8 pru.cpp
But I get that wx/setup.h doesn't exist. I looked for it and didn't found it anywhere.
The problem is that in wx/platform.h there is the following sentence:
#include "wx/setup.h"
I don't know how this is supposed to work or how can I make it work. If you know how to solve this or at least a hint I'll apreciate your help.
Follow this from the wxWidgets documentation:
Linking and Compiling
Normally when you include wxWidgets you say "wx/wx.h" however wxwidgets is in the subdirectory of wx-2.8/wx so what we are going to do is create a link to wx-2.8/wx.
sudo ln -sv wx-2.8/wx wx
That's all, now your files should compile correctly.
When you compile your files to include the wxWidgets libraries, add this to the end of your gcc command:
`wx-config --cxxflags` `wx-config --libs`
For example:
g++ your_code.cpp `wx-config --cxxflags` `wx-config --libs`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With