gpt4 book ai didi

c++ - Luarocks luasql-mysql 编译错误

转载 作者:行者123 更新时间:2023-11-29 17:26:24 27 4
gpt4 key购买 nike

我的电脑环境是:

  • Win7Pro 64位
  • VS2015
  • LuaForWindows_v5.1.5-52.exe
  • luarocks-2.4.4-win32
  • mysql-installer-community-5.5.60.1.msi(x86)

安装luasql-mysql时出现如下错误,如何解决?如何在命令提示符处解决问题?

c:\Lua\5.1>luarocks install luasql-mysql
MYSQL_INCDIR="C:\MySQL\ConnectorC\inclu de"
MYSQL_LIBDIR="C:\MySQL\ConnectorC\lib" 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 2530R
cts: 99% (2505/2530), 636.01 KiB | 282.00 KiB/s Receiving objects:
100% (2530/2530), 646.09 KiB | 270.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 <new-branch-name>

HEAD is now at 2f2c4eb Rockspecs for new version. cl /MD /O2 -c
-Fosrc/luasql.obj -IC:/Lua/5.1/include src/luasql.c -IC:\MySQL\Con nectorC\include x86용 Microsoft (R) C/C++ 최적화 컴파일러 버전 19.00.24215.1
Copyright (c) Microsoft Corporation. All rights reserved.

luasql.c cl /MD /O2 -c -Fosrc/ls_mysql.obj -IC:/Lua/5.1/include
src/ls_mysql.c -IC:\MySQL \ConnectorC\include x86용 Microsoft (R) C/C++
최적화 컴파일러 버전 19.00.24215.1 Copyright (c) Microsoft Corporation. All
rights reserved.

ls_mysql.c link -dll -def:luasql/mysql.def -out:luasql/mysql.dll
C:/Lua/5.1/lib/lua5.1.lib src/luasql.obj src/ls_mysql.obj
-libpath:C:\MySQL\ConnectorC\lib mysqlclient.lib

Microsoft (R) Incremental Linker Version 14.00.24215.1 Copyright (C)
Microsoft Corporation. All rights reserved.

luasql/mysql.lib 라이브러리 및 luasql/mysql.exp 개체를 생성하고 있습니다.
mysqlclient.lib(my_init.obj) : error LNK2019: __imp__RegCloseKey@4 외부
기호(참 조 위치: _win32_have_tcpip 함수)에서 확인하지 못했습니다.
mysqlclient.lib(my_init.obj) : error LNK2019: __imp__RegEnumValueA@32
외부 기호( 참조 위치: _win_init_registry 함수)에서 확인하지 못했습니다.
mysqlclient.lib(my_init.obj) : error LNK2019: __imp__RegOpenKeyExA@20
외부 기호( 참조 위치: _win32_have_tcpip 함수)에서 확인하지 못했습니다.
mysqlclient.lib(common.obj) : error LNK2019: __imp__EqualSid@8 외부
기호(참조 위 치: "public: bool __thiscall Sid::operator==(class Sid const
&)" (??8Sid@@QAE_NA BV0@@Z) 함수)에서 확인하지 못했습니다.
mysqlclient.lib(common.obj) : error LNK2019:
__imp__GetTokenInformation@20 외부 기호(참조 위치: "public: __thiscall Sid::Sid(void *)" (??0Sid@@QAE@PAX@Z) 함수) 에서 확인하지 못했습니다.
mysqlclient.lib(common.obj) : error LNK2019: __imp__IsValidSid@4 외부
기호(참조 위치: "public: __thiscall Sid::Sid(void *)" (??0Sid@@QAE@PAX@Z)
함수)에서 확인하 지 못했습니다. mysqlclient.lib(common.obj) : error LNK2019:
__imp__LookupAccountNameW@28 외부 기호(참조 위치: "public: __thiscall Sid::Sid(wchar_t const *)" (??0Sid@@QAE@PB_W @Z) 함수)에서 확인하지 못했습니다.
mysqlclient.lib(random.obj) : error LNK2019:
__imp__CryptAcquireContextA@20 외부 기호(참조 위치: "public: __thiscall TaoCrypt::OS_Seed::OS_Seed(void)" (??0OS_Se ed@TaoCrypt@@QAE@XZ) 함수)에서
확인하지 못했습니다. mysqlclient.lib(random.obj) : error LNK2019:
__imp__CryptReleaseContext@8 외부 기호(참조 위치: "public: __thiscall TaoCrypt::OS_Seed::~OS_Seed(void)" (??1OS_Se ed@TaoCrypt@@QAE@XZ)
함수)에서 확인하지 못했습니다. mysqlclient.lib(random.obj) : error LNK2019:
__imp__CryptGenRandom@12 외부 기호( 참조 위치: "public: __thiscall TaoCrypt::RandomNumberGenerator::RandomNumberGene rator(void)"
(??0RandomNumberGenerator@TaoCrypt@@QAE@XZ) 함수)에서 확인하지 못했 습니다.
luasql/mysql.dll : fatal error LNK1120: 10개의 확인할 수 없는 외부 참조입니다.

Error: Build error: Failed installing luasql/mysql.dll in
C:\Lua\5.1\rocks/luasq l-mysql/2.3.5-1/lib/luasql

c:\Lua\5.1>

最佳答案

您收到的第一个错误是链接器错误。编译器找不到成功构建所需的文件。请参阅Linker Tools Error LNK2019了解详情。

关于c++ - Luarocks luasql-mysql 编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50939308/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com