Problem with building the StreamingVideoExample from the usecases

4 posts / 0 new
Last post
Offline
Last seen: 3 years 5 months ago
Joined: 10/17/2020
Posts: 10
Problem with building the StreamingVideoExample from the usecases

When im trying to build it shows the following error:

1>------ Build started: Project: SharedDataTypes, Configuration: Debug Win32 ------
1>Generating .cxx files from .idl ...
1>INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 3.0.0, please wait ...
1>INFO com.rti.ndds.nddsgen.Main Done
1>VideoData.cxx
1>VideoDataPlugin.cxx
1>VideoDataSupport.cxx
1>Generating Code...
1>SharedDataTypes_vs2017.vcxproj -> D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\Debug\SharedDataTypes.lib
2>------ Build started: Project: VideoPublisher, Configuration: Debug Win32 ------
3>------ Build started: Project: VideoSubscriber, Configuration: Debug Win32 ------
2>DDSCommunicator.cxx
3>DDSCommunicator.cxx
2>OSAPI.cxx
3>OSAPI.cxx
2>SimCList.cxx
3>SimCList.cxx
2>VideoBuffer.cxx
3>VideoBuffer.cxx
2>VideoSource.cxx
3>VideoOutput.cxx
2>VideoPublisher.cxx
3>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\src\CommonInfrastructure\VideoOutput.cxx(94,26): warning C4996: 'g_value_array_new': is deprecated. Use 'GArray' instead
3>VideoSubscriber.cxx
2>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\src\VideoPublisher\VideoPublisher.cxx(47,13): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data
2>VideoPublisherInterface.cxx
3>VideoSubscriberInterface.cxx
2>Generating Code...
2>LINK : fatal error LNK1104: cannot open file 'nddscppzd.lib'
2>Done building project "VideoPublisher_vs2017.vcxproj" -- FAILED.
3>Generating Code...
3>LINK : fatal error LNK1104: cannot open file 'nddscppzd.lib'
3>Done building project "VideoSubscriber_vs2017.vcxproj" -- FAILED.
========== Build: 1 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========


This is the whole output.

Offline
Last seen: 2 months 1 week ago
Joined: 09/23/2018
Posts: 62

From the linker error "2>LINK : fatal error LNK1104: cannot open file 'nddscppzd.lib'"   this indicates that you may not have sourced your environment properly --- NDDSHOME, PATH, and LD_LIBRARY_PATH.

We provide some helper scripts that make this easy.  On Windows,  you can run the applicable bat file located in  C:\rti_connext_dds-6.0.1\resource\scripts.

For example,  

C:\rti_connext_dds-6.0.1\resource\scripts\rtisetenv_x64Win64VS2017.bat

 

Adjust paths and architecture as needed.

 

Now try the build on your Video Example.

 

 

  

Offline
Last seen: 3 years 5 months ago
Joined: 10/17/2020
Posts: 10

Hy

Thank you, i executed that file. Now the Output was:

2>Generating Code...
3>Generating Code...
2>nddscppzd.lib(DomainParticipantFactory.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
2>Done building project "VideoPublisher_vs2017.vcxproj" -- FAILED.
3>nddscppzd.lib(DomainParticipantFactory.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
3>Done building project "VideoSubscriber_vs2017.vcxproj" -- FAILED.
========== Rebuild All: 1 succeeded, 2 failed, 0 skipped ==========

After that i Changed my Projects Configuration to x64 and the output changed to this:

1>------ Build started: Project: SharedDataTypes, Configuration: Debug x64 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(391,5): warning MSB8028: The intermediate directory (x64\Debug\) contains files shared from another project (VideoPublisher.vcxproj, VideoSubscriber.vcxproj).  This can lead to incorrect clean and rebuild behavior.
1>VideoData.cxx
1>VideoDataPlugin.cxx
1>VideoDataSupport.cxx
1>Generating Code...
1>SharedDataTypes_vs2017.vcxproj -> D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\x64\Debug\SharedDataTypes.lib
1>Done building project "SharedDataTypes_vs2017.vcxproj".
2>------ Build started: Project: VideoPublisher, Configuration: Debug x64 ------
3>------ Build started: Project: VideoSubscriber, Configuration: Debug x64 ------
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(391,5): warning MSB8028: The intermediate directory (x64\Debug\) contains files shared from another project (SharedDataTypes.vcxproj, VideoPublisher.vcxproj).  This can lead to incorrect clean and rebuild behavior.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(391,5): warning MSB8028: The intermediate directory (x64\Debug\) contains files shared from another project (SharedDataTypes.vcxproj, VideoSubscriber.vcxproj).  This can lead to incorrect clean and rebuild behavior.
2>VideoSource.cxx
3>VideoSubscriber.cxx
2>VideoPublisher.cxx
3>VideoSubscriberInterface.cxx
2>d:\programming\rticonnextdds-usecases\videodata\examplecode\src\videopublisher\videopublisher.cxx(47): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data
3>d:\programming\rticonnextdds-usecases\videodata\examplecode\src\videosubscriber\videosubscriberinterface.cxx(266): warning C4267: 'argument': conversion from 'size_t' to 'DDS_Long', possible loss of data
2>VideoPublisherInterface.cxx
3>Generating Code...
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(391,5): warning MSB8028: The intermediate directory (x64\Debug\) contains files shared from another project (VideoPublisher.vcxproj, VideoSubscriber.vcxproj).  This can lead to incorrect clean and rebuild behavior.
3>Done building project "SharedDataTypes_vs2017.vcxproj".
3>VideoOutput.obj : error LNK2019: unresolved external symbol g_type_check_instance_cast referenced in function "public: __cdecl EMDSVideoDisplayOutput::EMDSVideoDisplayOutput(void)" (??0EMDSVideoDisplayOutput@@QEAA@XZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol g_value_init referenced in function "enum GstBusSyncReply __cdecl bus_sync_handler(struct _GstBus *,struct _GstMessage *,void *)" (?bus_sync_handler@@YA?AW4GstBusSyncReply@@PEAU_GstBus@@PEAU_GstMessage@@PEAX@Z)
3>VideoOutput.obj : error LNK2019: unresolved external symbol g_signal_connect_data referenced in function "public: virtual void __cdecl EMDSVideoDisplayOutput::Initialize(void)" (?Initialize@EMDSVideoDisplayOutput@@UEAAXXZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol g_value_array_new referenced in function "enum GstBusSyncReply __cdecl bus_sync_handler(struct _GstBus *,struct _GstMessage *,void *)" (?bus_sync_handler@@YA?AW4GstBusSyncReply@@PEAU_GstBus@@PEAU_GstMessage@@PEAX@Z)
3>VideoOutput.obj : error LNK2019: unresolved external symbol g_value_set_boolean referenced in function "enum GstBusSyncReply __cdecl bus_sync_handler(struct _GstBus *,struct _GstMessage *,void *)" (?bus_sync_handler@@YA?AW4GstBusSyncReply@@PEAU_GstBus@@PEAU_GstMessage@@PEAX@Z)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_object_unref referenced in function "public: virtual void __cdecl EMDSVideoDisplayOutput::Initialize(void)" (?Initialize@EMDSVideoDisplayOutput@@UEAAXXZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_mini_object_unref referenced in function gst_message_unref
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_structure_has_name referenced in function "enum GstBusSyncReply __cdecl bus_sync_handler(struct _GstBus *,struct _GstMessage *,void *)" (?bus_sync_handler@@YA?AW4GstBusSyncReply@@PEAU_GstBus@@PEAU_GstMessage@@PEAX@Z)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_caps_to_string referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl EMDSVideoDisplayOutput::GetStreamMetadata(void)" (?GetStreamMetadata@EMDSVideoDisplayOutput@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_pad_get_allowed_caps referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl EMDSVideoDisplayOutput::GetStreamMetadata(void)" (?GetStreamMetadata@EMDSVideoDisplayOutput@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_message_get_structure referenced in function "enum GstBusSyncReply __cdecl bus_sync_handler(struct _GstBus *,struct _GstMessage *,void *)" (?bus_sync_handler@@YA?AW4GstBusSyncReply@@PEAU_GstBus@@PEAU_GstMessage@@PEAX@Z)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_bus_set_sync_handler referenced in function "public: virtual void __cdecl EMDSVideoDisplayOutput::Initialize(void)" (?Initialize@EMDSVideoDisplayOutput@@UEAAXXZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_bus_add_signal_watch referenced in function "public: virtual void __cdecl EMDSVideoDisplayOutput::Initialize(void)" (?Initialize@EMDSVideoDisplayOutput@@UEAAXXZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_element_get_type referenced in function "public: __cdecl EMDSVideoDisplayOutput::EMDSVideoDisplayOutput(void)" (??0EMDSVideoDisplayOutput@@QEAA@XZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_element_get_static_pad referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl EMDSVideoDisplayOutput::GetStreamMetadata(void)" (?GetStreamMetadata@EMDSVideoDisplayOutput@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_element_set_state referenced in function "public: __cdecl EMDSVideoDisplayOutput::EMDSVideoDisplayOutput(void)" (??0EMDSVideoDisplayOutput@@QEAA@XZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_bin_get_type referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl EMDSVideoDisplayOutput::GetStreamMetadata(void)" (?GetStreamMetadata@EMDSVideoDisplayOutput@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_bin_get_by_name referenced in function "public: virtual void __cdecl DisplayFrameHandler::FrameReady(void *,class EMDSBuffer *)" (?FrameReady@DisplayFrameHandler@@UEAAXPEAXPEAVEMDSBuffer@@@Z)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_child_proxy_set_property referenced in function "enum GstBusSyncReply __cdecl bus_sync_handler(struct _GstBus *,struct _GstMessage *,void *)" (?bus_sync_handler@@YA?AW4GstBusSyncReply@@PEAU_GstBus@@PEAU_GstMessage@@PEAX@Z)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_pipeline_get_type referenced in function "public: virtual void __cdecl EMDSVideoDisplayOutput::Initialize(void)" (?Initialize@EMDSVideoDisplayOutput@@UEAAXXZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_pipeline_get_bus referenced in function "public: virtual void __cdecl EMDSVideoDisplayOutput::Initialize(void)" (?Initialize@EMDSVideoDisplayOutput@@UEAAXXZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_parse_launch referenced in function "public: virtual void __cdecl EMDSVideoDisplayOutput::Initialize(void)" (?Initialize@EMDSVideoDisplayOutput@@UEAAXXZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_init referenced in function "public: __cdecl EMDSVideoOutput::EMDSVideoOutput(void)" (??0EMDSVideoOutput@@QEAA@XZ)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_app_src_push_buffer referenced in function "public: virtual void __cdecl DisplayFrameHandler::FrameReady(void *,class EMDSBuffer *)" (?FrameReady@DisplayFrameHandler@@UEAAXPEAXPEAVEMDSBuffer@@@Z)
3>VideoOutput.obj : error LNK2019: unresolved external symbol gst_app_buffer_new referenced in function "public: virtual void __cdecl DisplayFrameHandler::FrameReady(void *,class EMDSBuffer *)" (?FrameReady@DisplayFrameHandler@@UEAAXPEAXPEAVEMDSBuffer@@@Z)
3>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\..\thirdparty\gstreamer-sdk\win32\0.10\x86\lib\gstreamer-0.10.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
3>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\..\thirdparty\gstreamer-sdk\win32\0.10\x86\lib\glib-2.0.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
3>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\..\thirdparty\gstreamer-sdk\win32\0.10\x86\lib\gstapp-0.10.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
3>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\..\thirdparty\gstreamer-sdk\win32\0.10\x86\lib\gobject-2.0.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
3>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\x64\Debug\VideoSubscriber.exe : fatal error LNK1120: 25 unresolved externals
3>Done building project "VideoSubscriber_vs2017.vcxproj" -- FAILED.
2>Generating Code...
2>VideoSource.obj : error LNK2019: unresolved external symbol g_type_check_instance_cast referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol g_signal_connect_data referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol g_object_set referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_object_get_name referenced in function "void __cdecl EMDSVideoSource_detect_new_pad(struct _GstElement *,struct _GstPad *,void *)" (?EMDSVideoSource_detect_new_pad@@YAXPEAU_GstElement@@PEAU_GstPad@@PEAX@Z)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_object_unref referenced in function "void __cdecl EMDSVideoSource_detect_new_pad(struct _GstElement *,struct _GstPad *,void *)" (?EMDSVideoSource_detect_new_pad@@YAXPEAU_GstElement@@PEAU_GstPad@@PEAX@Z)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_caps_is_always_compatible referenced in function "public: bool __cdecl EMDSVideoSource::IsMetadataCompatible(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?IsMetadataCompatible@EMDSVideoSource@@QEAA_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_caps_to_string referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl EMDSVideoSource::GetStreamMetadata(void)" (?GetStreamMetadata@EMDSVideoSource@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_caps_from_string referenced in function "public: bool __cdecl EMDSVideoSource::IsMetadataCompatible(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?IsMetadataCompatible@EMDSVideoSource@@QEAA_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_pad_link referenced in function "void __cdecl EMDSVideoSource_detect_new_pad(struct _GstElement *,struct _GstPad *,void *)" (?EMDSVideoSource_detect_new_pad@@YAXPEAU_GstElement@@PEAU_GstPad@@PEAX@Z)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_pad_get_allowed_caps referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl EMDSVideoSource::GetStreamMetadata(void)" (?GetStreamMetadata@EMDSVideoSource@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_element_factory_make referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_element_get_type referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_element_get_static_pad referenced in function "void __cdecl EMDSVideoSource_detect_new_pad(struct _GstElement *,struct _GstPad *,void *)" (?EMDSVideoSource_detect_new_pad@@YAXPEAU_GstElement@@PEAU_GstPad@@PEAX@Z)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_element_set_state referenced in function "void __cdecl EMDSVideoSource_detect_new_pad(struct _GstElement *,struct _GstPad *,void *)" (?EMDSVideoSource_detect_new_pad@@YAXPEAU_GstElement@@PEAU_GstPad@@PEAX@Z)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_bin_get_type referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_bin_add referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_pipeline_get_type referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_pipeline_new referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_element_link referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_bin_add_many referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_init referenced in function "public: int __cdecl EMDSVideoSource::Initialize(void)" (?Initialize@EMDSVideoSource@@QEAAHXZ)
2>VideoSource.obj : error LNK2019: unresolved external symbol gst_app_sink_pull_buffer referenced in function "void * __cdecl video_source_worker(void *)" (?video_source_worker@@YAPEAXPEAX@Z)
2>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\..\thirdparty\gstreamer-sdk\win32\0.10\x86\lib\gobject-2.0.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
2>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\..\thirdparty\gstreamer-sdk\win32\0.10\x86\lib\gstreamer-0.10.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
2>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\..\thirdparty\gstreamer-sdk\win32\0.10\x86\lib\glib-2.0.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
2>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\..\thirdparty\gstreamer-sdk\win32\0.10\x86\lib\gstapp-0.10.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
2>D:\Programming\rticonnextdds-usecases\VideoData\ExampleCode\win32\x64\Debug\VideoPublisher.exe : fatal error LNK1120: 22 unresolved externals
2>Done building project "VideoPublisher_vs2017.vcxproj" -- FAILED.
========== Build: 1 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

Do you have any suggestions to this?

Howard's picture
Offline
Last seen: 11 hours 41 min ago
Joined: 11/29/2012
Posts: 569

The VideoData project is supposed to be compiled as 32-bit applications.  This is because, the 3rd party open source library that is provided in the distribution, gstreamer, is only provided as 32-bit DLLs.  Which means the entire app needs to be compiled as a 32 configuration.

You should change your configuration back to 32 bit and you'll need 32 bit libraries for RTI Connext DDS.  Then you should set the environment variables mentioned by Gary correctly.  If you want to use a provided script, you should use one that is 32 bit, like

C:\rti_connext_dds-6.0.1\resource\scripts\rtisetenv_i86Win32VS20175.bat