Page 1 of 2

Compile with VS2015

Posted: Sat Mar 18, 2017 2:13 pm
by Ememjr
I am trying to compile the server so i can test some changes i want to make

i get the following errors

Code: Select all

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2001	unresolved external symbol __iob_func	EQ2World	C:\My server\eq2emu\trunk\win\VC10Projects\mysqlclientx64_release.lib(typelib.obj)	1	
Error	LNK2001	unresolved external symbol __iob_func	EQ2World	C:\My server\eq2emu\trunk\win\VC10Projects\mysqlclientx64_release.lib(viosslfactories.obj)	1	
Error	LNK2001	unresolved external symbol __iob_func	EQ2World	C:\My server\eq2emu\trunk\win\VC10Projects\mysqlclientx64_release.lib(my_messnc.obj)	1	
Error	LNK2001	unresolved external symbol __iob_func	EQ2World	C:\My server\eq2emu\trunk\win\VC10Projects\mysqlclientx64_release.lib(client.obj)	1	
Error	LNK2001	unresolved external symbol __iob_func	EQ2World	C:\My server\eq2emu\trunk\win\VC10Projects\mysqlclientx64_release.lib(my_thr_init.obj)	1	
Error	LNK2001	unresolved external symbol __iob_func	EQ2World	C:\My server\eq2emu\trunk\win\VC10Projects\mysqlclientx64_release.lib(my_init.obj)	1	
Error	LNK2001	unresolved external symbol __iob_func	EQ2World	C:\My server\eq2emu\trunk\win\VC10Projects\mysqlclientx64_release.lib(default.obj)	1	
Error	LNK2001	unresolved external symbol _dosmaperr	EQ2World	C:\My server\eq2emu\trunk\win\VC10Projects\mysqlclientx64_release.lib(my_open.obj)	1	
any suggestions?

Re: Compile with VS2015

Posted: Sat Mar 18, 2017 3:29 pm
by Jabantiz
Server just won't compile with VS2015, latest version it worked with is VS2013.

Those errors are a missing #include or macro in some files, the problem is once you get past those errors you will get a bunch more because some feature was removed in VS2015 and it would require a rewrite of an entire system. At least that was the case last time I tried to get it to work several months back.

Re: Compile with VS2015

Posted: Sun Mar 19, 2017 6:15 am
by Ememjr
thanks installing VS2013 let me compile

Re: Compile with VS2015

Posted: Sun Mar 19, 2017 5:27 pm
by Gangrenous
Well knock on wood, I have been able to compile in Linux pretty regularly with no issues. It does take a lot of legwork to get to the point of the first compile though :)

Re: Compile with VS2015

Posted: Fri Mar 24, 2017 10:31 am
by John Adams
Jabantiz wrote: Sat Mar 18, 2017 3:29 pm Server just won't compile with VS2015, latest version it worked with is VS2013.

Those errors are a missing #include or macro in some files, the problem is once you get past those errors you will get a bunch more because some feature was removed in VS2015 and it would require a rewrite of an entire system. At least that was the case last time I tried to get it to work several months back.
Jab, I have used VS2015 exclusively for some time, and I have no problems compiling EQ2World, as it relates to what you are explaining. I remember this coming up when Scat and I were messing with Old EVEmu code (maybe it was you, too) where there is a define you can put in to fix it, though I think it breaks something else. Either way, the only error I get >today< is oddly, cannot find EXE_NAME, in Log.cpp, which is clearly defined in Log.cpp itself. So that's weird.

Code: Select all

1>  Log.cpp
1>..\..\source\common\Log.cpp(169): error C3688: invalid literal suffix 'EXE_NAME'; literal operator or literal operator template 'operator ""EXE_NAME' not found
1>..\..\source\common\Log.cpp(169): error C2664: 'int _snprintf(char *const ,const std::size_t,const char *const ,...)': cannot convert argument 3 from 'int' to 'const char *const '
1>  ..\..\source\common\Log.cpp(169): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
On these lines:

Code: Select all

#ifdef NO_PIDLOG
	snprintf(file, FILENAME_MAX, LOG_DIR"/%04i-%02i-%02i_eq2"EXE_NAME".log", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
#else
	snprintf(file, FILENAME_MAX, LOG_DIR"/%04i-%02i-%02i_eq2"EXE_NAME"_%04i.log", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, getpid());
#endif

Re: Compile with VS2015

Posted: Wed May 24, 2017 8:34 pm
by Zcoretri
Well I could not get it to compile with VS2013
47 errors of error C2668: 'to_string' : ambiguous call to overloaded function in Commands.cpp

Re: Compile with VS2015

Posted: Wed May 24, 2017 9:04 pm
by Jabantiz
/sigh that was stuff I had to add for Linux, I put it in an #if at the top of commands.cpp and thought I had it working, if you intend to just use windows you can nuke those functions and it should work. Linux without c++11 doesn't have those functions and why I had to add them in.

Re: Compile with VS2015

Posted: Wed May 24, 2017 9:20 pm
by Zcoretri
I see... :mrgreen:

Re: Compile with VS2015

Posted: Wed May 24, 2017 9:37 pm
by Jabantiz
Linux always makes my life difficult...
I may actually just wrap it in a if not windows tag...

I should probably find a proper fix though.

Re: Compile with VS2015

Posted: Thu Jun 01, 2017 8:56 am
by John Adams
Jabantiz wrote: Wed May 24, 2017 9:37 pm I should probably find a proper fix though.
:mrgreen:

Re: Compile with VS2015

Posted: Sun Jan 07, 2018 10:24 am
by Plague
This are same errors I got with 2017... guess I'll have to find a 2013 and install to see if works.

Re: Compile with VS2015

Posted: Sun Jan 07, 2018 12:41 pm
by Cynnar
I don't have these errors using 2017. I started with 2013 then moved to 2015 and up to 2017 though. Maybe has something to do with it? Doesn't it do a conversion when you move from one version to another?

Re: Compile with VS2015

Posted: Wed Jan 10, 2018 5:06 pm
by John Adams
A new problem, and oddly with LoginServer.exe build (devs only), though far as I know nothing in Login has changed?

The Player.h file has an initialize in the class, which VS2015 is saying is illegal.
Line 814

Code: Select all

bool custNPC = false;
Not that I'm your boss anymore, but you really should avoid using shorthand on variable names. The alphabet costs no money to use :)

The error:
1>d:\dev\eq2\eq2\trunk\source\worldserver\Player.h(814): error C2864: 'Player::custNPC' : only static const integral data members can be initialized within a class (..\..\source\common\DatabaseResult.cpp)
anywhere that file is included. Why Player.h is being included in DatabaseResults.cpp is a mystery to me.

Re: Compile with VS2015

Posted: Wed Jan 10, 2018 5:10 pm
by Jabantiz
World compiles fine though? If so that is odd, must be some sort of command line flag set in the config's for login that makes that illegal. Is a simple fix of just moving the initialization to the constructor.

Re: Compile with VS2015

Posted: Wed Jan 10, 2018 5:14 pm
by John Adams
Jabantiz wrote: Wed Jan 10, 2018 5:10 pm World compiles fine though? If so that is odd, must be some sort of command line flag set in the config's for login that makes that illegal. Is a simple fix of just moving the initialization to the constructor.
I was only messing with Login, I didn't try world, but that's exactly what I did; moved the = false to the constructor.

Let me guess, you were being lazy? :)

I'll have to check the settings. Odd that there would be a switch to allow that. You'd think it would be allowed in general.