在Visual Studio 2015中将平台从v140切换到v110

时间:2015-11-25 15:51:29

标签: php c++ visual-studio visual-studio-2012 visual-studio-2015

我移植了最初为UNIX环境编写的PHP扩展的源代码。

我已经解决了所有库依赖项并成功编译了它,但是我们用于测试的EasyPHP服务器拒绝加载DLL模块。

我已经假设了,因为我已经使用Visual Studio 2015(v140)平台工具集编译了DLL,而据我所知,服务器使用v11源的原始PHP。

但是,将项目从v140更改为Visual Studio 2012(v110)工具集会产生以下错误:

LNK1120 5 unresolved externals  DINAPIS_PHP_MATH    

LNK2001 unresolved external symbol __imp____stdio_common_vsprintf   DINAPIS_PHP_MATH    D:\[...]\jansson_d.lib(dump.obj)

LNK2001 unresolved external symbol __imp____stdio_common_vsprintf   DINAPIS_PHP_MATH    D:\[...]\jansson_d.lib(error.obj)

LNK2019 unresolved external symbol __imp____acrt_iob_func referenced in function _json_loadf    DINAPIS_PHP_MATH    D:\[...]\jansson_d.lib(load.obj)

LNK2019 unresolved external symbol __imp____stdio_common_vsprintf referenced in function __vsnprintf_l  DINAPIS_PHP_MATH    D:\[...]\jansson_d.lib(load.obj)

LNK2019 unresolved external symbol __imp__strtoll referenced in function _lex_scan_number   DINAPIS_PHP_MATH    D:\[...]\jansson_d.lib(load.obj)

LNK2001 unresolved external symbol __imp____stdio_common_vsprintf   DINAPIS_PHP_MATH    D:\[...]\jansson_d.lib(strconv.obj)

LNK2019 unresolved external symbol __imp___dclass referenced in function _json_real DINAPIS_PHP_MATH    D:\[...]\jansson_d.lib(value.obj)

LNK2019 unresolved external symbol __ltod3 referenced in function _json_number_value    DINAPIS_PHP_MATH    D:\[...]\jansson_d.lib(value.obj)

LNK2005 _sprintf already defined in jansson_d.lib(dump.obj) DINAPIS_PHP_MATH    D:\Projects\Dinapis PHP Math\php-extension-win\DINAPIS_PHP_MATH\DINAPIS_PHP_MATH\MSVCRTD.lib(MSVCR110D.dll)

正如你所看到的,这个" jansson"库产生了所有问题,并且让我头痛原始移植。

那么什么是v110工具集缺少产生这些错误,当v140编译好?怎么解决?

谢谢!

0 个答案:

没有答案