General Question: which setup.h is used? and where?

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
Avi
Super wx Problem Solver
Super wx Problem Solver
Posts: 398
Joined: Mon Aug 30, 2004 9:27 pm
Location: Tel-Aviv, Israel

General Question: which setup.h is used? and where?

Post by Avi »

Well, today I noticed couple of copies of the same setup.h file:
- /setup.h.in
- /include/wx/setup_inc.h
- /include/wx/msw/setup.h
- /include/wx/msw/setup0.h

Which one is used, and under which conditions? I use Microsoft Visual Studio 2003, and so I modified /include/wx/msw/setup.h... but should I change the other 3? What are they for? (especially setup_inc.h and setup0.h) :?:
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Re: General Question: which setup.h is used? and where?

Post by upCASE »

Hi!
Avi wrote: - /setup.h.in
- /include/wx/setup_inc.h
- /include/wx/msw/setup.h
- /include/wx/msw/setup0.h

Which one is used, and under which conditions? I use Microsoft Visual Studio 2003, and so I modified /include/wx/msw/setup.h... but should I change the other 3? What are they for? (especially setup_inc.h and setup0.h) :?:
You'll only need /include/wx/msw/setup.h. The others are there for generation of a setup.h using configure. Using VS /include/wx/msw/setup.h is the right one. It will be copied to a different location (/lib/vd_lib/msw or /lib/vc_lib/mswd) so that you can have different builds. Be sure to set your include path to the corresponding lib dir.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

After making my own FindWxWidgets script for cmake, I noticed that the only valid setup.h that should be used is copied by wxWidgets itself while building. The setup.h informs you (and the rest of the stuff to be compiled) what the config is.

Include the one in {WXDIR}/lib/ms_vc/msw(ud)/setup.h in your project include path.

I don't know where it is copied from, but during build the one that is copied should be adjusted to configure the wx lib.

Regards,
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
krysa
Experienced Solver
Experienced Solver
Posts: 71
Joined: Wed Feb 16, 2005 9:23 pm
Location: Lithuania

Post by krysa »

Jorg wrote:Include the one in {WXDIR}/lib/ms_vc/msw(ud)/setup.h in your project include path.

I don't know where it is copied from, but during build the one that is copied should be adjusted to configure the wx lib.
It is copied from {WXDIR}/include/wx/msw/setup.h (just as upCASE said).
Platform: MSW (Windows XP Pro)
Compiler: msvc 13.10.3077 (Free Toolkit)
wxWidgets: v2.6.0
Avi
Super wx Problem Solver
Super wx Problem Solver
Posts: 398
Joined: Mon Aug 30, 2004 9:27 pm
Location: Tel-Aviv, Israel

Post by Avi »

Ok, thanks guys. It is clear now... :)
Post Reply