Log in

View Full Version : Linker Mismatch errors during server compilation


Takutoto
06-06-2015, 10:12 PM
Hello,

I recently discovered EQEmu and followed the steps outlined here: Server Setup Guide (http://wiki.eqemulator.org/p?Complete_Windows-based_Server_Setup_Guide&frm=Main).

I feel like I've missed something obvious, as I've encountered errors during server compilation. Searching the forum for the error ("mismatch detected") yielded no results, so I probably did something extra dumb, but haven't been able to figure it out.

Here is a pastebin to the error output: http://pastebin.com/Xj9VGSdf

After a little digging, I'm lead to believe it's probably 32bit/64bit incompatibility somewhere, I'm just not sure where. I verified that I installed 32bit versions of this software:


ActivePerl
CMake
XAMPP


I've also verified that I installed Microsoft Visual Studio Express 2013 for Windows Desktop, although I realized that I installed that earlier than the guide suggested.

Is there anything else I'm missing? Feels like something very obvious.

Thanks.

EDIT:

In case anyone else is encountering the same issue after my pastebin link has expired, the error looks something like this:

Error 75 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1800' in main.obj

Uleat
06-06-2015, 10:37 PM
MSC_VER 1600 is VS2010 and 1800 is VS2013.

You probably opened a solution configured for 2013 in 2010..by the looks of it.


Try deleting your 'build' folder and re-run cmake.

Ensure that you select the correct compiler for the version of vs that you are using (something that ends with 12, I believe.)

When you actually compile, you will probably see some messages about an unknown cmake compiler version..this is normal, for now.


EDIT: Visual Studio 12 is VS 2013..11 is 2012 - almost as confusing as intel's processor class system...

Takutoto
06-07-2015, 05:08 PM
Thanks for the response, Uleat!

I've confirmed that the correct compiler is selected in CMake, assuming this is the right one: http://i.imgur.com/XjVGuNt.jpg

Here is a pastebin of my CMake Configuration output after selecting this compiler: http://pastebin.com/KwbDW8vi

Here is what my CMake configuration looks like: http://i.imgur.com/Tg7uzIY.jpg.

Maybe some of that might hint at the issue, but I'm not sure.

I've tried various other things, such as selecting different compilers, modifying entries in the CMake configuration manually, etc., but no luck.

I also did a repair on Visual Studio 2013 for Windows Desktop, but that didn't help the issue either. Maybe a reinstall would produce better results?

Uleat
06-07-2015, 09:20 PM
When you bring up the cmake configuration, and all is in red..are you hitting configure a second time to 'set' this configuration
before hitting generate?

Takutoto
06-07-2015, 09:51 PM
I hadn't been. I tried just now (with the same CMake configuration that I linked) and encountered the same errors.

I did notice one thing. I saw that CMake was pointing to this for MYSQL:

MySQL_INCLUDE_DIR: C:/EQ/Installs/xampp-win32-1.8.3-5-VC11/xampp/mysql/include
MySQL_LIBRARY_DEBUG: C:/EQ/Installs/xampp-win32-1.8.3-5-VC11/xampp/mysql/lib/mysqlclient.lib
MySQL_LIBRARY_RELEASE: C:/EQ/Installs/xampp-win32-1.8.3-5-VC11/xampp/mysql/lib/mysqlclient.lib

Which is where I installed XAMPP. I saw the VC11 in the XAMPP directory/version name, which tipped me off that it could be related. I changed it to this instead so that it points to the mysql located "dependencies" folder (which is Step 4 (b) in the User Guide (http://wiki.eqemulator.org/p?Complete_Windows-based_Server_Setup_Guide&frm=Main#b-download-the-additional-dependencies)):

MySQL_INCLUDE_DIR: C:/EQ/Source/dependencies/mysql_x86/include
MySQL_LIBRARY_DEBUG: C:/EQ/Source/dependencies/mysql_x86/lib/mysqlclient.lib
MySQL_LIBRARY_RELEASE: C:/EQ/Source/dependencies/mysql_x86/lib/mysqlclient.lib

This seemed to have fixed the "Linker Mismatch" errors, but I'm still seeing these errors related to already-defined variables in LIBCMT: http://pastebin.com/wf0bBy71

I'll do a little more digging to try to understand why these errors would appear.

Thanks for the help!

Takutoto
06-07-2015, 10:56 PM
I managed to compile successfully. :D (We'll see how the rest goes, of course.)

I searched the EQEmu forums a bit and found this: http://www.eqemulator.org/forums/showthread.php?t=7112&highlight=LIBCMT

Apparently it was as easy as described: I just had to ignore LIBMT for all of the projects (Project Properties > Linker > Input > Ignore Specific Default Libraries > Edit > Add "LIBMT").

Apologies for getting slightly off-topic with the original issue.

Uleat
06-07-2015, 11:09 PM
There may be a better way to 'fix' the issue..what it is, I can't say (not a knowledgeable area for me.)


But, I think you should get the 'Necro' award for digging up that link :P