编译 TCL-DLL 包装器时的问题
Issues when compiling a TCL-DLL wrapper
我正在处理一个项目,我试图通过使用在 Github 找到的这个项目(它是一个 TCL-DLL 包装器)从 TCL 模块中的 Oculus Rift 传感器读取数据:
我以前从未编译过 dll 文件,我在 Visual Studio 2013 年尝试编译他们的项目时遇到了一些问题。这些错误显示:
C2491: 'Tclovr_Init' : definition of dllimport function not allowed
C2491: 'Tclovr_Unload' : definition of dllimport function not allowed
你知道我可能错过了什么吗?
提前致谢!
此致,马库斯
这两个函数需要都从 DLL 导出并具有 C 链接(以便它们在 DLL 中具有 Tcl load
命令的名称实现预期)。您是否在构建时定义 OCULUSVRCMDLL_EXPORTS
预处理器符号?这将那些声明从 dllimport
更改为 dllexport
…
我正在处理一个项目,我试图通过使用在 Github 找到的这个项目(它是一个 TCL-DLL 包装器)从 TCL 模块中的 Oculus Rift 传感器读取数据:
我以前从未编译过 dll 文件,我在 Visual Studio 2013 年尝试编译他们的项目时遇到了一些问题。这些错误显示:
C2491: 'Tclovr_Init' : definition of dllimport function not allowed
C2491: 'Tclovr_Unload' : definition of dllimport function not allowed
你知道我可能错过了什么吗?
提前致谢!
此致,马库斯
这两个函数需要都从 DLL 导出并具有 C 链接(以便它们在 DLL 中具有 Tcl load
命令的名称实现预期)。您是否在构建时定义 OCULUSVRCMDLL_EXPORTS
预处理器符号?这将那些声明从 dllimport
更改为 dllexport
…