Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when compiling mysql-2.3.5 with rockspec #91

Open
baluballa opened this issue Feb 14, 2018 · 6 comments
Open

Error when compiling mysql-2.3.5 with rockspec #91

baluballa opened this issue Feb 14, 2018 · 6 comments

Comments

@baluballa
Copy link

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:

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:\Program Files (x86)\MySQL\MySQL Connector C 6.1\lib\vs14 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 __imp__RegCloseKey@4 referenced in function _win32_have_tcpip
mysqlclient.lib(my_init.obj) : error LNK2019: unresolved external symbol __imp__RegEnumValueA@32 referenced in function _win_init_registry
mysqlclient.lib(my_init.obj) : error LNK2019: unresolved external symbol __imp__RegOpenKeyExA@20 referenced in function _win32_have_tcpip
mysqlclient.lib(common.obj) : error LNK2019: unresolved external symbol __imp__EqualSid@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 __imp__GetTokenInformation@20 referenced in function "public: __thiscall Sid::Sid(void *)" (??0Sid@@QAE@PAX@Z)
mysqlclient.lib(common.obj) : error LNK2019: unresolved external symbol __imp__IsValidSid@4 referenced in function "public: __thiscall Sid::Sid(void *)" (??0Sid@@QAE@PAX@Z)
mysqlclient.lib(common.obj) : error LNK2019: unresolved external symbol __imp__LookupAccountNameW@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 __imp__CryptAcquireContextA@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 __imp__CryptReleaseContext@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 __imp__CryptGenRandom@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
@cgiluadev
Copy link

You need to add libmysql.lib to your libpath

@baluballa
Copy link
Author

baluballa commented Mar 2, 2018

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 __imp__RegCloseKey@4 referenced in function _win32_have_tcpip
mysqlclient.lib(my_init.obj) : error LNK2019: unresolved external symbol __imp__RegEnumValueA@32 referenced in function _win_init_registry
mysqlclient.lib(my_init.obj) : error LNK2019: unresolved external symbol __imp__RegOpenKeyExA@20 referenced in function _win32_have_tcpip
mysqlclient.lib(common.obj) : error LNK2019: unresolved external symbol __imp__EqualSid@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 __imp__GetTokenInformation@20 referenced in function "public: __thiscall Sid::Sid(void *)" (??0Sid@@QAE@PAX@Z)
mysqlclient.lib(common.obj) : error LNK2019: unresolved external symbol __imp__IsValidSid@4 referenced in function "public: __thiscall Sid::Sid(void *)" (??0Sid@@QAE@PAX@Z)
mysqlclient.lib(common.obj) : error LNK2019: unresolved external symbol __imp__LookupAccountNameW@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 __imp__CryptAcquireContextA@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 __imp__CryptReleaseContext@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 __imp__CryptGenRandom@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.

@0wain
Copy link

0wain commented Apr 10, 2018

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?

@sqpp
Copy link

sqpp commented Nov 19, 2019

I have the same problem, noone?

@m3fist0
Copy link

m3fist0 commented Feb 28, 2021

same problem

@tomasguisasola
Copy link
Contributor

Sorry, but I do not have a Windows machine for decades. I cannot help with this issue.

Regards,
Tomás

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants