Toksisitee/ALACNPopWorldEditor

Build

Closed this issue · 1 comments

Hi, how do I build this? I installed tdm-gcc and I ran "g++ *.cpp -o output", but it did not work.

Error:

In file included from std.h:11,
from 3ds.cpp:10:
enet\enet.h:16:10: fatal error: enet/win32.h: No such file or directory
16 | #include "enet/win32.h"
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from std.h:11,
from dialogs.cpp:10:
enet\enet.h:16:10: fatal error: enet/win32.h: No such file or directory
16 | #include "enet/win32.h"
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from std.h:11,
from engine.cpp:10:
enet\enet.h:16:10: fatal error: enet/win32.h: No such file or directory
16 | #include "enet/win32.h"
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from std.h:11,
from log.cpp:10:
enet\enet.h:16:10: fatal error: enet/win32.h: No such file or directory
16 | #include "enet/win32.h"
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from std.h:11,
from network.cpp:1:
enet\enet.h:16:10: fatal error: enet/win32.h: No such file or directory
16 | #include "enet/win32.h"
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from pop.cpp:1:
pop.h:1144:2: error: 'CHAR' does not name a type
1144 | CHAR Name[32];
| ^~~~
pop.h:1166:2: error: 'CHAR' does not name a type
1166 | CHAR Script2[MAX_NUM_SCRIPT2][MAX_LENGTH_SAVE_NAMEv2];
| ^~~~
pop.h:1255:2: error: 'WORD' does not name a type; did you mean 'SWORD'?
1255 | WORD PosX,
| ^~~~
| SWORD
pop.h:1263:3: error: 'DWORD' does not name a type; did you mean 'SWORD'?
1263 | DWORD Bluff[12];
| ^~~~~
| SWORD
pop.h:1271:2: error: 'WORD' does not name a type; did you mean 'SWORD'?
1271 | WORD GroundHeight[128 * 128];
| ^~~~
| SWORD
pop.h:1272:2: error: 'BYTE' does not name a type; did you mean 'SBYTE'?
1272 | BYTE NoAccessSquares[128 * 128];
| ^~~~
| SBYTE
pop.h:1279:2: error: 'WORD' does not name a type; did you mean 'SWORD'?
1279 | WORD GroundHeight[128 * 128];
| ^~~~
| SWORD
pop.h:1280:2: error: 'BYTE' does not name a type; did you mean 'SBYTE'?
1280 | BYTE LandBlocks[128 * 128];
| ^~~~
| SBYTE
pop.h:1281:2: error: 'BYTE' does not name a type; did you mean 'SBYTE'?
1281 | BYTE LandOrients[128 * 128];
| ^~~~
| SBYTE
pop.h:1282:2: error: 'BYTE' does not name a type; did you mean 'SBYTE'?
1282 | BYTE NoAccessSquares[128 * 128];
| ^~~~
| SBYTE
pop.h:1293:2: error: 'CHAR' does not name a type
1293 | CHAR CreatedBy[32];
| ^~~~
pop.h:1294:2: error: 'CHAR' does not name a type
1294 | CHAR CreatedOn[28];
| ^~~~
pop.h:1328:2: error: 'DWORD' does not name a type; did you mean 'SWORD'?
1328 | DWORD flags;
| ^~~~~
| SWORD
pop.h:1344:2: error: 'DWORD' does not name a type; did you mean 'SWORD'?
1344 | DWORD flags;
| ^~~~~
| SWORD
In file included from std.h:11,
from popedt.cpp:9:
enet\enet.h:16:10: fatal error: enet/win32.h: No such file or directory
16 | #include "enet/win32.h"
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from std.h:11,
from script.cpp:10:
enet\enet.h:16:10: fatal error: enet/win32.h: No such file or directory
16 | #include "enet/win32.h"
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from std.h:11,
from script_compile.cpp:10:
enet\enet.h:16:10: fatal error: enet/win32.h: No such file or directory
16 | #include "enet/win32.h"
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from std.h:11,
from script_decompile.cpp:10:
enet\enet.h:16:10: fatal error: enet/win32.h: No such file or directory
16 | #include "enet/win32.h"
| ^~~~~~~~~~~~~~
compilation terminated.
user_storage.cpp: In function 'BOOL GetApplicationUserDataStorageDirectory(TCHAR*)':
user_storage.cpp:33:2: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
33 | strcpy_s(path_pos, strlen(POPULOUS_EDITOR_USER_DIRECTORY) + 1, POPULOUS_EDITOR_USER_DIRECTORY);
| ^~~~~~~~
| strcpy
user_storage.cpp: In function 'BOOL GetApplicationUserDataFilePath(const TCHAR*, TCHAR*)':
user_storage.cpp:51:2: error: 'strcat_s' was not declared in this scope; did you mean 'strcat'?
51 | strcat_s(path, sizeof(TCHAR) * MAX_PATH, file_name);
| ^~~~~~~~
| strcat

The project compiles out of the box with Visual Studio 2017 or the newest 2022 edition if you retarget the project (it will upgrade successfully).

In your case, specify the required include and library directories. However, there will be more errors to fix..
g++ -v -std=c++17 -IThirdParty -IThirdParty\DX2006\include -L\ThirdParty\enet\lib -L\ThirdParty\DX2006\Lib -c popedt.cpp -o popedt.o