VOGONS


First post, by gm_matthew

User metadata
Rank Newbie
Rank
Newbie

I've just built DOSBox with Visual Studio 2015, and it appears to be working okay so far. However, there were a couple of things I had to do in order to get it to compile that weren't required in previous versions.

First, the new compiler doesn't like the following code at int10_vesa.cpp, line 48:

static char string_productrev[]="DOSBox "VERSION;

Because of Visual Studio 2015's increased C++11 compliance, the word VERSION is mistaken for a string literal operator and the code refuses to compile. Fortunately, this can easily be fixed simply by adding a space:

static char string_productrev[]="DOSBox " VERSION;

Second, I had to compile SDL.lib and SDLmain.lib myself, since using the development libraries downloadable from libsdl.org resulted in a linker error. It appears that they are incompatible with Visual Studio 2015 as I've seen many examples of people trying to create an SDL app running into the same problem.

Pretty much that only thing I've noticed so far is that the final executable tends to be around 350 kB bigger than before; probably means nothing but still seemed just a little odd to me.

Reply 1 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Weird.
I see a lot of examples on the internet that mention

"Hello ""World"

Are you sure it is a standards thing and not just visual studio ?

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 3, by gm_matthew

User metadata
Rank Newbie
Rank
Newbie

Out of curiosity, I tried using this line and it compiled successfully:

static char string_productrev[]="DOSBox ""SVN";

For some reason, the preprocessor doesn't want to convert VERSION into "SVN" unless there's a space; I'm guessing it assumes it's a suffix and leaves it alone, which causes the compiler to misinterpret it as a literal operator.

In any case, adding a space fixes the problem.