Author Topic: How do I get wx/setup.h ?  (Read 11526 times)

slyfox1972

  • Guest
How do I get wx/setup.h ?
« on: August 19, 2008, 07:29:43 am »
Hello!

My System is Ubuntu 7.10 and I can not compile any wxWidget Projects, it says wx/setup.h is not found.
How can I generate it or which package do I have to install?

Offline Ganbito

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: How do I get wx/setup.h ?
« Reply #1 on: August 19, 2008, 11:24:22 am »
You have to install the "-dev" packages of wxWidgets.
Code
libwxgtk2.8-dev

That install all packages that you need (with the dependences).

By the way, Ubuntu 7.10 (Gutsy) wxWidgets packages are a bit old: "2.8.4.0-0ubuntu3", the latest stable release is 2.8.8. So I suggest you to get it from wxWidgets packages repository. For that, you have to add to your "/etc/apt/sources.list" (or go to "System->Administration->Software Sources" "Third-party Software"-tab) the following line:

Code
deb http://apt.wxwidgets.org/ gutsy-wx main

And you have to add the key for getting access to the repository. Command line:

Code
wget -q http://apt.wxwidgets.org/key.asc -O-  | sudo apt-key add -

slyfox1972

  • Guest
Re: How do I get wx/setup.h ?
« Reply #2 on: August 19, 2008, 05:48:11 pm »
Thank you, I have installed it, but it does not work.

The file /usr/include/wx/setup.h does not exist.

I have found a setup.h in the lib dir and set a symbolic link:

Code
ln -s /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h /usr/include/wx/setup.h

But that setup.h is not ok, now the compiler brings much more errors:

Code
-------------- Build: Debug in test1 ---------------

Compiling: GUIFrame.cpp
In Datei, eingefügt von /usr/include/wx/platform.h:88,
                 von /usr/include/wx/defs.h:19,
                 von /usr/include/wx/wxprec.h:13,
                 von /home/egon/CodeBlocks/test1/GUIFrame.cpp:8:
/usr/include/wx/chkconf.h:100:9: Fehler: #error "wxUSE_PROLOGIO must be defined."
/usr/include/wx/chkconf.h:488:9: Fehler: #error "wxUSE_NEW_GRID must be defined."
/usr/include/wx/chkconf.h:1184:9: Fehler: #error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
In Datei, eingefügt von /usr/include/wx/wxprec.h:13,
                 von /home/egon/CodeBlocks/test1/GUIFrame.cpp:8:
/usr/include/wx/defs.h:28:2: Fehler: #error "No Target! You should use wx-config program for compilation flags!"
In file included from /usr/include/wx/wx.h:16,
                 from /home/egon/CodeBlocks/test1/GUIFrame.cpp:15:
/usr/include/wx/object.h:434: Fehler: »wxClassInfo« wurde nicht deklariert
/usr/include/wx/object.h:475: Fehler: expected »;« before »*« token
/usr/include/wx/object.h:476: Fehler: expected `;' before »void«
and so on...

Offline Ganbito

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: How do I get wx/setup.h ?
« Reply #3 on: August 21, 2008, 01:25:20 pm »
Did you maintain the default build options?

Did you started the project on Ubuntu?

I am on Ubuntu 8.04 and before on Ubuntu 7.10 and I never had this problem installing wxWidgets from repository.

Did you have an 'wx' environment variable?

If you use the default wxWidgets options when starting a project, it have to know the right paths.

I don't know why your project search for 'setup.h' in '/usr/include/wx/' if you have not an environment variable or bad compiler and/or linker options. And wxWidgets repository installs their include files by default in '/usr/include/wx-2.8/wx/" so I don't know why your project search for them in another location.

Can you attach the project or a sample project where this happen?