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

Solved Couple of errors with compiling [SOLVED]

Tazzonny

The Bestest
Joined
Feb 8, 2009
Messages
161
Reaction score
2
So I'm trying to compile several revs but I keep getting this:
Code:
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>'
Before this I had the can't find luajit.h and after looking around on the forums and finding no solution, I found this luajit.h online and put it in my 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
that solved the luajit problem but gave me the other error I posted above.

I was following this guide:
http://otland.net/f479/compiling-msvc-compiling-forgotten-server-under-windows-easy-way-125178/

Thanks in advance
~Tazz
 
Last edited:
Remove .string() in scriptmanager.cpp(147) and luascript.cpp(769).

Code:
std::string s = it->path().filename()[COLOR=#ff0000].string()[/COLOR];
 
It's a Boost problem, must update it.
I'm on it, will post as soon as I'm done updating/trying to compile again.

Remove .string() in scriptmanager.cpp(147) and luascript.cpp(769).

Code:
std::string s = it->path().filename()[COLOR=#ff0000].string()[/COLOR];
I did try that only to be welcomed by lots of other errors.

Still, thanks both for the help, will update this as soon as Im done updating boost.

Edit: So I'm done updating boost but am still getting the same error, do I have to include it in any way during the compiling process or something?
 
Last edited:
I finally could get rid of those. Thanks to both it was a boost problem like Loney said I just had some trouble updating boost.
 
Last edited:
Back
Top