This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf-ble-driver library inside visual studio dynamic library

Hello,

I integrated the nrf-ble-driver static library in a dynamic library that is going to be used in a Windows C# application (through a wrapper), as show the picture below (scenario B).

When the Dynamic library is build in Debug mode, the linker show the following errors:

1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(ble_gap_impl.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(ble_gap_impl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(ble_gattc_impl.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(ble_gattc_impl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(ble_gatts_impl.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(ble_gatts_impl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(ble_impl.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(ble_impl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(sd_rpc_impl.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(sd_rpc_impl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(ble_common.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(ble_common.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(app_ble_gap.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(app_ble_gap.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(uart_transport.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(uart_transport.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(h5_transport.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(h5_transport.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(serialization_transport.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(serialization_transport.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(adapter_internal.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(adapter_internal.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(serial_port_enum.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(serial_port_enum.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(transport.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(transport.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(uart_settings.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(uart_settings.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(uart_settings_boost.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(uart_settings_boost.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(h5.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(h5.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(slip.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(slip.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(jlinkid_reg_lookup.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in DeviceInfo.obj
1>nrf-ble-driver-sd_api_v6-mt-static-4_1_1.lib(jlinkid_reg_lookup.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in DeviceInfo.obj

Appreciated any feedback to solve this scenario (B debug mode).

If you have another approach (i.e. scenario C) to integrate the nrf-ble-driver in a Windows C# application will be appreciated as well.

Thanks

Parents Reply
  • Hi,

    Thanks for your feedback.

    According with the post in SO (in fact, was an author profile link where I found this link which I suppose is the one you are referring to). It seem I'm mixing my code (from the custom DLL library) in debug mode with the nrf-ble-driver-sd_api_v6-mt-static-4_1_1/lib static library which probably was build on release mode. It this your conclusion, right?

    I didn't built the library. I integrated the prebuilt release.

    In other hand, your comment allows me to create an scenario C, where the pc-ble-driver is linking with the non-static library (nrf-ble-driver-sd_api_v6-mt-4_1_1.lib) in order build the Windows Application in debug mode. In this case, I would need to deploy the custom DLL and the nrf-ble-driver DLL as well.

    Thanks

Children
No Data
Related