Unresolved externals symbols on Windows

3 posts / 0 new
Last post
Offline
Joined: 02/26/2015
Posts: 2
Unresolved externals symbols on Windows

I am getting the following linker errors when linking against RTI Connext 5.1.0 with Visual Studio 2012:

2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol RTILog_setLogLevel
2>libFpInterface.lib(InterfaceSupport.obj) : error LNK2001: unresolved external symbol RTILog_setLogLevel
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol RTI_LOG_ASSERT_FAILURE_s
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol RTI_LOG_INSUFFICIENT_SPACE_FAILURE_dd
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol RTI_LOG_MALLOC_FAILURE_d
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDS_TYPE_ALLOCATION_PARAMS_DEFAULT
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDS_TYPE_DEALLOCATION_PARAMS_DEFAULT
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDS_g_tc_ulong
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDS_g_tc_octet
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDS_g_tc_longlong
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDSLog_g_submoduleMask
2>libFpInterface.lib(InterfaceSupport.obj) : error LNK2001: unresolved external symbol DDSLog_g_submoduleMask
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDSLog_g_instrumentationMask
2>libFpInterface.lib(InterfaceSupport.obj) : error LNK2001: unresolved external symbol DDSLog_g_instrumentationMask
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDS_LOG_BAD_PARAMETER_s
2>libFpInterface.lib(InterfaceSupport.obj) : error LNK2001: unresolved external symbol DDS_LOG_BAD_PARAMETER_s
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDS_LOG_MEMORY_ALLOCATED_dd
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDS_LOG_SEQUENCE_NOT_OWNER
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDS_LOG_GET_FAILURE_s
2>libFpInterface.lib(Interface.obj) : error LNK2001: unresolved external symbol DDS_LOG_SET_FAILURE_s
2>libFpInterface.lib(InterfaceSupport.obj) : error LNK2001: unresolved external symbol RTI_LOG_ANY_FAILURE_s
2>C:\biometrics.build\bin\Debug\mongodbsink.exe : fatal error LNK1120: 17 unresolved externals

 

Despite I am already linking against:nddscppd.lib, nddscd.lib, nddscored.lib, WS2_32.lib, netapi32.lib, advapi32.lib, user32.lib, wsock32.lib, ws2_32.lib

Any ideas why?

 

 

Gerardo Pardo's picture
Offline
Joined: 06/02/2010
Posts: 572

Hi,

It is very odd. I am wondering if it is perhaps that you are not setting some variables that need to be defined with compiling the code.

Can you copy and paste here the command-line that shows all the options VisualStudio uses to do the compilation/linking. You can find this (at least on VisualStudio 2008) under the properties for that configuration. For example for me it shows (see screenshoot below):

/Od /I "Z:\dom\apps_rti\RTIPE_51\ndds.5.1.0\include" /I "Z:\dom\apps_rti\RTIPE_51\ndds.5.1.0\include\ndds" /D "NDDS_DLL_VARIABLE" /D "WIN32_LEAN_AND_MEAN" /D "WIN32" /D "RTI_WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /EHsc /RTC1 /MDd /Fo".\objs\i86Win32VS2008\\" /Fd".\objs\i86Win32VS2008\\" /W3 /nologo /c /ZI /errorReport:prompt

If you do not have right defines you should check the platform notes to see what the correct list is. See http://community.rti.com/rti-doc/510/ndds.5.1.0/doc/pdf/RTI_CoreLibrariesAndUtilities_PlatformNotes.pdf

Gerardo

 

 

Offline
Joined: 02/26/2015
Posts: 2

Just after posting I realized the reason was that NDDS_DLL_VARIABLE was not being defined in some projects in the solution as it has to be.

Thanks anyway!