VOGONS


First post, by Nobuo T

User metadata
Rank Newbie
Rank
Newbie

Hi,

Tried whole day (and what a fine day I spend hacking at my laptop with increasing frustration for that matter 😜 ) to compile 0.70 with --enable-debug and now I'm completely lost again. 😅

I've got WinXP SP2 running here and tried compiling with MinGW 5.1.3 and MSYS 1.0.10

1st problem I got was the configure script (yup, I ran it more than once) didn't find the pdcurses 3.0 I compiled with MinGW. I solved this with trial&error and ended up copying the pdcurses.h to MinGW/include/ and the whole /win32 directory from pdcurses to the MinGW /lib-directory and renamed the pdcurses.a and panel.a each to .lib.

Next error was some "}" on line 1611 AFAIR in pdcurses.h that didn't seem to belong there, so I just removed it. No errors with this file after that.

Instead I got errors in debug.cpp and debug.h now:

Making all in debug
make[3]: Entering directory `/hdd/sources/dosbox-0.70/src/debug'
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I/usr/local/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -g -O2 -MT debug.o -MD -MP -MF ".deps/debug.Tpo" \
-c -o debug.o `test -f 'debug.cpp' || echo './'`debug.cpp; \
then mv -f ".deps/debug.Tpo" ".deps/debug.Po"; \
else rm -f ".deps/debug.Tpo"; exit 1; \
fi
../../include/debug.h: In function `bool DEBUG_Breakpoint()':
../../include/debug.h:21: error: previous declaration of `bool DEBUG_Breakpoint()' with C++ linkage
debug.cpp:611: error: conflicts with new declaration with C linkage
../../include/debug.h: In function `bool DEBUG_IntBreakpoint(Bit8u)':
../../include/debug.h:22: error: previous declaration of `bool DEBUG_IntBreakpoint(Bit8u)' with C++ linkage
debug.cpp:621: error: conflicts with new declaration with C linkage
../../include/debug.h: In function `bool DEBUG_ExitLoop()':
../../include/debug.h:25: error: previous declaration of `bool DEBUG_ExitLoop()' with C++ linkage
debug.cpp:649: error: conflicts with new declaration with C linkage
../../include/debug.h: In function `void DEBUG_Enable(bool)':
../../include/debug.h:23: error: previous declaration of `void DEBUG_Enable(bool
)' with C++ linkage
debug.cpp:1650: error: conflicts with new declaration with C linkage
../../include/debug.h: In function `void DEBUG_DrawScreen()':
../../include/debug.h:20: error: previous declaration of `void DEBUG_DrawScreen()' with C++ linkage
debug.cpp:1665: error: conflicts with new declaration with C linkage
../../include/debug.h: In function `void DEBUG_CheckExecuteBreakpoint(Bit16u, Bit32u)':
../../include/debug.h:24: error: previous declaration of `void DEBUG_CheckExecuteBreakpoint(Bit16u, Bit32u)' with C++ linkage
debug.cpp:1903: error: conflicts with new declaration with C linkage
../../include/debug.h: In function `void DEBUG_SetupConsole()':
../../include/debug.h:19: error: previous declaration of `void DEBUG_SetupConsole()' with C++ linkage
debug.cpp:1926: error: conflicts with new declaration with C linkage
debug.cpp: At global scope:
debug.cpp:2135: error: expected `}' at end of input
make[3]: *** [debug.o] Error 1
make[3]: Leaving directory `/hdd/sources/dosbox-0.70/src/debug'
make[2]: *** [all-recursive] Error 1
...

So what now? 😕
Any sugestions are apreciated. 😀

Reply 1 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

well it sounds like the header pdcurses.h wasn't finished
probably an

extern "C" { 

still being open

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

Reply 2 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Anyway. Here is an executable with the cvs of today( 3 april 2007)
which is almost identical to the 0.70 release.
Put the executable in the dosbox 0.70 dir and have fun
(heavy debug version)

Attachments

  • Filename
    20070403heavy.rar
    File size
    1.02 MiB
    Downloads
    246 downloads
    File comment
    the file
    File license
    Fair use/fair dealing exception

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

Reply 5 of 7, by etil

User metadata
Rank Newbie
Rank
Newbie

I guess there is a bug in curses.h.

The end of the header:
-------------------------------------------------------------------------------
#endif /* __PDCURSES__ */

#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
# undef bool
}
#endif
-------------------------------------------------------------------------------

It should be this:
-------------------------------------------------------------------------------
#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
# undef bool
}
#endif

#endif /* __PDCURSES__ */
-------------------------------------------------------------------------------

Reply 6 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

ah yes that sounds like what I posted as well (as the define is for the c++ detection that is usually used with the extern C thing.
Thanks.

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

Reply 7 of 7, by wmcbrine

User metadata
Rank Newbie
Rank
Newbie
I guess there is a bug in curses.h. […]
Show full quote

I guess there is a bug in curses.h.

The end of the header:
-------------------------------------------------------------------------------
#endif /* __PDCURSES__ */

#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
# undef bool
}
#endif
-------------------------------------------------------------------------------

It should be this:
-------------------------------------------------------------------------------
#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
# undef bool
}
#endif

#endif /* __PDCURSES__ */
-------------------------------------------------------------------------------

Thanks. I wish I'd heard about this sooner. Checking CVS, I see that it's been broken since June 2005 (before I took over, and covering 2.7 on). Fortunately (?), it only shows up if you're including the file more than once (and then only in C++).

Fixed in PDCurses CVS now...