Page 1 of 1

scope error on compile

Posted: Thu Mar 26, 2015 11:20 am
by Davenge
getting error on compile with SqlHandle, I tried including "map.h" but still no luck.

g++ -std=gnu++0x -DHAVE_CONFIG_H -I. -I./src/common -DdsUDPSERV -I/usr//include/luajit-2.0 -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -g -O2 -MT dsgame-ability.o -MD -MP -MF .deps/dsgame-ability.Tpo -c -o dsgame-ability.o `test -f 'src/map/ability.cpp' || echo './'`src/map/ability.cpp
In file included from src/map/lua/../entities/../party.h:27:0,
from src/map/lua/../entities/battleentity.h:35,
from src/map/lua/luautils.h:29,
from src/map/ability.cpp:24:
src/map/lua/../entities/../map.h:160:8: error: 'thread_local' does not name a type
src/map/ability.cpp: In function 'void ability::LoadAbilitiesList()':
src/map/ability.cpp:295:28: error: 'SqlHandle' was not declared in this scope
make: *** [dsgame-ability.o] Error 1

Re: scope error on compile

Posted: Thu Mar 26, 2015 5:07 pm
by Davenge
Nevermind, got it. Ubuntu 12.04 didn't use higher than gcc 4.6 and needed at least 4.8 so had to manually install higher version.

Re: scope error on compile

Posted: Fri Apr 03, 2015 11:38 pm
by jaysudo
I installed gcc 4.8 on ubuntu 12.04 and I still get this exact error. Anyone know why?

Re: scope error on compile

Posted: Sun Apr 05, 2015 10:32 pm
by kjLotus
jaysudo wrote:I installed gcc 4.8 on ubuntu 12.04 and I still get this exact error. Anyone know why?
you probably didn't install it correctly then, thread_local is a language keyword