problems compiling exult with MinGW

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Marc
Posts: 6
Joined: Thu May 14, 2020 1:34 pm

problems compiling exult with MinGW

Post by Marc »

Hi!

I tried to compile EXULT with MinGW as stated in the README.win32 that came with the source code.
After a bit of searching I managed to get ?all? the necessary files to compile the source (SDL, SDLmixer, Zlib).

But my SDLmain.lib won't work correctly.

MSYS shows this error:

SDLmain.lib(./Release/SDL_main.obj)(.text+0x0):C:\SDL\SDL12\Src\M:
multiple definition of 'main'

and:

undefined reference to '_alloca_probe'

I can't remeber where I found SDLmain.lib but I know that compiling SDL would be a lot of work (downloading DirectX source is about 220 MB).

Can someone provide me with information how to compile EXULT? Or where I can find a working SDLmain.lib?

I use WinXP and MinGW to compile.

Thanx!
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Dominus »

why don't sou use the download links provided in the readme.win32? Or tell uy which links didn't work anymore.
Just a note you shouldn't use a downloadmanager if the link points to a file on sourceforge.net...
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by wjp »

> After a bit of searching

what couldn't you find? README.win32 should list all files you need along with where you can get them.

Did you get an SDL suitable for msys/mingw compilation?
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Dominus »

To build in Windows using MinGW
-----------------------------------
(Thanks to Travis Howell)

Download MinGW from:
http://prdownloads.sourceforge.net/ming ... 4-1.tar.gz
http://prdownloads.sourceforge.net/ming ... 6-2.tar.gz
http://prdownloads.sourceforge.net/ming ... 3.0.tar.gz
http://prdownloads.sourceforge.net/ming ... 2.3.tar.gz

Create a directory called mingw in the root directory of drive
(ie C:\mingw\ )

Extract the MinGW files into the mingw directory in the follow order!
gcc-3.2.3-20030504-1.tar.gz
binutils-2.13.90-20021006-2.tar.gz (Overwrite any existing files)
mingw-runtime-3.0.tar.gz
w32api-2.3.tar.gz

Download and install MSYS from:
http://prdownloads.sourceforge.net/mingw/MSYS-1.0.8.exe

Download the SDL binaries & headers from:
http://exult.info/snapshots/exult_sdl_win32.zip
Unzip this file into the main directory of Exult source code. (it should add a SDL subdirectory)

Download the other required developer tools from:
http://exult.info/snapshots/exult_dev_win32.zip
Unzip this file into the MinGW directory.

If you want to compile Exult Studio get the additional required developer tools from:
http://exult.info/snapshots/exult_studio_dev_win32.zip
Unzip this file into the MinGW directory.

Start MSYS

Change to the directory where you unpacked the Exult source code.
(ie cd C:/exult )

Open makefile.mingw from the Exult directory in a text editor and change C:/Ultima7 to the directory you want Exult to be installed to.
(ie C:/Games/Ultima7 )

If you are compiling Exult Studio, open makefile.studio.mingw from the Exult directory in a text editor and change C:/Ultima7 to the directory you want Exult Studio to be installed to.
(It must be the same directory that Exult is installed into to!)
(ie C:/Games/Ultima7 )

Type 'make -f makefile.mingw install' without quotes to compile and install Exult for Windows

Type 'make -f makefile.mingw toolsinstall' without quotes to compile and install the Exult Tools for Windows

Type 'make -f makefile.studio.mingw install' without quotes to compile and install Exult Studio for Windows
Copy over the required library files (*.dll) from the bin directory of MinGW to the installation directory of Exult Studio

Once compile has finished and been installed exit MSYS

Run Exult.exe and enjoy the game :-)
now which file needed hunting down?
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Marc
Posts: 6
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Marc »

Yes, I have read this file as I've said before. The links work properly. And it helped me a lot...
But that isn't exactly my problem.
I think I have all the files I need, but still the compiler complains about the SDLmain.lib. This file is NOT missing! The compiler just doesn't seem to like that file.

-----------------------------
This is my problem:

MSYS shows this error:

SDLmain.lib(./Release/SDL_main.obj)(.text+0x0):C:\SDL\SDL12\Src\M:
multiple definition of 'main'

and:

undefined reference to '_alloca_probe'
-----------------------------

So I think another SDLmain.lib should solve my problem, but I'm not able to compile the SDL sourcecode on my own.

These are the files I've used:
SDL and SDL_mixer:
http://www.libsdl.org/release/SDL-1.2.5.zip
http://www.libsdl.org/release/SDL-1.2.5a-win32.zip
http://www.libsdl.org/projects/SDL_mixe ... -1.2.5.zip
http://www.libsdl.org/projects/SDL_mixe ... -win32.zip

Zlib:
ftp://ftp.info-zip.org/pub/infozip/zlib/zlib.zip

Compiler and MSYS:
http://prdownloads.sourceforge.net/ming ... 4-1.tar.gz
http://prdownloads.sourceforge.net/ming ... 6-2.tar.gz
http://prdownloads.sourceforge.net/ming ... 3.0.tar.gz
http://prdownloads.sourceforge.net/ming ... 2.3.tar.gz
http://prdownloads.sourceforge.net/mingw/MSYS-1.0.8.exe

Still there seems to be no SDLmain.lib that is useable with MinGW.

Thanx for your help!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by wjp »

quote from README.win32:

----
Download the SDL binaries & headers from:
http://exult.info/snapshots/exult_sdl_win32.zip
Unzip this file into the main directory of Exult source code. (it should add a SDL subdirectory)
----
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Dominus »

get rid of all other instances of sdl you have put somewhere...
Only use the one the readme.win32 points you to and put that into the exult source code (you should end up with a sdl sub dir in that dir)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Marc
Posts: 6
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Marc »

Awwwwwwwww, that did it!
Thanks a lot!

Would be great if you put that file on the download page under libraries, too. It's easy to forget that one and get confused with the files form www.libsdl.org!
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Dominus »

no, no need for that. As long as people READ the readme and not just flip over it there is no problem. On the download page we don't list any of the files needed for compiling except the source itself.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by wjp »

it's only necessary if you want to compile Exult yourself, which is why it's only in the compilation instructions.
Marc
Posts: 6
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Marc »

But the link on the download page is somewhat misleading...
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Dominus »

which link?
We only have binary files (compiled versions of Exult, Studio, tools), data files and the source code on our download page. The compiler itself and the stuff nedded for compiling other than the Exult source code has noreason to be there. It all boils down to people not READING...
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Wizardry Dragon »

Not that people not reading would ever bother Dominus... :)

~ Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Dominus »

:-)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Marc
Posts: 6
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by Marc »

This is the link:

http://www.libsdl.org/download-1.2.html

It will forward you directly to:

http://www.libsdl.org/release/SDL-1.2.5.tar.gz
http://www.libsdl.org/release/SDL-1.2.5-1.i386.rpm
http://www.libsdl.org/release/SDL-1.2.5a-win32.zip
http://www.libsdl.org/release/SDL-1.2.5.pkg.tar.gz
http://www.libsdl.org/release/SDL-devel-1.2.5a-VC6.zip

and so on...

It's on the download page under libraries.


I think it might be easier to put

http://exult.info/snapshots/exult_dev_win32.zip

there.

I'm sorry to say, but people tend to skip rather large parts of your documentation. Don't take that personal. We're just a bit ... lazy ;-)
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: problems compiling exult with MinGW

Post by wjp »

exult_dev_win32.zip is only for people compiling with mingw32. It makes very little sense to put just that on our links page. If we do that, we'd also have to put the msvc windows package, redhat rpm, etc, etc... on our links page.
Locked