VOGONS


Compile DosBOX under Borland C++ Builder 6

Topic actions

First post, by deeped

User metadata
Rank Newbie
Rank
Newbie

Hey ppl,

I need some guy who are experted in C++ builder 😀 Im trying to compile a part of Dosbox (the Adlib part and what it needs) but after a minute-longer (!!) compling I get:

pic.cpp, #include <list> = F1005 Include files nested too deep

😒 anyone met this error? I set the enums threated as ints and some compatible options. What to do now? Any idea?

Reply 1 of 33, by deeped

User metadata
Rank Newbie
Rank
Newbie

ok no answer now lets try an other developer tool, called Microsoft Visual C++ 6 😊 when I try to compile I get tons of "unresolved symbols" could anyone give me further information how to load DosBox to MVC?

Reply 2 of 33, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

What about not using some ancient development tools?
Then you might even get some replies.

Reply 3 of 33, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

But... MSVC6 is only 10 years old!

Anyway, deeped, both those compilers are so old that they predate the C++ standard and don't (couldn't!) implement it fully. DOSBox makes use of some features that aren't supported by the old compilers. That's before you take any compiler bugs into account.

Try getting a newer version of Visual C++, such as Visual C++ 2008 Express, which is freely downloadable from the Microsoft website and can compile DOSBox just fine (provided you've installed the proper libraries [which can be quite an exercise in and of itself]).

My site: Ramblings on mostly tech stuff.

Reply 4 of 33, by deeped

User metadata
Rank Newbie
Rank
Newbie

ah ok I didnt think that the source code is not independent of the developer tools =) I'll install a Visual Studio 2005 I hope it will do

Reply 5 of 33, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

ah ok I didnt think that the source code is not independent of the developer tools =)

Yes maybe try to compile ANY recent code with turbo c and have fun.

Reply 6 of 33, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Turbo C doesn't even accept // comments 🙁

1+1=10

Reply 7 of 33, by deeped

User metadata
Rank Newbie
Rank
Newbie

:DDD ok ok 😀

Reply 8 of 33, by deeped

User metadata
Rank Newbie
Rank
Newbie

ok then theres an other problem 😀 (the topic should be renamed now)

so it is Microsoft Visual Studio 2005. WD, you said if I want to create my own FM emulator, the "entry point" is the OPL_Write() function in adlib.cpp.

I have some example (working) program for adlib using, a very simple. So it must be changed - instead of writing the 2 ports. So, OPL_Write() in adlib.cpp, and - I know its very primitive - pressing F7 and copy the .c, .h, .cpp files what the program needs. Im finished with inout, mem, mixer, ymf262 etcetcetc and after linkink it drops:

myprogram.obj : error LNK2019: unresolved external symbol "void __cdecl PIC_AddEvent(void (__cdecl*)(unsigned int),float,unsigned int)" (?PIC_AddEvent@@YAXP6AXI@ZMI@Z) referenced in function "void __cdecl OPL2::TimerHandler(int,double)" (?TimerHandler@OPL2@@YAXHN@Z)

yay. 😒

Reply 9 of 33, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well remove calls to PIC_AddEvent if you don't need them.

Reply 10 of 33, by deeped

User metadata
Rank Newbie
Rank
Newbie

🤣... you dont understand.

Again: I copied all files and it dropes a linker error. It doesnt mean I dont need PIC_AddEvent. Moreover, I dont even know what it does. And it dropes tons of unresolved symbols: "unsigned char adlib_commandreg" (?adlib_commandreg@@3EA), "unsigned int PIC_Ticks" (?PIC_Ticks@@3IA), "void __cdecl E_Exit(char const *,...)" blahblahblah

Reply 11 of 33, by deeped

User metadata
Rank Newbie
Rank
Newbie

and a "bug": in adlib.cpp the "test" is defined twice:

362 static OPL* test;
592 static PIC* test;

Reply 12 of 33, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

my adlib.cpp only has ~370 lines

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

Reply 13 of 33, by deeped

User metadata
Rank Newbie
Rank
Newbie

*sigh* now it say "error C2011: 'LazyFlags' : 'struct' type redefinition" in lazyflags.h (36)

Reply 14 of 33, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

well if you put files into each other, then you are on your own.

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

Reply 15 of 33, by deeped

User metadata
Rank Newbie
Rank
Newbie

🤣 dont make me angry... I did NOT modify anything about those freaking #includings...

Reply 16 of 33, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Then you seriously messed up your build system, the sources, or something
in-between all that.
Get your stuff straight. As you "only" want adlib emulation, take the fmopl.c
and write your code around it. How it is interfaced with is in adlib.cpp.

Reply 17 of 33, by deeped

User metadata
Rank Newbie
Rank
Newbie

its okay but adlib.cpp needs dirent.h, pic.h, mixer.h tons of .h files that needs more .h files etcetcetc I need only remove them?

Reply 18 of 33, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

uhm use adlib.cpp as guideline on how to interface with it, you can't simply copy it and assume it works as it is a part of dosbox.
not a module which can be loaded later or so.

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

Reply 19 of 33, by deeped

User metadata
Rank Newbie
Rank
Newbie

yayyyy! ....... so it cant be separated? omg. Well..... white flag