Page 1 of 1

Newbie compile question #1000

Posted: Wed Mar 12, 2003 12:36 am
by Fabrizio
Ok, the subject of the post anticipates you will find some quite boring and probably stupid questions here.
I apologize for that.

I downloaded Exult 1.1 snapshot of 10th of March together with all needed zlib and sdl libraries.

System is w2000 SP3+Visual Studio 6.0 SP5.
EXULT_INSTALL_PATH is set and MSVC recognizes .cc files (adding the registry change discussed in the forum - Yes a did an exhaustive search!)

I open exult.dsw in msvcstuff folder; Lib and Include directories are set to find zlib, sdl and sdl_mixer include and library files.

When I start a build from the IDE, anyway, there are many compile errors:
a couple of C2065 undeclared identifier: 'snprintf','getline'

I checked and found that snprintf is defined in msvc_kludges.h (#define snprintf _snprintf....) and _snprintf is in stdio.h, which is included in the compilation. getline is in expack.cc.
So?

Error C1083: Cannot open include file: 'data/exult_bg_flx.h' or Cannot open include file: 'exult_flx.h'
These files are not present.

But what makes me think I'm really missing something stupid is that the compiler reports even some syntax errors.

So, if you started laughing immediately after you began reading the message since you immediately realize which stupid mistake I did, feel free to tell me I am whatever you want, together with a line telling me why. In other words, what I am doing wrong. You'll will earn an eight toward Avatarhood ;-)


TIA

Re: Newbie compile question #1000

Posted: Wed Mar 12, 2003 1:39 am
by wjp
First of all, you really don't want to compile Exult in MSVC :-)

On to the problems:

you'll probably need to auto-include msvc_kludges.h in all .cc files. I think MSVC has an option for that.

exult_flx.h (and related) are generated by expack when creating the exult.flx (and related) files. So you'll need to build expack first, then use expack to build exult.flx, exult_bg.flx and exult_si.flx. This will have generated exult_flx.h, exult_bg_flx.h and exult_si_flx.h.
After that you can build the rest of exult.

Re: Newbie compile question #1000

Posted: Wed Mar 12, 2003 3:25 am
by Fabrizio
Hi Wjp,
thanks again, once expack compiled correctly and run the missing .h were there.

I also had to change somehow msvc_kludges.h to have snprintf declared; the undeclared identifier disappeared.

There are anyway other errors left , but I really have to give up now.
Thanks for the suggestions.

>First of all, you really don't want to compile Exult in MSVC :-)

Now I understand what you mean...

Re: Newbie compile question #1000

Posted: Wed Mar 12, 2003 3:34 am
by Dominus
Following the instructions in Readme.win32 it is fairly "painless" to compile Exult with Mingw/Msys.
Personally I'd recommend that as many OpenSource projects are compilable with Mingw (especially the ones concerning Ultima :-)

Re: Newbie compile question #1000

Posted: Wed Mar 12, 2003 4:24 am
by Fabrizio
>Following the instructions in Readme.win32 it is fairly "painless" to compile
>Exult with Mingw/Msys

It's absolutely painless! The time required to have a working exult.exe was just compilation time.

Many, many thanks to both of you.
I'll always be curious, anyway, to see one day a working Exult compilation/linking session under MSVC.
I'll keep trying when I'll have some time left... a good chance to learn something.