我将一个项目从C++ NavaCabro XE6 32位移植到XE6 64位。我们使用嵌入式python库(以及一些用C编写的python模块)。在
我可以让它编译,但是我不能链接,因为在Python目录中没有任何lib可以被编译器bcc64
(基于clang
的编译器)使用。在
这是我的代码,它只是文档中的一个简单的“这是如何嵌入python”的示例。我们使用python3.1;我们可以升级,但我也看不到更新版本中的libs。在
#define HAVE_ROUND
#define HAVE_ACOSH
#define HAVE_ASINH
#define HAVE_ATANH
#include <Python.h>
#pragma hdrstop
#pragma argsused
#ifdef _WIN32
#include <tchar.h>
#else
typedef char _TCHAR;
#define _tmain main
#endif
#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
// Invoke the python intepreter
Py_Initialize();
PyRun_SimpleString("from time import time,ctime\n"
"print('Today is', ctime(time()))\n");
Py_Finalize();
system("Pause");
return 0;
}
mkexp libpython31.a C:\Windows\System32\python31.dll
感谢伊格纳西奥的帮助。在
相关问题 更多 >
编程相关推荐