unresolved external symbols in hello_simple c example in visual studio 2013 and 2015

4 posts / 0 new
Last post
Offline
Last seen: 8 years 9 months ago
Joined: 03/07/2016
Posts: 2
unresolved external symbols in hello_simple c example in visual studio 2013 and 2015

 

hi,

I'm trying to get the C and C++ hello_simple examples of connext_dds 5.2.0. working with visual studio 2013 and 2015 on Windows 7 Enterprise.

installation of dds was successful and all environment variables are set correctly, I was able to verify it through successfully testing the C# examples.

But when I try to build the C hello_simple example, the following output is generated, saying that there is a bunch of unresolved external symbols(even sprintf and scanf) in the dds libs nddscz.lib and nddscorez.lib. The attached image shows the error list.

Does anyone have an idea how to solve this issue? I appreciate every suggestion.

kind regards,

marko

Gerardo Pardo's picture
Offline
Last seen: 1 week 2 days ago
Joined: 06/02/2010
Posts: 602

I assume you are using the Visual Studio projects under  rti_workspace/5.2.0/examples/connext_dds/c/hello_simple/win32   is this right?

The symbols are part of the C runtime which comes with Visual Studio. Can you look at the Project Properties and specifically the Linker Command Line?  there any system libraries missing from there

I have included what it looks like in my system (note that I have VS2012 installed, not 2013 or 2015).

Take also a look at this StackOverflow thread. I did not verify if what they say is true but if so it could explain what you are seeing:

http://stackoverflow.com/questions/32418766/c-unresolved-external-symbol-sprintf-and-sscanf-in-visual-studio-2015

Gerardo

 

/Users/gerardo/

Offline
Last seen: 8 years 9 months ago
Joined: 03/07/2016
Posts: 2

Hello Gerardo,

yes, you are right. I'm using the VS example projects under rti_workspace/5.2.0/examples/connext_dds/c/hello_simple/win32.

The StackOverflow link helped, thank you very much for this. After applying the suggested changes there are now only 10 linker errors left(as you can see in the attached image).

I also took a look at the Linker Command Line, to me it looks like there is no lib missing. I attached you a screenshot of the Linker Command Line, maybe you will notice an irregularity I haven't.

Thanks for your help!

Kind regards,
Marko

jwillemsen's picture
Offline
Last seen: 3 years 7 months ago
Joined: 09/24/2013
Posts: 55

Look at stackoverflow for the vs2015 link errors. Looks you are trying to use Visual Studio 2013 libraries with 2015, that will probably not work and you have to wait for RTI to ship a RTI Connext DDS version that formally supports 2015. I can recommend you to contact your local RTI contact to ask for the release plans.