User forums > Help

How do I get wx/setup.h ?

(1/1)

slyfox1972:
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?

Ganbito:
You have to install the "-dev" packages of wxWidgets.

--- Code: ---libwxgtk2.8-dev
--- End code ---

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
--- End code ---

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 -
--- End code ---

slyfox1972:
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
--- End code ---

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...
--- End code ---

Ganbito:
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?

Navigation

[0] Message Index

Go to full version