Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Keeping the path constant when looking for files
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.) Nov 24 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.) Nov 27 2006
|