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

OTClient otclient error

Sekinpu

New Member
Joined
Jul 7, 2020
Messages
26
Solutions
1
Reaction score
1
Welcome i have a little problem :)


1>------ Build started: Project: otclient, Configuration: Release Win32 ------
1>graphicalapplication.cpp
1>lbitlib.cpp
1>luainterface.cpp
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(49,1): warning C4005: 'LUA_UNSIGNED': macro redefinition
1>C:\vcpkg\installed\x86-windows\include\luaconf.h(537): message : see previous definition of 'LUA_UNSIGNED' (compiling source file ..\src\framework\luaengine\lbitlib.cpp)
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(85,22): error C2371: 'lua_Unsigned': redefinition; different basic types
1>C:\vcpkg\installed\x86-windows\include\lua.h(96): message : see declaration of 'lua_Unsigned'
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(161,1): warning C4005: 'luaL_newlib': macro redefinition
1>C:\vcpkg\installed\x86-windows\include\lauxlib.h(120): message : see previous definition of 'luaL_newlib' (compiling source file ..\src\framework\luaengine\lbitlib.cpp)
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(272,47): error C3861: 'luaL_checkint': identifier not found
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(277,48): error C3861: 'luaL_checkint': identifier not found
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(283,11): error C3861: 'luaL_checkint': identifier not found
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(307,19): error C3861: 'luaL_checkint': identifier not found
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(312,20): error C3861: 'luaL_checkint': identifier not found
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(321,11): error C3861: 'luaL_checkint': identifier not found
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(322,11): error C3861: 'luaL_optint': identifier not found
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(347,9): warning C4244: 'initializing': conversion from 'unsigned __int64' to 'int', possible loss of data
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.cpp(372,3): error C3861: 'luaL_register': identifier not found
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\lbitlib.h(28,33): warning C4273: 'luaopen_bit32': inconsistent dll linkage (compiling source file ..\src\framework\luaengine\luainterface.cpp)
1>C:\vcpkg\installed\x86-windows\include\lualib.h(39,17): message : see previous definition of 'luaopen_bit32' (compiling source file ..\src\framework\luaengine\luainterface.cpp)
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\luainterface.cpp(897,5): error C3861: 'lua_getfenv': identifier not found
1>C:\Users\Sekin\OneDrive\Pulpit\otclient-master\src\framework\luaengine\luainterface.cpp(903,5): error C3861: 'lua_setfenv': identifier not found
1>Done building project "otclient.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
I just had the same problem:

'lua_Unsigned': redefinition; different basic types

followed by a whole list of errors like:

Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier luaL_checkint is undefined otclient D:\DATA\client\otclient-master\src\framework\luaengine\lbitlib.cpp 272

but I managed to resolve theese issues and successfully compile+run this otclient, so I decided to share my experience mainly bacause I've spent whole day yesterday digging across otland for solution. Well perhaps you or someone else in the future will find it useful.

I'm using Visual Studio 2019 Community, vcpkg 20.01 from the master branch and 64bit version of edubart otclient.


My first attempt was: (Do not follow theese steps!)
-------------------------------------------------------------------------
In file: otclient-master\src\framework\luaengine\lbitlib.cpp I added:

#define luaL_checkint
#define luaL_optint
#define luaL_register

In the same file I deleted line:
LUA_UNSIGNED lua_Unsigned; (file lua.h has the same definition)

In file: otclient-master\src\framework\luaengine\luainterface.cpp I added:
#define lua_getfenv
#define lua_setfenv

This solves mentioned compilation errors and leads to:

Error LNK1181 cannot open input file lua51.lib otclient D:\DATA\client\otclient-master\vc14\LINK 1

I searched my hard drives for this file or lua5.1.lib but I didn't find any of these. Finally I got one from the internet.
I have rebuilt my solution and it copiled without an error.

But otclient.exe didn't want to start. Thus solution number one is not working.
-----------------------------------------------------------------------


Attempt nr2 (this one worked):
-------------------------------------------------------------------------
I decided to dig deeper in search of an answers and after a long battle with stackoverflow bullshittery. (People tend to advice others to reinstall windows or something totally irrelevant like buying better power supply) I've found a gold nugget: An advice to check firewall rules. Yes this damn piece of junk blocked one of vcpkg processes (I'm using comodo). Vcpkg didn't even mention about any problems during libraries installation, so I didn't notice that something is wrong.

I dropped this rule
once again i fired out:

./vcpkg install boost-iostreams:x64-windows boost-asio:x64-windows boost-system:x64-windows boost-variant:x64-windows boost-lockfree:x64-windows luajit:x64-windows glew:x64-windows boost-filesystem:x64-windows boost-uuid:x64-windows physfs:x64-windows openal-soft:x64-windows libogg:x64-windows libvorbis:x64-windows zlib:x64-windows opengl:x64-windows

I made a new project in visual studio for otclient to purge my failures.
Then: Build Solution
and it works.
-------------------------------------------------------------------------
 
Glad it worked.
In my case I didn't have to include anything manually. Perhaps it's due to silght differences in lib versions? I don't know.
 
Back
Top