• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Solved Compile error on startup

Mad Jack Wolfe

Master Mariner
Storm Modder
Pirate Legend
OK, this one has me stymied. I started over with a completely fresh install of PotC, then installed the latest Build 14 (beta 4,1) files with the extra fix archive. I am rewarded for my efforts with an error every attempted launch --

error.log
COMPILE ERROR - file: characters\characters.h; line: 46
define redefinition: PASSENGERS_MAX


system.log
Scanning modules\
Loading modules...
Loaded 0
Reset...
Initializing CORE...
Creating atoms space: 128
done
initializing complete
User Rised Exception
C:\PROJECTS\DRIVE_V2\ENGINE\SOURCES\Core.cpp line 526
fail to create program


I've taken all the prescribed precautions: installing to C:\Games, appropriate Visual C++ runtimes installed. My system is running 64-bit Windows 10 (with latest updates), 32 GB RAM, nVidia GTX 1050 Ti SC video card.

Any ideas as to how I might escape these accursed becalmed waters?
 
It does sound like an installation error of some kind.
Did you install the EXE from the link in my signature?
Try that before installing the extra ZIP and see if that works.
 
It does sound like an installation error of some kind.
Did you install the EXE from the link in my signature?
Try that before installing the extra ZIP and see if that works.
I followed the installation instructions to the letter, mate. Followed your link to the needed files to be sure. Triple checked. I'll start over again from scratch, and test after each step.
 
Progress thus far: I installed the base game from CD, and it launched just fine. Then I installed the patch executable. The game started well enough, but it seems to hate my dual monitor setup. Full screen is useless. Running in a window is workable at lower resolutions, but hopelessly split between two screens and off the bottom of both at higher resolutions. Same for the patch tar file. It will only run in a window, and full screen is completely black and unusable.

All this pretty much nails it down to the supplemental fix, but even so, I have a game that isn't really playable at a reasonable resolution.
 
Set your desktop resolution in windowed mode.
If Config.exe doesn't let you, you can edit engine.ini manually using Notepad.

Of course resolution issues are unrelated to the mod.
It is just that silly game engine. :facepalm
 
It's definitely the supplemental fix pack that's breaking the game for me. Oh well. I'll just move on to AoP2 and Sea Dogs: TEHO then. Thanks for the suggestions.
 
It's definitely the supplemental fix pack that's breaking the game for me. Oh well. I'll just move on to AoP2 and Sea Dogs: TEHO then. Thanks for the suggestions.
Which supplemental fix pack are we talking?
The EXE or the ZIP? I haven't used the ZIP myself yet, but the latest EXE at least works fine.
 
There is something odd going on here. Before 7th January, global variable PASSENGERS_MAX was defined in "PROGRAM\Characters\characters.h". The 7th January installer moves the definition into "PROGRAM\globals.c". The post 7th January fixes archive has its own version of "globals.c" so that it has a different version number, forcing a new game, and also shows a different install date.

So if you install the game with the proper 7th January installer and then copy the fixes archive into place, there should be no mention of "PASSENGERS_MAX" in "characters.h". My guess, then, is that @Mad Jack Wolfe has used an older installer with the older version of "characters.h", then copied the post 7th January zip archive into place along with its version of "globals.c", resulting in "PASSENGERS_MAX" being defined in two places, which is the error shown in the first post of this thread.

@Mad Jack Wolfe: the easy fix for this particular error is to edit "PROGRAM\Characters\characters.h", find the line '#define PASSENGERS_MAX 32' and delete it. However, if you've copied the zip archive onto the wrong version of the game, there may be more problems later.
 
So if you install the game with the proper 7th January installer and then copy the fixes archive into place, there should be no mention of "PASSENGERS_MAX" in "characters.h". My guess, then, is that @Mad Jack Wolfe has used an older installer with the older version of "characters.h", then copied the post 7th January zip archive into place along with its version of "globals.c", resulting in "PASSENGERS_MAX" being defined in two places, which is the error shown in the first post of this thread.
That indeed sounds like the most plausible explanation. :yes
 
There is something odd going on here. Before 7th January, global variable PASSENGERS_MAX was defined in "PROGRAM\Characters\characters.h". The 7th January installer moves the definition into "PROGRAM\globals.c". The post 7th January fixes archive has its own version of "globals.c" so that it has a different version number, forcing a new game, and also shows a different install date.

So if you install the game with the proper 7th January installer and then copy the fixes archive into place, there should be no mention of "PASSENGERS_MAX" in "characters.h". My guess, then, is that @Mad Jack Wolfe has used an older installer with the older version of "characters.h", then copied the post 7th January zip archive into place along with its version of "globals.c", resulting in "PASSENGERS_MAX" being defined in two places, which is the error shown in the first post of this thread.

@Mad Jack Wolfe: the easy fix for this particular error is to edit "PROGRAM\Characters\characters.h", find the line '#define PASSENGERS_MAX 32' and delete it. However, if you've copied the zip archive onto the wrong version of the game, there may be more problems later.
Thank you! That makes a lot of sense. I was certain I'd downloaded the latest files, but obviously that was not the case. I'll grab the files again just to be on the safe side.

By the way, if the Build team are interested in having someone write installation packages, that's what I do to pay the bills. I've got over 17 years of experience and would be happy to help out.
 
By the way, if the Build team are interested in having someone write installation packages, that's what I do to pay the bills. I've got over 17 years of experience and would be happy to help out.
Some help there would certainly be welcome!
I have the installation method working pretty well, but I am the only person who knows how to do it and I just haven't got the time to make a new one.
But I think we do NEED a new one that includes all @Grey Roger's and @Jack Rackham's latest work.
If you could help make that happen, perhaps we could push an update to ModDB again, which would definitely be a good idea. :onya
 
My problem was indeed outdated files. The game launches perfectly now. For some reason, running it in windowed mode causes it to appear split between the two monitors with the bottom half completely off the screen. The utility WindowedBorderlessGaming helps to mostly correct the problem, but it can be a little flaky. If I can get it to behave consistently, I'll post any tips.

As for making a new installer, I can use NSIS or InstallShield. NSIS would probably be the better choice since it's open source, in case it needs to get handed off to someone else along the line. @Pieter Boelen, if you would be kind enough to send me the NSIS script, I can get started on it this weekend.
 
My problem was indeed outdated files. The game launches perfectly now. For some reason, running it in windowed mode causes it to appear split between the two monitors with the bottom half completely off the screen. The utility WindowedBorderlessGaming helps to mostly correct the problem, but it can be a little flaky. If I can get it to behave
Try setting ENGINE.exe to Windows Vista Service Pack 2 compatibility mode.
I think that's what I did to get it to behave for me.

As for making a new installer, I can use NSIS or InstallShield. NSIS would probably be the better choice since it's open source, in case it needs to get handed off to someone else along the line. @Pieter Boelen, if you would be kind enough to send me the NSIS script, I can get started on it this weekend.
NSIS should be fine; I've been using that for years as well.
I'll look up the files and post them here.
 
The compatibility mode adjustment did the trick! Thanks for that. :onya

And thanks in advance for looking up the scripts. I'm looking forward to helping out.
 
The compatibility mode adjustment did the trick! Thanks for that. :onya
Glad to hear it was apparently the same annoyance I ran into myself.
That one indeed IS annoying if it isn't disabled! :shock

And thanks in advance for looking up the scripts. I'm looking forward to helping out.
Got it: Dropbox - All_Installer_Files.zip

I think that should be all relevant files (and then some).
Included is everything to replicate the latest Installer EXE from 7 January 2017.
The main file is "b14_beta4_final_installer.nsi" . I hope it makes sense to you. :doff
 
Glad to hear it was apparently the same annoyance I ran into myself.
That one indeed IS annoying if it isn't disabled! :shock


Got it: Dropbox - All_Installer_Files.zip

I think that should be all relevant files (and then some).
Included is everything to replicate the latest Installer EXE from 7 January 2017.
The main file is "b14_beta4_final_installer.nsi" . I hope it makes sense to you. :doff
Thank you! If I have any questions, I'll be sure to let you know.
 
Back
Top