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

[How-To] Solve a few compiling errors I came across

Tazzonny

The Bestest
Joined
Feb 8, 2009
Messages
161
Reaction score
2
Edit: If you happen to solve/have solved any compiling issue not posted on here please feel free to send me a PM and I'll add it.

So compiling has been giving me such a hard time lately so I would like to share solutions to some problems I came across.

Few important things beforehand:
*MSVC++ 2010 Express DOES NOT support compiling for 64 bits.

#1
Error:
PHP:
Cannot open include file: 'luajit.h': No such file or directory
Solution:
Save this as luajit.h and put it in your include folder
Code:
#ifndef _LUAJIT_H
#define _LUAJIT_H

#include "lua.h"

#define LUAJIT_VERSION		"LuaJIT 2.0.0-beta10"
#define LUAJIT_VERSION_NUM	20000  /* Version 2.0.0 = 02.00.00. */
#define LUAJIT_VERSION_SYM	luaJIT_version_2_0_0_beta10
#define LUAJIT_COPYRIGHT	"Copyright (C) 2005-2012 Mike Pall"
#define LUAJIT_URL		"http://luajit.org/"

/* Modes for luaJIT_setmode. */
#define LUAJIT_MODE_MASK	0x00ff

enum {
  LUAJIT_MODE_ENGINE,		/* Set mode for whole JIT engine. */
  LUAJIT_MODE_DEBUG,		/* Set debug mode (idx = level). */

  LUAJIT_MODE_FUNC,		/* Change mode for a function. */
  LUAJIT_MODE_ALLFUNC,		/* Recurse into subroutine protos. */
  LUAJIT_MODE_ALLSUBFUNC,	/* Change only the subroutines. */

  LUAJIT_MODE_TRACE,		/* Flush a compiled trace. */

  LUAJIT_MODE_WRAPCFUNC = 0x10,	/* Set wrapper mode for C function calls. */

  LUAJIT_MODE_MAX
};

/* Flags or'ed in to the mode. */
#define LUAJIT_MODE_OFF		0x0000	/* Turn feature off. */
#define LUAJIT_MODE_ON		0x0100	/* Turn feature on. */
#define LUAJIT_MODE_FLUSH	0x0200	/* Flush JIT-compiled code. */

/* LuaJIT public C API. */

/* Control the JIT engine. */
LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode);

/* Enforce (dynamic) linker error for version mismatches. Call from main. */
LUA_API void LUAJIT_VERSION_SYM(void);

#endif

Credits to: Myself

#2
Error:
PHP:
1>..\scriptmanager.cpp(147): error C2039: 'string' : is not a member of 'std::basic_string<_Elem,_Traits,_Ax>'
1>..\luascript.cpp(769): error C2039: 'string' : is not a member of 'std::basic_string<_Elem,_Traits,_Ax>'
Solution:
Upgrade your boost library to 1_51_0
I used the installer from Download Boost Library Here - BoostPro

Credits to: Loney

#3
Error:
PHP:
1>baseevents.obj : error LNK2001: unresolved external symbol xmlParseFile
1>baseevents.obj : error LNK2001: unresolved external symbol xmlDocGetRootElement
1>baseevents.obj : error LNK2001: unresolved external symbol xmlStrcmp
1>baseevents.obj : error LNK2001: unresolved external symbol xmlFreeDoc
Solution:
N/A

Credits to: N/A

#3
Error:
PHP:
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Solution: Downgrade .netFramework from 4.5 to 4.0
Credits: Myself

That's it for now.
Hope this helps someone.
 
Last edited:
Will be helpful for anyone that has similar issues listed on this thread, thanks :)
You should look for other compiling problems and add them up here.
 
Thanks, I'm about to compile around 10+ servers, this might become useful for me.
Thank you for supporting OTLand<3
 
You're welcome,
please feel free to private message me or reply here about any other problem you've solved that's not on the list.
 
You are right about the Solution: Downgrade .netFramework from 4.5 to 4.0.
I was able to compile the 5894 rev private. Thak you. at 64 bits! Very Cool!

Edit: If you happen to solve/have solved any compiling issue not posted on here please feel free to send me a PM and I'll add it.

So compiling has been giving me such a hard time lately so I would like to share solutions to some problems I came across.

Few important things beforehand:
*MSVC++ 2010 Express DOES NOT support compiling for 64 bits.

#1
Error:
PHP:
Cannot open include file: 'luajit.h': No such file or directory
Solution:
Save this as luajit.h and put it in your include folder
Code:
#ifndef _LUAJIT_H
#define _LUAJIT_H

#include "lua.h"

#define LUAJIT_VERSION		"LuaJIT 2.0.0-beta10"
#define LUAJIT_VERSION_NUM	20000  /* Version 2.0.0 = 02.00.00. */
#define LUAJIT_VERSION_SYM	luaJIT_version_2_0_0_beta10
#define LUAJIT_COPYRIGHT	"Copyright (C) 2005-2012 Mike Pall"
#define LUAJIT_URL		"http://luajit.org/"

/* Modes for luaJIT_setmode. */
#define LUAJIT_MODE_MASK	0x00ff

enum {
  LUAJIT_MODE_ENGINE,		/* Set mode for whole JIT engine. */
  LUAJIT_MODE_DEBUG,		/* Set debug mode (idx = level). */

  LUAJIT_MODE_FUNC,		/* Change mode for a function. */
  LUAJIT_MODE_ALLFUNC,		/* Recurse into subroutine protos. */
  LUAJIT_MODE_ALLSUBFUNC,	/* Change only the subroutines. */

  LUAJIT_MODE_TRACE,		/* Flush a compiled trace. */

  LUAJIT_MODE_WRAPCFUNC = 0x10,	/* Set wrapper mode for C function calls. */

  LUAJIT_MODE_MAX
};

/* Flags or'ed in to the mode. */
#define LUAJIT_MODE_OFF		0x0000	/* Turn feature off. */
#define LUAJIT_MODE_ON		0x0100	/* Turn feature on. */
#define LUAJIT_MODE_FLUSH	0x0200	/* Flush JIT-compiled code. */

/* LuaJIT public C API. */

/* Control the JIT engine. */
LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode);

/* Enforce (dynamic) linker error for version mismatches. Call from main. */
LUA_API void LUAJIT_VERSION_SYM(void);

#endif

Credits to: Myself

#2
Error:
PHP:
1>..\scriptmanager.cpp(147): error C2039: 'string' : is not a member of 'std::basic_string<_Elem,_Traits,_Ax>'
1>..\luascript.cpp(769): error C2039: 'string' : is not a member of 'std::basic_string<_Elem,_Traits,_Ax>'
Solution:
Upgrade your boost library to 1_51_0
I used the installer from Download Boost Library Here - BoostPro

Credits to: Loney

#3
Error:
PHP:
1>baseevents.obj : error LNK2001: unresolved external symbol xmlParseFile
1>baseevents.obj : error LNK2001: unresolved external symbol xmlDocGetRootElement
1>baseevents.obj : error LNK2001: unresolved external symbol xmlStrcmp
1>baseevents.obj : error LNK2001: unresolved external symbol xmlFreeDoc
Solution:
N/A

Credits to: N/A

#3
Error:
PHP:
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Solution: Downgrade .netFramework from 4.5 to 4.0
Credits: Myself

That's it for now.
Hope this helps someone.
 
Hey,

what about this issue:

PHP:
[18:28:36.928] >> Loading items (OTB)
[18:28:37.389] >> Loading items (XML)
[18:28:37.578] >> Loading groups
[18:28:37.600] >> Loading vocations
[18:28:37.601] >> Loading outfits
[18:28:37.604] >> Loading chat channels
[18:28:37.605] >> Loading script systems

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff30a3700 (LWP 4401)]
0x00007ffff7b7b532 in ?? () from /usr/local/lib/libluajit-5.1.so.2
(gdb) bt full
#0  0x00007ffff7b7b532 in ?? () from /usr/local/lib/libluajit-5.1.so.2
No symbol table info available.
#1  0x00007ffff7b87380 in lua_pcall () from /usr/local/lib/libluajit-5.1.so.2
No symbol table info available.
#2  0x0000000000541bb2 in LuaInterface::loadFile(std::string const&, Npc*) ()
No symbol table info available.
#3  0x00000000004297f7 in Event::loadScript(std::string const&, bool) ()
No symbol table info available.
#4  0x000000000042a1ab in BaseEvents::parseEventNode(_xmlNode*, std::string, bool) ()
No symbol table info available.
#5  0x000000000042ab1b in BaseEvents::loadFromXml() ()
No symbol table info available.
#6  0x00000000005ec614 in ScriptManager::loadSystem() ()
No symbol table info available.
#7  0x000000000058cb78 in otserv(std::vector<std::string, std::allocator<std::string> >, ServiceManager*) ()
No symbol table info available.
#8  0x00000000005914d1 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, void (*)(std::vector<std::string, std::allocator<std::string> >, ServiceManager*), boost::_bi::list2<boost::_bi::value<std::vector<std::string, std::allocator<std::string> > >, boost::_bi::value<ServiceManager*> > >, void>::invoke(boost::detail::function::function_buffer&) ()
No symbol table info available.
#9  0x0000000000495f1f in Task::operator()() ()
No symbol table info available.
#10 0x000000000049486a in Dispatcher::dispatcherThread(void*) ()
No symbol table info available.
#11 0x00007ffff655a200 in thread_proxy () from /usr/lib/libboost_thread.so.1.42.0
No symbol table info available.
#12 0x00007ffff50658ca in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#13 0x00007ffff534ab6d in clone () from /lib/libc.so.6
No symbol table info available.
#14 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb)
[PHP]
 
Back
Top Bottom