• 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!

Unable to compile OTClient

Yalasari

Active Member
Joined
Jul 16, 2017
Messages
82
Solutions
8
Reaction score
46
Hi,

I have troubles in compiling otclient with Visual Studio 2017, i got following errors:
Przechwytywanie.PNG

I tried almost everything what i found in internet.

I would be very grateful if anyone would help me with that problem.

Thanks in advance
 
i found out that problem is with zlib (apngloader.obj), i would really appreciate if someone help me.
 
Hello there,

follow the Github Compilation Guide for Windows, it can be found here: edubart/otclient

I edited the page for a better guidance while using MSVS2015. I also added the support for DX9, you can find the libraries on my Github-Page: edubart/otclient

If you need further help please keep me updated on your issues :')

Kindest Regards,
Okke
 
i might be out of the blue here but for me it seem ure using non correct version of the lib, if ure compiling 64 u need 64 libs and opposite for 32.or maybe its just as simple u just need to change platform toolset general->platform toolset . this can produce nasty shit try 2015(v149),happend to me sometimes xd.

that link error points that u have same windows lib added twice but diferent version (yup read it all it also might solve your problem)
most likely it is this


There are 4 versions of the CRT link libraries present in vc\lib:

  • libcmt.lib: static CRT link library for a release build (/MT)
  • libcmtd.lib: static CRT link library for a debug build (/MTd)
  • msvcrt.lib: import library for the release DLL version of the CRT (/MD)
  • msvcrtd.lib: import library for the debug DLL version of the CRT (/MDd)
Look at the linker options, Project + Properties, Linker, Command Line. Note how these libraries are not mentioned here. The linker automatically figures out what /M switch was used by the compiler and which .lib should be linked through a #pragma comment directive. Kinda important, you'd get horrible link errors and hard to diagnose runtime errors if there was a mismatch between the /M option and the .lib you link with.

You'll see the error message you quoted when the linker is told both to link to msvcrt.lib andlibcmt.lib. Which will happen if you link code that was compiled with /MT with code that was linked with /MD. There can be only one version of the CRT.

/NODEFAULTLIB tells the linker to ignore the #pragma comment directive that was generated from the /MT compiled code. This might work, although a slew of other linker errors is not uncommon. Things like errno, which is a extern int in the static CRT version but macro-ed to a function in the DLL version. Many others like that.

Well, fix this problem the Right Way, find the .obj or .lib file that you are linking that was compiled with the wrong /M option. If you have no clue then you could find it by grepping the .obj/.lib files for "/MT"

well that was alot but tried make it as human readable as possible xd
 
I really have no idea what actually happened but it worked, lol.
After 3 hours of frustration i found solution (i think)

Well, I deleted "ZLIB_WINAPI" from Project Settings > C/C++ > Preprocessor > Preprocessor Definitions
popopo.PNG
There should be "ZLIB_WINAPI" but i deleted it
And it just worked, no idea why but it worked. ._.

@Edit
I also added "/NODEFAULTLIB:msvcrt" in Linker > Command Line

Thanks everyone for help <3
 
Last edited:
Back
Top