gpt4 book ai didi

c++ - 在 IDL 文件上使用 opendds_idl 工具时出现 fatal error C1083

转载 作者:行者123 更新时间:2023-11-28 05:23:07 28 4
gpt4 key购买 nike

我在 Windows 10 上遇到了 opendds_idl 工具的问题。

我已经使用 Visual Studio 2015 从 OpenDDS 源代码生成了 OpenDDS 库和工具,启用了静态链接模式和 x64 平台。

使用命令行

opendds_idl file.idl

我遇到了一个错误

c1: fatal error C1083: Cannot open source file : '' : No such file or directory
tao-idli_2HJC0I.cpp
opendds_idl: preprocessor "CL.EXE" returned with an error

IDL文件内容:

module BasicIOTest 
{
#pragma DCPS_DATA_TYPE "BasicIOTest::TestData"
#pragma DCPS_DATA_KEY "BasicIOTest::TestData id"

struct TestData
{
long id;
string text;
};
};

最佳答案

其实我用的是VS2015 x64 native tools命令提示符,opendds_idl在格式化CL.exe命令行的时候好像出了点问题。

这里是详细信息(使用 Johnny Willemsen 推荐的 -v 选项)

> opendds_idl -v TestData.idl
opendds_idl: preprocessing TestData.idl
opendds_idl: spawning: CL.EXE -D__TAO_IDL=0x060200 -I. -I. -nologo -E -I. -D__OPENDDS_IDL=0x030900 -D__OPENDDS_IDL_HAS_FIXED "-I"D:\path\to\thirdparty\OpenDDS "" C:\path\to\AppData\Local\Temp\tao-idli_ynmjvL.cpp

c1: fatal error C1083: Cannot open source file : '' : No such file or directory
tao-idli_ynmjvL.cpp
opendds_idl: preprocessor "CL.EXE" returned with an error

通过使用另一个 VS2015 命令提示符(VS2015 的开发人员命令提示符),我成功地编译了它。

详细信息:

>opendds_idl -v TestData.idl
opendds_idl: preprocessing TestData.idl
opendds_idl: spawning: CL.EXE -D__TAO_IDL=0x060200 -I. -I. -nologo -E -I. -D__OPENDDS_IDL=0x030900 -D__OPENDDS_IDL_HAS_FIXED -ID:\path\to\thirdparty\OpenDDS C:\paths\to\AppData\Local\Temp\tao-idli_lDpVP9.cpp
tao-idli_lDpVP9.cpp
opendds_idl: parsing TestData.idl
processing TestData.idl
opendds_idl: BE processing on TestData.idl
MODULE: CORBA
MODULE: BasicIOTest
STRUCT: TestData

会不会是bug?

关于c++ - 在 IDL 文件上使用 opendds_idl 工具时出现 fatal error C1083,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41052409/

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