VOGONS


First post, by Anonymous MOS

User metadata
Rank Newbie
Rank
Newbie

I'm having to use Visual Studio Express 2017 because I can't find 2008 or 2010, but I don't think that's the problem.

While trying to compile zlib and libpng I'm getting errors like these:

"1>------ Rebuild All started: Project: zlib, Configuration: Release Library Win32 ------
1>adler32.c
1>d:\!!!development\dosbox\zlib-1.2.5\zconf.h(364): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory"

These continue with a lot of .c files, I also have this error:

3>------ Rebuild All started: Project: libpng, Configuration: Release Library Win32 ------
3>png.c
3>d:\!!!development\dosbox\lpng169\pngpriv.h(44): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
3>Done building project "libpng.vcxproj" -- FAILED.

Thanks for any help. 😀

__________________________________________
Alienware Aurora R7
Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
16 Gigs RAM
NVIDIA GeForce GTX 1070
Windows 11 Home, 64-bit

Reply 1 of 14, by gandhig

User metadata
Rank Member
Rank
Member

You could try the MinGW build environment(pretty simple if you follow the wiki), as there seems to be some issues in compiling DOSBox using VS 2017. Don't forget to apply this patch.

Dosbox SVN r4019 + savestates Build (Alpha)
1st thread & the only one related to the forum(?)...warning about modern-retro combo
Dead, but, Personal Favourite
Replacement for Candy Crush...Train the Brain

Reply 2 of 14, by Anonymous MOS

User metadata
Rank Newbie
Rank
Newbie

Thanks for the heads up. I've never compiled anything before, so any info is great! I'll try to put the patch in there too. Didn't know there was a problem before. 😀

__________________________________________
Alienware Aurora R7
Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
16 Gigs RAM
NVIDIA GeForce GTX 1070
Windows 11 Home, 64-bit

Reply 3 of 14, by Anonymous MOS

User metadata
Rank Newbie
Rank
Newbie
gandhig wrote:

You could try the MinGW build environment(pretty simple if you follow the wiki), as there seems to be some issues in compiling DOSBox using VS 2017. Don't forget to apply this patch.

Finally got around to working on compiling DOSBox. Now, what exactly does this patch do, and where in the compilation process on the wiki should I incorporate it? 😀

Thanks!

__________________________________________
Alienware Aurora R7
Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
16 Gigs RAM
NVIDIA GeForce GTX 1070
Windows 11 Home, 64-bit

Reply 4 of 14, by Anonymous MOS

User metadata
Rank Newbie
Rank
Newbie

I've compiled my first SVN build, but neither video recording or screenshots work. I used the guide here: https://www.dosbox.com/wiki/Building_DOSBox_with_MinGW

I haven't checked IPX/modem yet.

edit

Network seems to work.

Found one error:

$ make install
make install-am
make[1]: Entering directory `/home/ranth/libpng-1.6.18'
depbase=`echo png.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -MT png.lo -MD -MP -MF $depbase.Tpo -c -o png.lo png.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -g -O2 -MT png.lo -MD -MP -MF .deps/png.Tpo -c png.c -o png.o
In file included from pngpriv.h:70:0,
from png.c:14:
pnglibconf.h:200:54: error: expected identifier or '(' before '-' token
0
^
In file included from png.h:485:0,
from pngpriv.h:297,
from png.c:14:
pngconf.h:522:9: error: unknown type name 'ptrdiff_t'
typedef ptrdiff_t png_ptrdiff_t;
^~~~~~~~~
In file included from png.c:14:0:
pngpriv.h:804:21: error: operator '!=' has no left operand
#if PNG_ZLIB_VERNUM != 0 && PNG_ZLIB_VERNUM != ZLIB_VERNUM
^~
make[1]: *** [png.lo] Error 1
make[1]: Leaving directory `/home/ranth/libpng-1.6.18'
make: *** [install] Error 2

__________________________________________
Alienware Aurora R7
Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
16 Gigs RAM
NVIDIA GeForce GTX 1070
Windows 11 Home, 64-bit

Reply 5 of 14, by gandhig

User metadata
Rank Member
Rank
Member
Ranthalion75 wrote:
gandhig wrote:

You could try the MinGW build environment(pretty simple if you follow the wiki), as there seems to be some issues in compiling DOSBox using VS 2017. Don't forget to apply this patch.

Finally got around to working on compiling DOSBox. Now, what exactly does this patch do, and where in the compilation process on the wiki should I incorporate it? 😀
Thanks!

There is a file (pnglibconf.h) which gets automatically generated during the compilation of 'libpng', albeit with some issues. The issue can be fixed by applying the patch posted by Yesterplay80 to the pnglibconf.h file located in 'libpng-1.6.18' directory.

However if you are not comfortable with applying a patch, the issue can be corrected manually too. Please refer this post for details.

Dosbox SVN r4019 + savestates Build (Alpha)
1st thread & the only one related to the forum(?)...warning about modern-retro combo
Dead, but, Personal Favourite
Replacement for Candy Crush...Train the Brain

Reply 6 of 14, by Anonymous MOS

User metadata
Rank Newbie
Rank
Newbie

Looks like you can't compile this whole project with VS2010 Express anyway. The tutorial is at: http://nerdlypleasures.blogspot.com/2014/03/t … x-svn-with.html .

When you get to SDL-net it says " SDL_net requires the SDL libraries, which is why we compiled the SDL libraries first. Like with SDL, you will need to unzip the VisualC.zip file and convert the solution file SDL_net.sln. Set SDL_net to Release in the Configuration Properties.

Open the SDL_net properties page, set the Configuration Type to Static library (.lib) and then click on VC++ Directories. For the Include Directories, you need to add the directory containing the SDL Include files. They can be typically found here : \Project\SDL-1.2.14 Next you need to add the directories containing the SDL Library files. These are \Project\SDL-1.2.14\VisualC\SDL\Release and \Project\SDL-1.2.14\VisualC\SDLmain\Release. You need to add both. After you have done all this, you can exit the properties window and press F7 to compile. You should end up with sdl_net.lib. "

But I end up getting this "
1>------ Build started: Project: SDL_net, Configuration: Release Win32 ------
1>Version.rc(10): fatal error RC1015: cannot open include file 'afxres.h'.
1>
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========="

Now, I've read that this is because the Express version of VS2010 doesn't come with Microsoft Foundation Classes for C++.
If this is true, the tutorial is completely incorrect and can't be completed with the Express version.
Anyone know?

Also, thanks for all of your help Gandhig. 😀

__________________________________________
Alienware Aurora R7
Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
16 Gigs RAM
NVIDIA GeForce GTX 1070
Windows 11 Home, 64-bit

Reply 8 of 14, by Anonymous MOS

User metadata
Rank Newbie
Rank
Newbie
zirkoni wrote:
Ranthalion75 wrote:

Anyone know?

SDL_net doesn't use the MFC libraries. You should be able to just replace #include "afxres.h" with #include "windows.h"

Awesome! That's what I had hoped! 😀

Thanks, Zirkoni!

__________________________________________
Alienware Aurora R7
Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
16 Gigs RAM
NVIDIA GeForce GTX 1070
Windows 11 Home, 64-bit

Reply 9 of 14, by Anonymous MOS

User metadata
Rank Newbie
Rank
Newbie

Okay, everything worked up until compiling DOSBox itself. I'm not compiling this with debugging, so I don't think I need the curses.lib file. It errs out with this:

1> Generating Code...
1>LINK : fatal error LNK1181: cannot open input file 'curses.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

How do I get around this?

Thanks for all the help so far, guys!

__________________________________________
Alienware Aurora R7
Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
16 Gigs RAM
NVIDIA GeForce GTX 1070
Windows 11 Home, 64-bit

Reply 11 of 14, by Anonymous MOS

User metadata
Rank Newbie
Rank
Newbie

Thanks, everyone!

I finally got it to compile, but I get "Failed to create ddraw surface, back to normal surface." when I load my build.

Which part do I need to fix and recompile?

__________________________________________
Alienware Aurora R7
Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
16 Gigs RAM
NVIDIA GeForce GTX 1070
Windows 11 Home, 64-bit

Reply 13 of 14, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

Or the one from my build, if you want it in version 1.2.15. Doesn't make a difference though as far as i know.

In case you want to try again, have a look in the folder "src\platform" of your local source directory, there you'll find a diff file called "sdl-win32.diff" which, when applied to the SDL source code, enables Direct Draw output. But it only applies version 1.2.12 of SDL, for the current version 1.2.15 you'd have to make some changes first, so it's easier just to use a already compield one, as Qbix said.

My full-featured DOSBox SVN builds for Windows & Linux: Vanilla DOSBox and DOSBox ECE (Google Drive Mirror)

Reply 14 of 14, by Anonymous MOS

User metadata
Rank Newbie
Rank
Newbie

Thanks for the input, guys!

My .exe has all of the libraries compiled inside of it. Wouldn't mind having the latest version of SDL, but I'm using 1.2.14 because of compatibility worries.

With mine having everything all in one I think I'd have to fix it, or re-compile with different settings so I could have separate .dll files.

Could anyone point me to a guide or something?

I'd like to end up being independent enough to be able to compile all future SVNs, and upgrade all the libraries as needed.

__________________________________________
Alienware Aurora R7
Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
16 Gigs RAM
NVIDIA GeForce GTX 1070
Windows 11 Home, 64-bit