Linker error when creating 1.9 FrontEnd device create from IDE using default

若如初见. 提交于 2019-12-13 05:37:40

问题


Using:

Redhawk 1.9 / CentOS 6.4 (32 bit) / C++ implementation

Creating a new FRONTEND::TUNER device

Using default setting on code generation. Following port required for FRONTEND Digital Tuner and regenerate the code.

<ports>
  <provides repid="IDL:FRONTEND/DigitalTuner:1.0" providesname="DigitalTuner"/>
  <provides repid="IDL:FRONTEND/RFInfo:1.0" providesname="RFInfo"/>
</ports>

After generating code make updates to port_impl.h and port_impl.cpp to get around the problem as defined in: error: cannot allocate an object of abstract type ‘FRONTEND_RFInfo_In_i.

After making updates to port_impl.h and port_impl.cpp recompile the code. It compiles, but we get the linker error below.

/usr/local/redhawk/core/lib/libfrontendInterfaces.so: undefined reference to `BULKIO::PrecisionUTCTime::operator<<=(cdrStream&)'

/usr/local/redhawk/core/lib/libfrontendInterfaces.so: undefined reference to `BULKIO::PrecisionUTCTime::operator>>=(cdrStream&) const'

It appears to be not able to get this methods in the bulkio libraries.


回答1:


This issue is a known bug in the 1.9.0 release for C++ devices that have Front End Interfaces based ports and no bulkIO based ports. It was discovered just recently and has been logged. There is a dependency on bulkIO Interfaces in FrontEnd Interface based ports and the linking of bulkio needs to be added to the configure.ac file (which is auto generated).

You may resolve the issue one of two ways.

1.) Ideally, your front end interfaces compliant device would also contain a bulkIO based input or output port. By simply having a bulkIO based port on your device the dependency will be added to the configure.ac and proper linking will occur.

2.) If for whatever reason your device contains a Front End Interfaces port but does not contain a bulkIO port, you may modify the configure.ac file found within your project and explicitly add the dependency.

-PKG_CHECK_MODULES([INTERFACEDEPS], [frontendInterfaces]) +PKG_CHECK_MODULES([INTERFACEDEPS], [frontendInterfaces, bulkio >= 1.0 bulkioInterfaces >= 1.9])

Take note that when you modify the configure.ac file manually, it will no longer be generated via the code-generators by default when you select Generate Code in the IDE. This may cause issues if you continue to modify your device and regenerate code as it could potentially add additional dependencies. My advice would be to either, allow the code-generators to regenerate the configure.ac file by selecting it in the "Regenerate Files" Dialog when you select Generate Code, then make the edits mentioned above.

Or, if you will be regenerating often you could temporarily place a bulkIO based input or output port on your device. By doing this you would not need to edit the configure.ac file until you've completed your device and remove the temporary bulkio port.



来源:https://stackoverflow.com/questions/20621726/linker-error-when-creating-1-9-frontend-device-create-from-ide-using-default

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!