I’m currently porting a POSIX C++ application to run on Windows without Cygwin or anything. No problem so far. Now, the application (ZNC, an IRC bouncer, in case you’re interested) supports loading modules from .so shared library files on Linux/BSD etc.
I ported the main executable without much of a problem, all wrapped into a VS 2008 project file and stuff. Now, said modules are all separate .cpp files which can’t be linked into the executable as they all export symbols like GetVersion(). And it isn’t feasible anyway.
So, to cut a long story short, I want to (have to) compile all the modules (over 20) into separate DLL files. I don’t want to create a single VS project for each however. Which means I’ll probably have to create a makefile? Or something the like? I’ve never done that before on Windows, so that’s my question. What is the best approach to compile a bunch of .cpps into separate DLL files (with the same settings, all stored conveniently in one place/file)?
Thanks in Advance! I.R.
As far as I know there is no built in way to do this. So here is what I would do:
Convert one of the modules into a DLL, make sure it works and everything is kosher.
Write a script to generate the other 20 vcproj’s from the one reference vcproj that works. I don’t know the details of your module system so i’m not sure how strait forward that will be.
Add them into the solution.
Hopefully that works.