Open baluballa opened 6 years ago
You need to add libmysql.lib to your libpath
It does not workl!
This is my command:
luarocks install luasql-mysql MYSQL_DIR="C:/Program Files/MySQL/MySQL Server 5.7" MYSQL_INCDIR="C:\temp\mysql-connector\include" MYSQL_LIBDIR="C:\temp\mysql-connector\lib"
This is response:
Installing http://luarocks.org/repositories/rocks/luasql-mysql-2.3.5-1.rockspec... Cloning into 'luasql'... remote: Counting objects: 2530, done. remote: Total 2530 (delta 0), reused 0 (delta 0), pack-reused 2530 Receiving objects: 100% (2530/2530), 646.07 KiB | 446.00 KiB/s, done. Resolving deltas: 100% (1524/1524), done. Note: checking out 'v2.3.5'.
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:
git checkout -b
HEAD is now at 2f2c4eb... Rockspecs for new version. cl /MD /O2 -c -Fosrc/luasql.obj -IC:/Program Files (x86)/Lua/5.1/include src/luasql.c -IC:\temp\mysql-connector\include Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86 Copyright (C) Microsoft Corporation. All rights reserved.
luasql.c cl /MD /O2 -c -Fosrc/ls_mysql.obj -IC:/Program Files (x86)/Lua/5.1/include src/ls_mysql.c -IC:\temp\mysql-connector\include Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86 Copyright (C) Microsoft Corporation. All rights reserved.
ls_mysql.c link -dll -def:luasql/mysql.def -out:luasql/mysql.dll C:/Program Files (x86)/Lua/5.1/lib/lua5.1.lib src/luasql.obj src/ls_mysql.obj -libpath:C:\temp\mysql-connector\lib mysqlclient.lib Microsoft (R) Incremental Linker Version 14.00.24215.1 Copyright (C) Microsoft Corporation. All rights reserved.
Creating library luasql/mysql.lib and object luasql/mysql.exp mysqlclient.lib(my_init.obj) : error LNK2019: unresolved external symbol impRegCloseKey@4 referenced in function _win32_have_tcpip mysqlclient.lib(my_init.obj) : error LNK2019: unresolved external symbol impRegEnumValueA@32 referenced in function _win_init_registry mysqlclient.lib(my_init.obj) : error LNK2019: unresolved external symbol impRegOpenKeyExA@20 referenced in function _win32_have_tcpip mysqlclient.lib(common.obj) : error LNK2019: unresolved external symbol impEqualSid@8 referenced in function "public: bool thiscall Sid::operator==(class Sid const &)" (??8Sid@@QAE_NABV0@@Z) mysqlclient.lib(common.obj) : error LNK2019: unresolved external symbol impGetTokenInformation@20 referenced in function "public: thiscall Sid::Sid(void *)" (??0Sid@@QAE@PAX@Z) mysqlclient.lib(common.obj) : error LNK2019: unresolved external symbol impIsValidSid@4 referenced in function "public: thiscall Sid::Sid(void )" (??0Sid@@QAE@PAX@Z) mysqlclient.lib(common.obj) : error LNK2019: unresolved external symbol impLookupAccountNameW@28 referenced in function "public: __thiscall Sid::Sid(wchar_t const )" (??0Sid@@QAE@PB_W@Z) mysqlclient.lib(random.obj) : error LNK2019: unresolved external symbol impCryptAcquireContextA@20 referenced in function "public: __thiscall TaoCrypt::OS_Seed::OS_Seed(void)" (??0OS_Seed@TaoCrypt@@QAE@XZ) mysqlclient.lib(random.obj) : error LNK2019: unresolved external symbol impCryptReleaseContext@8 referenced in function "public: thiscall TaoCrypt::OS_Seed::~OS_Seed(void)" (??1OS_Seed@TaoCrypt@@QAE@XZ) mysqlclient.lib(random.obj) : error LNK2019: unresolved external symbol impCryptGenRandom@12 referenced in function "public: __thiscall TaoCrypt::RandomNumberGenerator::RandomNumberGenerator(void)" (??0RandomNumberGenerator@TaoCrypt@@QAE@XZ) luasql/mysql.dll : fatal error LNK1120: 10 unresolved externals
Error: Build error: Failed installing luasql/mysql.dll in C:\Program Files (x86)\Lua\5.1\rocks/luasql-mysql/2.3.5-1/lib/luasql
I have downloaded X86 connectors from MySQL, which is in the dir given in command. Command is issued from Adminsitrator Developer Command Prompt for VS2015.
Sorry to bump an oldish issue but I have the same problem. Looked at a few posts but can't find a fix. Did anyone figure it out?
I have the same problem, noone?
same problem
Sorry, but I do not have a Windows machine for decades. I cannot help with this issue.
Regards, Tomás
Added this topic to an other compiling issue #87 . See now _its not the same erro_r. I get this error when try to compile: