VOGONS


First post, by Tekmaven

User metadata
Rank Newbie
Rank
Newbie

I'm having problems compiling the CVS with Visual Studio .NET 2003.

I'm missing some header files: sdl.h, sdl_net.h, zlib.h, curses.h.

I've tried searching for these files, and placing them in the include and adding them to the project, but that failed 😉. I'm a C# developer, so forgive my C++ n00bishness 😜.

I assume all this stuff is dependencies for DOSBox, and are not included. Can someone put together a zip/rar/targz (or anything) of all the missing stuff and tell me how to add it into the VC++'s project.

It's recompiling now, and when it finishes, I will post the build log.

Reply 1 of 11, by Tekmaven

User metadata
Rank Newbie
Rank
Newbie

Alright, here's the build log:

------ Build started: Project: dosbox, Configuration: Release Win32 ------

Compiling...
fpu.cpp
Generating Code...
Compiling...
dirent.c
Generating Code...
Compiling...
support.cpp
setup.cpp
\dosbox\dosbox\src\misc\setup.cpp(35) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
programs.cpp
messages.cpp
shell_misc.cpp
shell_cmds.cpp
\dosbox\dosbox\src\shell\shell_cmds.cpp(617) : warning C4541: 'dynamic_cast' used on polymorphic type 'DOS_Drive' with /GR-; unpredictable behavior may result
shell_batch.cpp
shell.cpp
\dosbox\dosbox\src\shell\shell.cpp(122) : warning C4101: 'old_in' : unreferenced local variable
\dosbox\dosbox\src\shell\shell.cpp(122) : warning C4101: 'old_out' : unreferenced local variable
int10_vesa.cpp
\dosbox\dosbox\src\ints\int10_vesa.cpp(302) : warning C4244: 'argument' : conversion from 'Bit16u' to 'Bit8u', possible loss of data
int10_put_pixel.cpp
int10_pal.cpp
int10_modes.cpp
int10_misc.cpp
int10_memory.cpp
int10_char.cpp
\dosbox\dosbox\src\ints\int10_char.cpp(503) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
int10.cpp
xms.cpp
mouse.cpp
ems.cpp
dpmi.cpp
Generating Code...
Compiling...
bios_keyboard.cpp
bios_disk.cpp
bios.cpp
sdlmain.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
render.cpp
../include\png.h(329) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
midi.cpp
tandy_sound.cpp
sblaster.cpp
pcspeaker.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
mpu401.cpp
gus.cpp
\dosbox\dosbox\src\hardware\gus.cpp(578) : warning C4244: 'return' : conversion from 'Bit32u' to 'Bit16u', possible loss of data
\dosbox\dosbox\src\hardware\gus.cpp(582) : warning C4244: 'return' : conversion from 'Bit32u' to 'Bit16u', possible loss of data
\dosbox\dosbox\src\hardware\gus.cpp(586) : warning C4244: 'return' : conversion from 'Bit32s' to 'Bit16u', possible loss of data
\dosbox\dosbox\src\hardware\gus.cpp(590) : warning C4244: 'return' : conversion from 'Bit32u' to 'Bit16u', possible loss of data
\dosbox\dosbox\src\hardware\gus.cpp(595) : warning C4244: 'return' : conversion from 'Bit32u' to 'Bit16u', possible loss of data
\dosbox\dosbox\src\hardware\gus.cpp(715) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
\dosbox\dosbox\src\hardware\gus.cpp(813) : warning C4244: 'return' : conversion from 'Bit16u' to 'Bit8u', possible loss of data
\dosbox\dosbox\src\hardware\gus.cpp(954) : warning C4018: '<' : signed/unsigned mismatch
\dosbox\dosbox\src\hardware\gus.cpp(995) : warning C4018: '<' : signed/unsigned mismatch
\dosbox\dosbox\src\hardware\gus.cpp(1008) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
\dosbox\dosbox\src\hardware\gus.cpp(1016) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
gameblaster.cpp
disney.cpp
adlib.cpp
vga_seq.cpp
vga_misc.cpp
vga_memory.cpp
vga_gfx.cpp
vga_draw.cpp
\dosbox\dosbox\src\hardware\vga_draw.cpp(118) : warning C4018: '<' : signed/unsigned mismatch
vga_dac.cpp
Generating Code...
Compiling...
vga_crtc.cpp
vga_attr.cpp
vga.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
ipxserver.cpp
c:\dosbox\dosbox\include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
ipx.cpp
c:\dosbox\dosbox\include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
timer.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
softmodem.cpp
c:\dosbox\dosbox\include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
serialport.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
pic.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
mixer.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
memory.cpp
keyboard.cpp
joystick.cpp
iohandler.cpp
hardware.cpp
dma.cpp
cmos.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
drives.cpp
drive_virtual.cpp
drive_local.cpp
Generating Code...
Compiling...
drive_cache.cpp
\dosbox\dosbox\src\dos\drive_cache.cpp(202) : warning C4018: '<=' : signed/unsigned mismatch
\dosbox\dosbox\src\dos\drive_cache.cpp(326) : warning C4018: '<' : signed/unsigned mismatch
dos_tables.cpp
dos_programs.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
dos_mscdex.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
dos_misc.cpp
dos_memory.cpp
dos_ioctl.cpp
dos_files.cpp
dos_execute.cpp
dos_devices.cpp
dos_classes.cpp
dos.cpp
cdrom_ioctl_win32.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
cdrom_aspi_win32.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
cdrom.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
debug_win32.cpp
debug_gui.cpp
../include\curses.h(38) : fatal error C1083: Cannot open include file: 'sys/cdefs.h': No such file or directory
debug_disasm.cpp
debug.cpp
../include\curses.h(38) : fatal error C1083: Cannot open include file: 'sys/cdefs.h': No such file or directory
paging.cpp
Generating Code...
Compiling...
modrm.cpp
flags.cpp
cpu.cpp
\dosbox\dosbox\src\cpu\cpu.cpp(715) : warning C4554: '&' : check operator precedence for possible error; use parentheses to clarify precedence
\dosbox\dosbox\src\cpu\cpu.cpp(723) : warning C4554: '&' : check operator precedence for possible error; use parentheses to clarify precedence
\dosbox\dosbox\src\cpu\cpu.cpp(741) : warning C4102: 'call_gate_same_privilege' : unreferenced label
core_normal.cpp
core_full.cpp
\dosbox\dosbox\src\cpu\core_full.cpp(106) : warning C4102: 'exit_core' : unreferenced label
core_dyn_x86.cpp
c:\dosbox\dosbox\src\cpu\core_dyn_x86\risc_x86.h(157) : warning C4018: '<' : signed/unsigned mismatch
c:\dosbox\dosbox\src\cpu\core_dyn_x86\risc_x86.h(174) : warning C4018: '<' : signed/unsigned mismatch
callback.cpp
dosbox.cpp
../include\sdl.h(33) : fatal error C1083: Cannot open include file: 'SDL_main.h': No such file or directory
Generating Code...
c:\dosbox\dosbox\src\cpu\core_dyn_x86\risc_x86.h(112) : warning C4731: 'gen_runcode' : frame pointer register 'ebp' modified by inline assembly code
c:\dosbox\dosbox\src\cpu\core_dyn_x86.cpp(225) : warning C4731: 'CPU_Core_Dyn_X86_Run' : frame pointer register 'ebp' modified by inline assembly code

Build log was saved at "file://c:\dosbox\dosbox\visualc_net\Release\BuildLog.htm"
dosbox - 20 error(s), 28 warning(s)

---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped

Reply 3 of 11, by CobraA1

User metadata
Rank Newbie
Rank
Newbie

Indeed, these are third-party libraries that normally don't come with the compiler.

SDL is a cross-platform library similar to DirectX (except it's not Windows-only). Zlib is an open source compression library. Curses is a library for handling text/terminal stuff.

From the INSTALL file:

Things needed for compilation.

SDL
The Simple DirectMedia Library available at http://www.libsdl.org

Curses
(optional)
If you want to enable the debugger you need a curses library.
ncurses should be installed on just about every unix distro.
For win32 get pdcurses at http://pdcurses.sourceforge.net

Libpng
Needed for the screenshots. (optional)
For win32 get libpng from http://www.sourceforge.net/projects/gnuwin32

Zlib
Needed by libpng. (optional)
For win32 get libz (rename to zlib) from http://www.sourceforge.net/projects/gnuwin32

SDL_Net
For modem support(optional). Get it from http://www.libsdl.org

ALSA_Headers
(optional)
???????? for Alsa support under linux

If you want compile from the CVS under a unix system, you'll also need
automake (>=1.6), autoconf(>=2.50). Should be available at http://www.gnu.org

For building on unix systems.
If you are building from the cvs run ./autogen.sh first before doing the following.

1. ./configure
2. make

In step 1 you could add the following switches:
--enable-debug
enables the internal debugger. --enable-debug=heavy enables even more
debug options. Dosbox should then be run from a xterm and when the sdl-
window is active press - on numeric keyboard to enter the debugger.

--disable-fpu
Will disable the emulated fpu. Although the fpu emulation hasn't finished and isn't
entirely accurate it's advised to leave it on.

--enable-core-inline
enables some memory increasing inlines. This greatly increases compiletime for maybe a increase
in speed.

Check the src subdir for the binary.



Compiling on FreeBSD might be a problem since SDL has no joystick support there.
To get around this edit sdlmain.cpp to enable some #define.
Let's hope someday the sdl people will just report 0 joysticks in freebsd or get it working some other way :)


Build instructions for VC++6
Don't use VC++ 6:it creates faulty code in core_normal.cpp

I don't think anybody's ever tried compiling DOSBox with .NET, you might have better success with MinGW or Cygwin.

Reply 4 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

the developper used vs.net to build dosbox 😀
mingw is only used for the releases.

it seems you got a broken curses implementation and you don't have sdl installed.

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

Reply 5 of 11, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Qbix wrote:

the developper used vs.net to build dosbox 😀
mingw is only used for the releases.

Qbix, can you confirm DOSbox cannot compile on VC6? I tried, but VC6 doesn't seem to like the templates used with the render-stuff...

JAL

Reply 6 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

vc6 is not vc.net
vc6 is obsolete. it doesn't support those templates dosbox uses (which are part of the standard i think)

Futher vc6 produces broken code. So you get crashing games because visual C 6 can't compile the sourcefiles properly (in short. visual C 6 sucks (any compiler that compiles broken code sucks))

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

Reply 7 of 11, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Qbix wrote:

vc6 is not vc.net
vc6 is obsolete.

I know it isn't 😀. And no, it's no obsolete. If I where to ask about VC4, now *that* would be obsolete 😉.

Qbix wrote:

it doesn't support those templates dosbox uses (which are part of the standard i think)

I think they are, I cannot see anything wrong with them, even when checking MSDN. VC6 just doesn't want to take a pointer to a instantiation of a template function...

Qbix wrote:

Futher vc6 produces broken code. So you get crashing games because visual C 6 can't compile the sourcefiles properly (in short. visual C 6 sucks (any compiler that compiles broken code sucks))

Well, can't say anything about that, since I couldn't compile with VC6 anyway...

JAL

Reply 8 of 11, by joe_pool_is

User metadata
Rank Newbie
Rank
Newbie

Tekmaven,

If you are still interested, I have zipped my files (Adaptec, CVS setup, dosbox source, LibPNG, PD Curses, SDL 1.2.8, SDL net, and ZLib). This works under Visual C++ .NET 2003. I have included the folder/path information, so all you would need to do is unzip it onto your C: drive (some of the Assembly calls get lost after going too deep into the directory structures). The executables have been removed to reduce the file size, so you will have to recompile the code yourself (also, reduces risk of viruses). Still, the file is about 82 MB (ouch!).

Download it here: http://www.poojo.com/DOSBox.zip

No warranties, expressed or implied.

Wanted: Gasoline and matches.

Reply 10 of 11, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

I've been able to compile with VC6 (with a few small changes in the sound code because VC6 doesn't support partial template specialisation).

Does anybody know what code, specifically, gets miscompiled? (And whether the situation was fixed with SP6?)

Reply 11 of 11, by Kronuz

User metadata
Rank Member
Rank
Member

For those whu need the curses library to compile DOSBox with Visual Studio .NET, here it is 😉

zlib, libpng, and sdl are all availible in their official sites.

Attachments

  • Filename
    pdcurses-2.6-lib-VC7.zip
    File size
    62.19 KiB
    Downloads
    300 downloads
    File comment
    PDCurses 2.6 static lib for VC71
    File license
    Fair use/fair dealing exception

Kronuz
"Time is of the essence"