VOGONS


First post, by Sinner

User metadata
Rank Newbie
Rank
Newbie

Hello

I downloaded Hal's latest CVS here and I am have trouble compiling it. I can compile most CVS versions of Dosbox in terms of dependences but yet when I compile this version; I am getting a error that isn't very descriptive as to what the problem is. I was hoping some one would have some feed back.

make[3]: Entering directory `/home/administrator/Desktop/dosbox/src/misc'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -I/usr/include/freetype2 -MT cross.o -MD -MP -MF .deps/cross.Tpo -c -o cross.o cross.cpp
mv -f .deps/cross.Tpo .deps/cross.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -I/usr/include/freetype2 -MT messages.o -MD -MP -MF .deps/messages.Tpo -c -o messages.o messages.cpp
mv -f .deps/messages.Tpo .deps/messages.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -I/usr/include/freetype2 -MT programs.o -MD -MP -MF .deps/programs.Tpo -c -o programs.o programs.cpp
mv -f .deps/programs.Tpo .deps/programs.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -I/usr/include/freetype2 -MT setup.o -MD -MP -MF .deps/setup.Tpo -c -o setup.o setup.cpp
setup.cpp: In member function ‘bool Value::set_hex(const std::string&)’:
setup.cpp:148: error: ‘INT_MIN’ was not declared in this scope
setup.cpp: In member function ‘bool Value::set_int(const std::string&)’:
setup.cpp:157: error: ‘INT_MIN’ was not declared in this scope
setup.cpp: In member function ‘virtual bool Prop_string::CheckValue(const Value&, bool)’:
setup.cpp:292: warning: format ‘%u’ expects type ‘unsigned int*’, but argument 3 has type ‘Bitu*’
setup.cpp: In member function ‘bool Config::PrintConfig(const char*) const’:
setup.cpp:658: warning: field width should have type ‘int’, but argument 4 has type ‘size_t’
setup.cpp:658: warning: field width should have type ‘int’, but argument 4 has type ‘size_t’
setup.cpp:666: warning: field width should have type ‘int’, but argument 3 has type ‘size_t’
make[3]: *** [setup.o] Error 1
make[3]: Leaving directory `/home/administrator/Desktop/dosbox/src/misc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/administrator/Desktop/dosbox/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/administrator/Desktop/dosbox'
make: *** [all] Error 2

Edit: I think the problem is INT_MIN is not being defined correctly causing the int to be unsigned. Sorry if thats a huge duh but I am rather new to programming. I mostly code Java anyway. Where is INT_MIN defined in the code, is it a dependency issue?

Reply 1 of 11, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I *think* due to Hal's MB including Windows specific code (the printer stuff, I think) you probably can't compile it... but I'm not sure...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 11, by Sinner

User metadata
Rank Newbie
Rank
Newbie
Dominus wrote:

I *think* due to Hal's MB including Windows specific code (the printer stuff, I think) you probably can't compile it... but I'm not sure...

Well thats fine since I have it running under virtualbox but he says "Source code (Linux encoded)" on the download page?

Reply 3 of 11, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Source code (Linux encoded) - I think that only means that the line endings are linux encoded...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 4 of 11, by Sinner

User metadata
Rank Newbie
Rank
Newbie
Dominus wrote:

Source code (Linux encoded) - I think that only means that the line endings are linux encoded...

But there is a makefile and I think theres a Mac build too. Can't I just remove the printer features and have it cross platform.

Reply 7 of 11, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

then I stand corected 😀

Thanks h-a-l

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 8 of 11, by Sinner

User metadata
Rank Newbie
Rank
Newbie
wd wrote:

What gcc version are you using? It may just missing some header that was
previously included indirectly, try adding #include <climits> or so.

Hm, gcc 4.3 from the looks of it. I'll look in to it.

h-a-l-9000 wrote:

It worked for me (older Ubuntu).

Most former Windows-specific stuff should work in Linux too since some time.

Hi Hal

Than maybe I should compile an older version of your CVS on Ubuntu. Could it be any new code you added?

Reply 10 of 11, by Sinner

User metadata
Rank Newbie
Rank
Newbie
h-a-l-9000 wrote:
Well in setup.cpp it has […]
Show full quote

Well in setup.cpp it has

#include <limits>

which seems good enough for MSVC 2003 and for the older Ubuntu.

Maybe add
#include <limits.h>

Your a genius, Thanks that worked and compiled nicely.

Thread solved