ihedvall / mdflib

Implementation of the ASAM MDF data file.
https://ihedvall.github.io/mdflib/
MIT License
69 stars 29 forks source link

Added the 'phtread' link flag to fix the issue that the compilation routine could not be linked #81

Closed lss1330 closed 5 months ago

lss1330 commented 5 months ago

image

Simplxss commented 5 months ago

LINK : fatal error LNK1104: cannot open file 'pthread.lib' [\mdflib\build\msvc-vcpkg-x64\mdflibrary_example\mdflibraryexample.vcxproj]

pthread.lib is only need in gcc.

refer to 53d70feedcfa3222340467d259dade9fca238cc0

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.3 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0 AND NOT MINGW)
  # fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050
  target_link_libraries(mdflibrary PRIVATE pthread stdc++fs)
endif()