MSVC
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
-
- Site Admin
- Posts: 731
- Joined: Thu May 14, 2020 1:34 pm
Re: MSVC
What version of MSVC are you using? Also, what do you mean by crash?
-Colourless Dragon
-Colourless Dragon
Re: MSVC
I should of said it crashes the IDE(I am using MSVC 6.0).
Well I managed to open the project by only opening the exult.dsw, if you try to open any of the .dsp files the IDE crashes.
With a bit of tinkering I managed to get exult(by itself) to compile, but it fails to link.
And i get
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
I don't know what this means.
And I also can't compile expack and I get the error
Build : warning : failed to (or don't know how to) build 'C:\temp\exult\tools\expack.exe'
Maybe someone should update the README.win32 file to show how to compile with MSVC.
Any help would be welcome
Well I managed to open the project by only opening the exult.dsw, if you try to open any of the .dsp files the IDE crashes.
With a bit of tinkering I managed to get exult(by itself) to compile, but it fails to link.
And i get
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
I don't know what this means.
And I also can't compile expack and I get the error
Build : warning : failed to (or don't know how to) build 'C:\temp\exult\tools\expack.exe'
Maybe someone should update the README.win32 file to show how to compile with MSVC.
Any help would be welcome
Re: MSVC
Yes, I think Colourless needs to put some info into the readme.win32 on what you need to compile Exult with MSVC. You need sdl and zlib and that´s where it failed on you (probably)...
--
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!
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!
Re: MSVC
I suggest NOT to use MSVC IDE and .DSP for Exult.
For me (and MSVC editor + BUILD tool are my primary tools) - .DSPs are only from projects generated by MSVC wizards like MFC or ATL.
I do not like using .DSP for manually created projects. Why not use good old .MAK? NMAKE from MSVC is 95% same as GNU make.
So - if you want the thing to be built by MSVC compiler - then yes, but not from IDE. Run NMAKE from command line.
For me (and MSVC editor + BUILD tool are my primary tools) - .DSPs are only from projects generated by MSVC wizards like MFC or ATL.
I do not like using .DSP for manually created projects. Why not use good old .MAK? NMAKE from MSVC is 95% same as GNU make.
So - if you want the thing to be built by MSVC compiler - then yes, but not from IDE. Run NMAKE from command line.
Re: MSVC
Whenever i open one of the .dsp with MSVC 6.0 it just remarks the finding of an adequate .dsw and opens that instead.
Just an attention message, but no crash, so maybe your MSVC itself is not feeling well?
It seems to me, with a little time you can figure it all out, but a little MSVC guidance would really be nice to give a start.
Just an attention message, but no crash, so maybe your MSVC itself is not feeling well?
It seems to me, with a little time you can figure it all out, but a little MSVC guidance would really be nice to give a start.
-
- Site Admin
- Posts: 731
- Joined: Thu May 14, 2020 1:34 pm
Re: MSVC
Ok, the crash is being caused by MSVC screwing up because it cant find all the projects or something. It was happening to me too when I attempted to load the source snapshot.
Anyway, don't manually load the individual Project DSP files. You'll get missing headers. What you need to do is "File->Open Workspace" and then choose Exult.dsw from the msvcstuff dir. That's it and you should be ok to go. Then choose the Exult project using the Win32 Debug or Win32 Release configuration. The usage of the Install configurations is documented in the now update README.win32.
You will also need to SDL and ZLib and include them in MSVCs Search Paths (Tools->Options->Directories->Include Files and Library Files).
I personally use MSVC6.0 to edit, compile and debug Exult.
NOTE: The current snapshots wont compile as one project is missing. Additionally, one of the others files had Unix style lines breaks in the source zip. Also the Workspace had an extra project that wasn't meant to be there. This has all now been fixed in CVS.
So, you will need to either download all the files using CVS, wait for the next snapshot, or the release.
-Colourless Dargon
Anyway, don't manually load the individual Project DSP files. You'll get missing headers. What you need to do is "File->Open Workspace" and then choose Exult.dsw from the msvcstuff dir. That's it and you should be ok to go. Then choose the Exult project using the Win32 Debug or Win32 Release configuration. The usage of the Install configurations is documented in the now update README.win32.
You will also need to SDL and ZLib and include them in MSVCs Search Paths (Tools->Options->Directories->Include Files and Library Files).
I personally use MSVC6.0 to edit, compile and debug Exult.
NOTE: The current snapshots wont compile as one project is missing. Additionally, one of the others files had Unix style lines breaks in the source zip. Also the Workspace had an extra project that wasn't meant to be there. This has all now been fixed in CVS.
So, you will need to either download all the files using CVS, wait for the next snapshot, or the release.
-Colourless Dargon
Re: MSVC
Well I am using a snapshot about 2 weeks old, so I really don't need ZLib at the moment and I have the SDL libraries. I looked through the SDL header files and it doesn't have the function _mainCRTStartup.
I only use the MSVC IDE for the ease of debuging, it will also help me to understand what you are doing, as a few years ago I wrote my own flex viewer and displayed the shape files with DirectDraw and when using palettes ended up being way too dark so I gave up.
I think I might make my own project files and see what I can do.
Cheers,
Aussie Dragon
I only use the MSVC IDE for the ease of debuging, it will also help me to understand what you are doing, as a few years ago I wrote my own flex viewer and displayed the shape files with DirectDraw and when using palettes ended up being way too dark so I gave up.
I think I might make my own project files and see what I can do.
Cheers,
Aussie Dragon
I also have an U7 world viewer...
...no DirectDraw is necessary for it at all!
Good old StretchDIBits function is enough to copy the in-memory viewport to the on-screen window.
The performance is OK on old P166 machine.
Good old StretchDIBits function is enough to copy the in-memory viewport to the on-screen window.
The performance is OK on old P166 machine.
-
- Site Admin
- Posts: 731
- Joined: Thu May 14, 2020 1:34 pm
Re: I also have an U7 world viewer...
Make you're own project files... have fun... or not as the case will be.
-Colourless Dragon
-Colourless Dragon
Linking in MSVC
I'm not sure, but I think that _mainCRTStartup is the default entry point symbol that VC++ attempts to link to in every console project. Supposing your compiling using the .dsp options (Project Settings in the main menu), you can somehow force MSVC to use a different entry point. I don't remember exactly where it is, but it should be under the Linker tab somewhere. If you put the correct entry point there it should agree to link.
Re: Linking in MSVC
Finally found what was wrong.
I didn't have MSVC to recognise the .cc files.
How to do this should be in the readme.win32.
Still haven't been able to compile exult but I am getting closer all the time.
I didn't have MSVC to recognise the .cc files.
How to do this should be in the readme.win32.
Still haven't been able to compile exult but I am getting closer all the time.
Re: SDL Probs
Sorry I forgot to include the SDL.dll in the same directory as exult.exe, and it all works now.