VC++ 6.0 IDE Configuration

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Sleeper
In need of some credit
In need of some credit
Posts: 2
Joined: Thu Oct 07, 2004 3:39 pm

VC++ 6.0 IDE Configuration

Post by Sleeper »

I successfully installed and compiled wxWindows on my system using VC++ 6.0. I have also successfully compiled and run the sample programs.

However, when I attemp to create my own wxWindows program outside of the "samples" directory (e.x. I create a project on the desktop) I get the following error:

"Cannot open include file: "wx/setup.h"... "

So i must have the IDE configured wrong. I tried placing the include and library paths in the Tools->Options->Directories Dialog and in the Link tab of the Project Settings dialog but all of the was to no avail.

So how can I configure my projects myself in the VC++ 6.0 IDE without having to create the project in the "samples" directory of the wxWindows installation or having to copy a sample and start from that. I want to be able to create my own project from scratch.

Any help would be appreciated.
Mampfred
Knows some wx things
Knows some wx things
Posts: 26
Joined: Tue Aug 31, 2004 2:28 pm
Location: Germany
Contact:

Post by Mampfred »

I moved on to use VC7 but judging by the error message you get you forgot to include the wx path somewhere in your project settings.

Apart from the places you mentioned there should be an additional tab (called "C/C++" in VC7, don't remember the name in VC6) where you can specify include directories as well. That's the one you need.

Also be sure to use the same run-time library settings for your project as in wx. Getting this wrong leads to hundreds of errors that make it hard to trace them back to that subtle difference.

HTH
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

This is so common we should put it in the FAQ. 8)

This error is very common amongst people who are new to wxWidgets. You need to copy the setup.h from the lib/msw/setup.h to the include dir. The reason for this, is the setup.h from wxMSW contains windows specific settings ..

So, simply copy it into the include/wx dir. :wink:

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Mampfred
Knows some wx things
Knows some wx things
Posts: 26
Joined: Tue Aug 31, 2004 2:28 pm
Location: Germany
Contact:

Post by Mampfred »

Jorg wrote:You need to copy the setup.h from the lib/msw/setup.h to the include dir.
Well that's another possibility :)
Sleeper
In need of some credit
In need of some credit
Posts: 2
Joined: Thu Oct 07, 2004 3:39 pm

Post by Sleeper »

Ok. Thanks guys.

Now to figure out the linker settings.
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

You should simply use the minimal sample and go from there. What you can alsoe do is download wxCRP it can generate projects for you. Another way to generate projects (x platform) is using CMake. Go to my site and download the wxTreeMultiCtrl source or the wxFoldPanelBar source. In there are CMakeLists.txt files which can generate a wxWidgets project for Linux, Mac, Solaris and Windows ..

Good luck! It is easier then you think ..

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Post Reply