VOGONS


First post, by videogamer555

User metadata
Rank Member
Rank
Member

Instructions at http://www.dosbox.com/wiki/Building_DOSBox_wi … _C_2008_Express are for building with 2008 not 2010.
Most of the steps for 2010 are exactly the same as the tutorial's steps for 20008. There's a slight difference in one of the steps, but figuring out the equivalent thing to do in 2010 wasn't too hard.

But now here comes the problem. I have everything set up. Dependencies, directories, absolutely everything configured as needed for building.

But not everything compiles as it should. Below is a list of errors I got.

1>c:\users\MYNAME\documents\visual studio 2010\projects\dosbox-0.74\src\cpu\core_dyn_x86\risc_x86.h(111): warning C4731: 'gen_ru […]
Show full quote

1>c:\users\MYNAME\documents\visual studio 2010\projects\dosbox-0.74\src\cpu\core_dyn_x86\risc_x86.h(111): warning C4731: 'gen_runcode' : frame pointer register 'ebp' modified by inline assembly code
1>..\src\gui\sdlmain.cpp(1892): warning C4297: 'SDL_main' : function assumed not to throw an exception but does
1> __declspec(nothrow) or throw() was specified on the function
1>..\src\gui\sdlmain.cpp(1892): warning C4297: 'SDL_main' : function assumed not to throw an exception but does
1> __declspec(nothrow) or throw() was specified on the function
1>LINK : fatal error LNK1181: cannot open input file 'sdlmain.lib'

I'm not sure, but I'm guessing that there's some stuff going on "behind the scenes" when C++2010 compiles, that's not quite the same as when C++2008 compiles. Can somebody here give me a hand with this? I plan to implement some of the features I've been complaining are missing from the official version, but first I need to be able to build a "vanilla" copy, before I can even BEGIN to consider modding the code.

Reply 2 of 6, by videogamer555

User metadata
Rank Member
Rank
Member
Qbix wrote:

you don't have the support libs setup correctly.
The last line is the hint.

Well I followed all the steps in the tutorial, which theoretically was supposed to show how to do exactly what needed to be done, without leaving any guesswork for the person trying to compile. The only setting up of the libs mentioned in the tutorial was setting the include folder for SDL and setting the library folder for SDL, in the VC++ IDE. I did both of those, just as the tutorial showed (with the one exception being that in version 2010, the menu to do this wasn't in the same place that the tutorial said it would be in version 2008).

Reply 3 of 6, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

The linker can't find sdlmain.lib. If you can't figure out how to set the path correctly in Visual Studio, just copy the file to any relevant-sounding directory (e.g., dosbox/visualc_net/) until the linker can find it.

Reply 4 of 6, by videogamer555

User metadata
Rank Member
Rank
Member

I did eventually figure out how to do it. My problem was that the SDL version mentioned in the tutorial was version 1.2.13, but the current version of SDL is 1.2.15. Doesn't seem like much of a difference, but there is a difference in how the LIB folder is structured. In the tutorial this is SDLPATH\lib, meaning that all the library files are in this folder. But in the current version of SDL, there are 2 sub folders. I made the mistake of assuming that when including SDLPATH\lib, that VC++ would automatically also include all subdirectories. It doesn't. The 2 sub folders are x86 and x64. To make sure that my compiled version would work on both 32bit and 64bit PCs, I opted to include the x86 folder. So my final path for the library folder was SDLPATH\lib\x86. The tutorial should be updated to include this fact.

Also I would like to point out that while building the project was successful (WOO HOO!!!), and gives this report for the build

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

it also still gives me these 3 warnings.

1>c:\users\MYNAME\documents\visual studio 2010\projects\dosbox-0.74\src\cpu\core_dyn_x86\risc_x86.h(111): warning C4731: 'gen_ru […]
Show full quote

1>c:\users\MYNAME\documents\visual studio 2010\projects\dosbox-0.74\src\cpu\core_dyn_x86\risc_x86.h(111): warning C4731: 'gen_runcode' : frame pointer register 'ebp' modified by inline assembly code
1>..\src\gui\sdlmain.cpp(1892): warning C4297: 'SDL_main' : function assumed not to throw an exception but does
1> __declspec(nothrow) or throw() was specified on the function
1>..\src\gui\sdlmain.cpp(1892): warning C4297: 'SDL_main' : function assumed not to throw an exception but does
1> __declspec(nothrow) or throw() was specified on the function

I don't know how to fix these. Anybody here who can help?