Page 1 of 2

extern thread_local Sql_t* SqlHandle; - 300+ errors

Posted: Mon Aug 24, 2015 4:33 am
by uwill99
map.h is throwing up 300+ errors when compiling DSGame-server, just did a git bash tonight:
330 error C2146: syntax error: missing ';' before identifier 'Sql_t'

Code: Select all

extern thread_local Sql_t* SqlHandle;
and I'm getting only 1 error from map.cpp:

C2086: 'Sql_t *SqlHandle' : redefinition

Code: Select all

thread_local Sql_t* SqlHandle = nullptr;

Re: extern thread_local Sql_t* SqlHandle; - 300+ errors

Posted: Mon Aug 24, 2015 1:37 pm
by kjLotus
most likely whatever you're using to compile is not up to date (I'm guessing visual studio, you need VS2015)

Re: extern thread_local Sql_t* SqlHandle; - 300+ errors

Posted: Mon Aug 24, 2015 7:56 pm
by uwill99
Yeah - I had been using VS2013 without a problem and changed the platform toolset to 120 but still got the error. I'll update overnight then, thanks Kj.

Re: extern thread_local Sql_t* SqlHandle; - 300+ errors

Posted: Fri Oct 30, 2015 4:03 pm
by Alice5150
I'm having the same error on map.cpp ('Sql_t *SqlHandle' : redefinition), and I just updated to 2015 Visual Studio. Any more tips on how to fix this? It's the only thing making my game server fail to build.

Re: extern thread_local Sql_t* SqlHandle; - 300+ errors

Posted: Fri Oct 30, 2015 4:28 pm
by kjLotus
Alice5150 wrote:I'm having the same error on map.cpp ('Sql_t *SqlHandle' : redefinition), and I just updated to 2015 Visual Studio. Any more tips on how to fix this? It's the only thing making my game server fail to build.
you need to use the visual studio 2015 compiler to compile it as well

Re: extern thread_local Sql_t* SqlHandle; - 300+ errors

Posted: Fri Oct 30, 2015 4:36 pm
by Alice5150
kjLotus wrote:
Alice5150 wrote:I'm having the same error on map.cpp ('Sql_t *SqlHandle' : redefinition), and I just updated to 2015 Visual Studio. Any more tips on how to fix this? It's the only thing making my game server fail to build.
you need to use the visual studio 2015 compiler to compile it as well
I'm running Visual Studio 2015. Is the compiler something separate?

Also found this but not sure how to edit the field it's talking about: http://stackoverflow.com/questions/1011 ... cene-graph

Re: extern thread_local Sql_t* SqlHandle; - 300+ errors

Posted: Fri Oct 30, 2015 4:53 pm
by kjLotus
right click DSGame-server in solution explorer, properties, under General is "Platform Toolset", make sure thats Visual Studio 2015 (v140) (and the same for the other projects)

Re: extern thread_local Sql_t* SqlHandle; - 300+ errors

Posted: Fri Oct 30, 2015 5:04 pm
by Alice5150
kjLotus wrote:right click DSGame-server in solution explorer, properties, under General is "Platform Toolset", make sure thats Visual Studio 2015 (v140) (and the same for the other projects)
I actually set it to v120 earlier per suggestion from a friend. Would you recommend v140? If so, where can I get it?

Also, thanks for taking your time to help me with this, I appreciate it.

Re: extern thread_local Sql_t* SqlHandle; - 300+ errors

Posted: Fri Oct 30, 2015 6:59 pm
by kjLotus
Alice5150 wrote:
kjLotus wrote:right click DSGame-server in solution explorer, properties, under General is "Platform Toolset", make sure thats Visual Studio 2015 (v140) (and the same for the other projects)
I actually set it to v120 earlier per suggestion from a friend. Would you recommend v140? If so, where can I get it?

Also, thanks for taking your time to help me with this, I appreciate it.
Yes, it won't compile with v120 (which is visual studio 2013). v140 comes with Visual Studio 2015.

edit: assuming you did a custom install and included the C++ stuff instead of using default install

Re: extern thread_local Sql_t* SqlHandle; - 300+ errors

Posted: Sat Oct 31, 2015 12:41 am
by Alice5150
kjLotus wrote:
Alice5150 wrote:
kjLotus wrote:right click DSGame-server in solution explorer, properties, under General is "Platform Toolset", make sure thats Visual Studio 2015 (v140) (and the same for the other projects)
I actually set it to v120 earlier per suggestion from a friend. Would you recommend v140? If so, where can I get it?

Also, thanks for taking your time to help me with this, I appreciate it.
Yes, it won't compile with v120 (which is visual studio 2013). v140 comes with Visual Studio 2015.

edit: assuming you did a custom install and included the C++ stuff instead of using default install
I started with default 2013, then changed it to v120 in the Properties. Go back to v140?

Edit: That did it! Thanks a ton!