Jump to content
OpenSplice DDS Forum
Jonnn

C Linking Problem

Recommended Posts

Jonnn   

Hello,

I have an application, that has been in existence for a while.

I have changed some of the fields in the IDL and regenerated the C files, using IDLPP.

When I include the new version of the generated files I get a linker error, where os_reportVerbosity is undefined.

I can see this file on my file system, and the folder is in the linker path https://github.com/PrismTech/opensplice/blob/master/src/abstraction/os/include/os_report.h

To be clear - I can swap between the old C files and the new C files, leaving everything else the same, it can link to the former but not the latter. The object files are compiled, but not linked.

 

I'm on Windows 7 64 bit

The application is 32 bit 

I have both 32 bit and 64 bit Opensplice installed.

I'm not on the same machine the old IDL based C files were created on.

The IDL generates with no error to the console windows.

I am explicitly running the idlpp in 32bit open splice folder.

I've checked the OSL_HOME value is pointing at the 32-bit folder.

 

Is there a log file where I can check the IDLPP is running correctly?

Is it likely that something in my environment is causing the issue? I suspect this is the case, given the old version works but aren't generated on my machine. I'm struggling to work out what the difference is.

If anyone has any ideas on how I can proceed, they would be much appreciated.

 

Kind regards

Jonnn

Share this post


Link to post
Share on other sites

Hi Jon

 

Yes it does sound likely to be an environment issue.  Is it the same version number of (the open source?) OpenSplice on both machines?

 

Can you do a windows "dumpbin /EXPORTS" command to verify that the os_reportVerbosity is defined in one of the libraries or source files.

 

Maybe you could paste the link line and the error in full?

 

cheers

James

Share this post


Link to post
Share on other sites
Jonnn   

Hello, thanks for replying.

 

I believe it's the same version on both machines. I'm going to get someone else to generate the files, later today, to try and rule those sort of issues out.

 

I don't have dumpbin installed, because I don't have visual studio installed. We're using gcc to build the application. Is there something else I can use to do the same thing?

 

The error message is:

libtps.a(ospltellusspldcps.o):OSPLTellusSplDcps.c:(.text_0x780): undefined reference to '_imp__os_reportVerbosity'

 

I've just found that someone has commented out the #include <os_report.h> in the original version; i.e. the one that works. Is this safe to do?

Thanks, Jon

Share this post


Link to post
Share on other sites

Hi Jon,

 


I've just found that someone has commented out the #include <os_report.h> in the original version; i.e. the one that works. Is this safe to do?

 

I'm not sure that was a good idea, but I guess explains the difference in one working and the other not

 


The error message is:

libtps.a(ospltellusspldcps.o):OSPLTellusSplDcps.c:(.text_0x780): undefined reference to '_imp__os_reportVerbosity'

 

I would expect that symbol would be in the ddsos library, can you check that is being linked in?

 

I'm not familiar with using gcc (is that via cygwin or minGW?) on windows but I guess it has been working ok because you got the initial application to run successfully.

 

nm is the gnu tool for showing symbols

 

James

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×