0

I am experiencing an issue with the opendds_idl tool on Windows 10.

I have generated the OpenDDS libraries and tools with Visual Studio 2015 from OpenDDS source code with static linking mode enabled and x64 platform.

With the command line

opendds_idl file.idl

I got an error

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

The IDL file content :

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

  struct TestData 
  {
    long id;
    string text;
  };
};
MSch8791
  • 41
  • 6
  • Do you run opendds_idl from a shell where Visual Studio 2015 in in the path? opendds_idl tries to invoke cl as pre processor. If that is the case, try to add -v to the commandline to get debug output – Johnny Willemsen Dec 09 '16 at 08:04
  • Thanks for your answer. Yes, I do run opendds_idl from the Visual Studio 2015 command prompt. I've succeeded finally to compile the IDL file. I am going to post an aswer to my initial question. The way it has been resolved was by using another command prompt. – MSch8791 Dec 10 '16 at 01:18

1 Answers1

1

In fact, I was using the VS2015 x64 native tools command prompt, and it seems that something went wrong when opendds_idl was formatting the CL.exe command line.

Here are the details (with the -v option as recommended by Johnny Willemsen)

> 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

By using, another VS2015 command prompt (Developer command prompt for VS2015) I succeeded to compile it without issues.

Details:

>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

Would it be a bug ?

MSch8791
  • 41
  • 6
  • No, it is not a bug, opendds_idl needs to be able to spawn cl, invoking it from a vs2015 command prompt is the correct way. – Johnny Willemsen Dec 11 '16 at 08:58
  • I mean in the x64 native tools command prompt of VS2015, the parameters string of CL.EXE seemed to have not been well formatted. But with the other command prompt it has been formatted well. Refer to the output details I have posted in my answer. – MSch8791 Dec 13 '16 at 01:38
  • Yes, I now see it, very strange, not sure where that is coming from. Maybe open an issue at https://github.com/objectcomputing/OpenDDS? – Johnny Willemsen Dec 13 '16 at 08:11