November 24, 2006
I've compiled wxWidgets, and a few samples (all work fine), and am trying to compile wxWidgets' Hello World program from http://www.wxwidgets.org/docs/tutorials/hello.htm

I have the source code saved as hworld.cpp in the 'include' folder in the main wxWidgets folder (that is to say, mymainwxWidgetsfolder\include\hworld.cpp), and have the command prompt start in that folder, to ensure that "#include "wx/wx.h"" it able to look at mymainwxfolder\include\wx.

The compiler seems to access wx.h alright - but it cannot access defs.h (which is required by wx.h), which is also in the 'wx' folder. It accesses it with "#include "wx/defs.h"", which seems to result in the compiler looking for mymainwxWidgetsfolder\include\wx\wx\defs.h - of this I am fairly certain, as if I create a mymainwxWidgetsfolder\include\wx\wx and put defs.h there, it doesn't complain about defs.h - this time it wants another file.

If I create another wx folder inside the wx folder I created and put that file in there, it will find it and require the next file.

I don't know how to keep the compiler looking in mymainwxWidgetsfolder\include rather than moving to whichever folder it last accessed, how is this done?

Thanks in advance.

(I haven't posted this in the wxWidgets section of the forum as it isn't specifically a wxWidgets issue.)
November 27, 2006
the tutorial needs a makefile for dmc (unlike the unix compilation shown)

You need to have both WXW\include\ in your search path and lib\dmc_lib\mswd

One way to do this is to copy the makefile.dmc from WXW\samples\minimal and modify the makefile.dmc to reflect your file names; another to use wxhatch which will generate the makefile for you

http://biolpc22.york.ac.uk/wx/wxhatch/

chris

Wootery wrote:
> I've compiled wxWidgets, and a few samples (all work fine), and am trying to
> compile wxWidgets' Hello World program from
> http://www.wxwidgets.org/docs/tutorials/hello.htm
> 
> I have the source code saved as hworld.cpp in the 'include' folder in the main
> wxWidgets folder (that is to say, mymainwxWidgetsfolder\include\hworld.cpp),
> and have the command prompt start in that folder, to ensure that "#include
> "wx/wx.h"" it able to look at mymainwxfolder\include\wx.
> 
> The compiler seems to access wx.h alright - but it cannot access defs.h (which
> is required by wx.h), which is also in the 'wx' folder. It accesses it with
> "#include "wx/defs.h"", which seems to result in the compiler looking for
> mymainwxWidgetsfolder\include\wx\wx\defs.h - of this I am fairly certain, as
> if I create a mymainwxWidgetsfolder\include\wx\wx and put defs.h there, it
> doesn't complain about defs.h - this time it wants another file.
> 
> If I create another wx folder inside the wx folder I created and put that file
> in there, it will find it and require the next file.
> 
> I don't know how to keep the compiler looking in mymainwxWidgetsfolder\include
> rather than moving to whichever folder it last accessed, how is this done?
> 
> Thanks in advance.
> 
> (I haven't posted this in the wxWidgets section of the forum as it isn't
> specifically a wxWidgets issue.)