Bug #73461 Building with Visual Studio 2013 gives "unresolved external" errors
Submitted: 4 Aug 2014 4:18 Modified: 23 Sep 2014 17:00
Reporter: Andrew Dalgleish Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6.20 OS:Windows (8.1 64-bit)
Assigned to: CPU Architecture:Any

[4 Aug 2014 4:18] Andrew Dalgleish
Description:
Building for Win32 RelWithDebInfo with VS2013 Express gives several errors:

mysqld.exp : error LNK2001: unresolved external symbol _xmm@ffffffffffffffffffffffffffffffff

How to repeat:
Install bison 2.4.1, cmake 2.8, VS2013 Express for Windows Desktops.
Download MySQL 5.6 Community source.

mkdir \build
cd \build
cmake -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 12" Z:\mysql-5.6.20
cmake --build . --config debug
cmake -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "Visual Studio 12" Z:\mysql-5.6.20
cmake --build . --config relwithdebinfo --target package

Suggested fix:
diff -ruwN mysql-5.6.20-orig/win/create_def_file.js mysql-5.6.20/win/create_def_file.js
--- mysql-5.6.20-orig/win/create_def_file.js    2014-07-19 01:48:39.000000000 +1000
+++ mysql-5.6.20/win/create_def_file.js 2014-08-04 12:50:15.753975164 +1000
@@ -174,6 +174,7 @@
     (symbol.indexOf("_TI2?") != -1) ||         // std::bad_alloc
     (symbol.indexOf("_TI3?") != -1) ||         // std::length_error
     (symbol.indexOf("_RTC_") != -1) || 
+    (symbol.indexOf("_xmm@") != -1) || 
     (symbol.indexOf("??_C@_") != -1) ||
     (symbol.indexOf("??_R") != -1) ||
     (symbol.indexOf("??_7") != -1)  ||
[23 Sep 2014 17:00] Paul DuBois
Noted in 5.6.22, 5.7.6 changelogs.

Compilation on Windows using Visual Studio 2013 resulted in
"unresolved external symbol" errors.
[10 Dec 2014 12:25] Laurynas Biveinis
$ bzr log -r 6141
------------------------------------------------------------
revno: 6141
committer: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
branch nick: mysql-5.6-19351573
timestamp: Wed 2014-09-03 08:47:38 +0530
message:
  BUG#19351573: BUILDING WITH VISUAL STUDIO 2013 GIVES 
                "UNRESOLVED EXTERNAL" ERRORS
  
  Backport of patch for bug#18709121.