• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling [OTCLIENT] PHYSFS ERROR

jo31

New Member
Joined
May 24, 2010
Messages
70
Reaction score
1
Location
Sweden
Hey!

i have been try to compile otclient but got the error that you can read down below, i have tried for hours to figure out why it dosent work kind of new to this.
Would be so glad if someone help me with instruction i use Windows operativ system and software visual studio.

Code:
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(169,29): error C2065: 'PHYSFS_FILETYPE_DIRECTORY': undeclared identifier
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(190,112): error C3861: 'PHYSFS_getLastErrorCode': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(190,90): error C3861: 'PHYSFS_getErrorByCode': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(194,5): error C3861: 'PHYSFS_readBytes': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(204,46): error C3861: 'PHYSFS_getLastErrorCode': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(204,24): error C3861: 'PHYSFS_getErrorByCode': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(208,5): error C3861: 'PHYSFS_writeBytes': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(237,112): error C3861: 'PHYSFS_getLastErrorCode': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(237,90): error C3861: 'PHYSFS_getErrorByCode': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(245,114): error C3861: 'PHYSFS_getLastErrorCode': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(245,92): error C3861: 'PHYSFS_getErrorByCode': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(253,114): error C3861: 'PHYSFS_getLastErrorCode': identifier not found
1>C:\Users\sulta\Desktop\test\otclient-master\src\framework\core\resourcemanager.cpp(253,92): error C3861: 'PHYSFS_getErrorByCode': identifier not found
 
Well i did fix it then it came up other error with whole new things and when i fix them to i came back to new error with same name

6b0462e8761a7bdeccb264b06ea5e348.png

I use Visual Studio 2015
 
Last edited:
The first looks like the compiler invocation params didn't include the physfs headers
The second looks like the physfs dll wasn't included in the linker invocation params, and so the linker stops with a fatal error. It must be able to confirm the functions called by the program actually exist in the dynamically linked library. However, as the binary is going to be dynamically linked, there should be a way to bypass that check and link the executable anyway. Still would be a good idea to find out why the linker can't find the dll.
 
your configuration is probably using old otc-sdk and vcpkg or the installed packages might not be up to date

run the following commands from the vcpkg directory to update vcpkg and it's packages:
Code:
git pull
vcpkg remove --outdated --recurse
bootstrap-vcpkg.bat
vcpkg update
vcpkg upgrade --no-dry-run
copy paste the vcpkg install from the OTClient Wiki
Code:
vcpkg integrate install

to check whether you are using old otc-sdk
in msvc go to
Project -> properties
C/C++ -> additional include directories
remove $(OTCLIENT_INCLUDES)
Linker -> additional library directories
remove $(OTCLIENT_LIBS)

Note: this should be done for both platforms (x32 and x64)
you may have to re-open MVS for it to refresh external dependencies

Edit:
The above did work when compiling x64 (endless warnings but w/e).
Got a bunch of linker errors "LNK2001 unresolved external symbol" when trying to build x32 later on.
The linker errors could be due to the fact that I upgraded msvc from 2017 to 2019 but I'm not sure.
There's some info about it here. I haven't given it a proper read yet.

Hopefully the linker errors are specific to my setup and not something you have to worry about.
 
Last edited:
i have tried to compile with physfs 2.0 version, which i think is the old otc-sdk, with vc2015. I've noticed that physfs later than 2.1 uses physfs_readbytes() function insted of physfs_read() (the same with write function), so i have installed the physfs 3.0 but now i have to compile the lib with the src files of this new version. After this, i gave up. I think i should compile using vc2017 or maybe try again vc2015 with vcpkg (dont know if it works either).
 
Oh, if it's because APIs changed, just patch em. Are you using edubart or otland fork of otclient?

Yep, the API has changed. I had the same problem here.

@jo31 Just download and compile physfs-3*. Then, update it in the old SDK. It should compile fine.
But you'll probably face any other problem. So, if you're using the old sdk, it's better to pick an old otc version too.
 
Back
Top