Generating a .lib from Visual Studio

3 posts / 0 new
Last post
Last seen: 6 years 7 months ago
Joined: 02/08/2016
Posts: 2
Generating a .lib from Visual Studio

I have an IDL, and am trying to generate code to build a .lib file using Visual Studio 2008 (C++).

I have read another forum topic ( and although that forum topic is about nested topics, it seems related.

In Gerardo's response, he mentions rtiddsgen should be run against each of the IDL files, and that the result is generated code that should be managed with each IDL that produces a library containing the associated generated type-specific generated files without the example files.

I can run rtiddsgen to produce the publisher/subscriber example files, but can't produce a .lib file as he suggests.

How do I go about this?



Last seen: 6 years 7 months ago
Joined: 02/08/2016
Posts: 2

OK... the situation I was originally asking about was a very simple 1-topic IDL, and yes I needed it to create a .lib file. I managed to manually create a static library project, included the relevant source code (not the publisher or subscriber), and built it -- a .lib file is produced, but according to dumpbin it doesn't include anything in it.

I also have a more complex IDL, which is about nested topics -- so the link above is definitely related/relevant.

When I run:

for %%i in (*.idl) do (
 call rtiddsgen -d cpp -replace -language C++ -platform i86Win32VS2008 %%i

I get source code without the publisher/subscriber example programs (as expected), .vcproj files for the publisher/subscriber programs (not as expected), and nothing to produce .lib files (not as expected).

Is this where some of the manual editing of projects needs to occur, or are more things supposed to be automated?


Gerardo Pardo's picture
Last seen: 2 weeks 5 days ago
Joined: 06/02/2010
Posts: 598

Unfortunately, rtiddsgen does not generate project files to help build the  .lib files so you will need to create those projects by hand...

Note that you are using RTI Connext DDS 5.2 then you can use this command line to just generate the type-specific code without any VisualStudio projects or examples:

rtiddsgen MyIDLFile.idl -language C++ -update typefiles