Author Topic: Fedora 8, Code::Blocks, and wxWidgets-2.8.7  (Read 5841 times)

Offline Hyper_Eye

  • Single posting newcomer
  • *
  • Posts: 6
Fedora 8, Code::Blocks, and wxWidgets-2.8.7
« on: January 17, 2008, 12:18:29 am »
I compiled wxWidgets-2.8.7 and Code::Blocks from SVN (checked out today) as per the instructions here:

http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux

The install seems to have gone fine. I have my wx/bin in my path and wx-config works. When I run "wx-config --cflags" I get the following output:

Code
-I/opt/wx/2.8/lib/wx/include/gtk2-unicode-release-2.8 -I/opt/wx/2.8/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread

Those flags look good to me. I checked "/opt/wx/2.8/lib/wx/include/gtk2-unicode-release-2.8" and wx/setup.h exists there. I have created a wxwidgets project in codeblocks and under "Compiler settings->Other options" I have:

Code
`wx-config  --cflags`

Still, when I try to compile the application I get the following error:

Code
/opt/wx/2.8/include/wx-2.8/wx/platform.h:196:22: error: wx/setup.h: No such file or directory

I don't see that there is anything wrong with the configuration. Does anyone have any ideas? Thanks.

Offline Hyper_Eye

  • Single posting newcomer
  • *
  • Posts: 6
Re: Fedora 8, Code::Blocks, and wxWidgets-2.8.7
« Reply #1 on: January 22, 2008, 01:01:48 am »
I'm still stuck and I am trying to get this running for work. Any help would be appreciated.

Offline mikex

  • Single posting newcomer
  • *
  • Posts: 3
Re: Fedora 8, Code::Blocks, and wxWidgets-2.8.7
« Reply #2 on: January 22, 2008, 07:18:14 pm »
The setup.h problem is a common one.

The setup.h file is platform and build specific.  To make sure you get the right one for your build you have to include the right directory.

For my build, MingW debug, setup.h is in this directory:

C:\wxWidgets-2.8.7\lib\gcc_lib\mswd\wx

The gcc_lib is for the gnu compiler collection, msw is for Microsoft windows and the "d" after msw is for debug.

Thus my compile line has the include directive:
-IC:\wxWidgets-2.8.7\lib\gcc_lib\mswd

in order to include wx\setup.h

Why is an include file under a lib directory?  dunno, it is where it is.  Don't let that stop you from using wxWidgets, it really is a good library.

You're using linux not MSW so your directory will be something else.  Do a find from WXBASE/lib and pick the right one.


Mike

Offline Hyper_Eye

  • Single posting newcomer
  • *
  • Posts: 6
Re: Fedora 8, Code::Blocks, and wxWidgets-2.8.7
« Reply #3 on: January 22, 2008, 07:41:38 pm »
I have wxWidgets working on a Gentoo Linux machine. I have also created an installer at work to install a wxWidgets development environment there that includes Code::Blocks, wxWidgets, mingw, and some working examples for the Windows side. So I know it is a great library. It is much better then porting Gtk back and forth. But, for the Linux side we use Fedora and this is the distro I need to get it working on.

`wx-config --cflags` is supposed to provide the needed compile flags including the include path to 'wx/setup.h' which it does as I noted below. The problem is that it doesn't seem to be working when I put it in the project options under "Compiler Options-> Other Options". It is like it is being ignored.

Thanks

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Fedora 8, Code::Blocks, and wxWidgets-2.8.7
« Reply #4 on: January 22, 2008, 07:57:48 pm »
Can you switch to full command line logging to see which commands are really used to compile ?

Settings -> Compiler and Debugger -> Tab "Other" -> Compiler logging = "Full command line"

Offline Hyper_Eye

  • Single posting newcomer
  • *
  • Posts: 6
Re: Fedora 8, Code::Blocks, and wxWidgets-2.8.7
« Reply #5 on: January 22, 2008, 11:53:24 pm »
I booted up my machine today and it worked. I didn't make any changes so I am unsure of why it is now working. It could have had something to do with my library path or something. Thanks for the help all.