allegro_flare
allegro_flare copied to clipboard
Compile on Visual Studio
It's been a while since I tried to compile on any version of MSVC. Ideally, it should compile without any warnings.
When I get some spare time I can try to create a project in VS2015 and fix any errors. Would it be useful to also have the vs project/solution in the repo?
At some point there was a VS project folder, but it was .gitignored for being too large (I believe it was really only the db cache files that were too big). Probably by v0.9 it would be good to have VS back in, at the very least no compile errors.
As asked here, here's the approach I would take to setup the projects on Visual Studio. I would put multiple projects into one solution similar to how Allegro 5 does it. I would place the files in a msvc/ folder in the root of the repo, and have separate nested folders for each VS version (e.g. msvc/msvc2016/, msvc/msvc2015/, msvc/msvc2012/, etc.).
I would split the multiple projects in the solution something like this:
- AllegroFlare - the actual library. This would compile all of the source files in
source/(while includinginclude/), would build a singlelibfile, and would place that file it in thelib/folder. For now, the library filename should include the version string and the platform, something likeallegro_flare-0.8.8wip-msvc2015.lib. - Example Programs - One VS project per example program. The example files are all the
ex_*anddev_*files in theexamples/folder. I would not bother to build anything in any subdirectory ofexamples/, likeexamples/boost/,examples/curl/,examples/opencv/,examples/text_to_speech/, orexamples/wip/. Those require other dependencies and/or are not expected to compile at all. This folder is in quite a state of flux and most of the examples in theexamples/root are broken or incomplete at this point, but, they all should compile. - Tests - These are the unit tests and require boost test to compile. These are all the
test_*.cppfiles in thetest/folder. Like the examples programs, it might be preferable to have each test file as as a separate project, but I'm not sure, I haven't done test-driven development in MSVC and am not sure what the convention is for this. :)
The AllegroFlare library is really the most important part. The other projects can be attempted only if you're feeling brave. For these, I would probably have a single property sheet that could be used to link the appropriate AllegroFlare libraries and include the header files so you wouldn't have to do all of them manually in each project.
Just prior to posting the above comment, I moved some files around in the examples/ folder to make it a lot easier. So be sure to get a fresh pull.

😊