From: John L. <jla...@gm...> - 2005-11-21 00:17:12
|
On 11/20/05, Francesco Montorsi <f18...@ya...> wrote: > > I think the solution to making it possible to have multiple version of > > the wxlua bindings for different projects lies in making the compiler > > include luasetup.h for us. > > This is not a "standard" solution; rather that, I'd prefer to use the sam= e system adopted > for wxWidgets: on win32 they provide a default setup.h which can then be = customized by the > user before compiling. How can you have multiple configurations of wxWidgets using nmake? I don't think it's possible since if you edit setup.h it just completely recompiles everything. You can change the output directory however, see CFG=3D in build/msw/config.vc. If you're working on two configs at the same time it seems like you have to copy/edit setup.h and then completely recompile. See below for why I think wxLua is a little different and that having two independent configurations of wxLuaBind is normal for a C++ developer. > On unix a setup.h is generated from setup.h.in using the values of the --= enable-xxx features. On linux with configure it can work, in fact I do have two independent versions of wxWidgets right now. I need to have (at least) two different wxLuaBind libraries and I think this scenario would be similar for anyone using wxLua in a C++ program. One for apps/wxlua with basically everything turned on and the second for my programs that embed wxLua with some stuff turned off. I'm trying to think of how we can make use of the build files in wxLua for external projects rather than writing and maintaining our own. We need to make it so that you can build both at the same time without needing to copy the appropriate luasetup.h and also as a developer using CVS I don't want my luasetup.h getting constantly overwritten with each checkout. The way I see it is that you need to get all the things in luasetup.h defined independently for each instance of the library and you need to either give the library a different name or destination dir. > > I couldn't find the equivalent for gcc's "-include" using nmake (MS's > > compiler). Does anyone know if *all* compilers have this capability? I > > assume yes? > I really fear that most of win32 compilers do not have such option: I cou= ldn't find it for > CL (MSVC's compiler) nor for BCC32 (borland's one)... That's a shame, I was hoping I missed it. > > This should be pretty self explanitory. We could be less strict and > > just #include a default luasetup.h > I think that on win32 we should always use a default luasetup.h; if the n= umber of options > is not too big (say, < 16) we could use options in the makefiles: USE_FL,= USE_STC, etc... > So that instead of editing setup.h for wxLua, the user would just need to= call: > > nmake -fmakefile.vc USE_FL=3D1 USE_STC=3D1 > to override the USE_FL=3D0 & USE_STC=3D0 defaults. DOS only lets you have command lines < 256 chars IIRC. This can be used up pretty quickly, but would work though. > > We also need to do the same for the output library path and name, so > > people can override them on the commandline or their own Makefiles for > > their project. > why would user need to override the output library name ? > Also, the output path should be the usual wxLua/lib... To have two different compiled versions of lib_wxluabind, see above. Regards, John Labenski |