Skip to content

Commit

Permalink
Apply WINDOWS_EXPORT_ALL_SYMBOLS to dynamic libs as a workaround
Browse files Browse the repository at this point in the history
Symbols from the non-dynamic portions of the library are otherwise missing from the DLLs.

The dynamic lib examples fail to link due to the following missing symbols:

__cdecl InputFileStream::InputFileStream(char const *)
virtual __cdecl InputFileStream::~InputFileStream(void)
virtual struct StreamReadStatus __cdecl InputFileStream::ReadData(struct ReadDataStructure &)

__cdecl OutputFileStream::OutputFileStream(char const *)
virtual __cdecl OutputFileStream::~OutputFileStream(void)
virtual unsigned int __cdecl OutputFileStream::WriteData(char const *,unsigned int)

void __cdecl novatel::edie::oem::FileParser::SetEncodeFormat(enum novatel::edie::ENCODEFORMAT)
void __cdecl novatel::edie::oem::Parser::SetEncodeFormat(enum novatel::edie::ENCODEFORMAT)

This previously only worked due to the examples being linked against all libraries in the project.
  • Loading branch information
valgur committed Oct 26, 2023
1 parent 9c92fd8 commit a6c4f11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/decoders/dynamic_library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ add_library(decoders_dynamic_library SHARED
add_library(EDIE::decoders_dynamic_library ALIAS decoders_dynamic_library)
target_link_libraries(decoders_dynamic_library PUBLIC EDIE::hwinterface_dynamic_library EDIE::common_dependencies)

# FIXME: symbols from novatel and stream_interface classes are currently not exported correctly
set_property(TARGET decoders_dynamic_library PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON)

set_property(TARGET decoders_dynamic_library PROPERTY FOLDER "decoders")

if (WINDOWS)
Expand Down
3 changes: 3 additions & 0 deletions src/hw_interface/dynamic_library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ add_library(hwinterface_dynamic_library SHARED
add_library(EDIE::hwinterface_dynamic_library ALIAS hwinterface_dynamic_library)
target_link_libraries(hwinterface_dynamic_library PUBLIC EDIE::common_dependencies)

# FIXME: symbols from novatel and stream_interface classes are currently not exported correctly
set_property(TARGET hwinterface_dynamic_library PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON)

set_property(TARGET hwinterface_dynamic_library PROPERTY FOLDER "hw_interface")

if (WINDOWS)
Expand Down

0 comments on commit a6c4f11

Please sign in to comment.