Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library does not link to gctpc #299

Open
AlysonStahl-NOAA opened this issue Nov 29, 2024 · 0 comments · May be fixed by #300
Open

Library does not link to gctpc #299

AlysonStahl-NOAA opened this issue Nov 29, 2024 · 0 comments · May be fixed by #300

Comments

@AlysonStahl-NOAA
Copy link
Collaborator

Using the static or shared libraries results in several undefined references to functions in the gctpc subfolder. That's because the link to gctpc is commented out for the libraries:

target_link_libraries(wgrib2_exe PRIVATE gctpc -lm)
if(BUILD_LIB)
  set(headers wgrib2_api.h wgrib2.h ${CMAKE_BINARY_DIR}/wgrib2/wgrib2_meta.h)
##   target_link_libraries(wgrib2_lib PUBLIC gctpc)
  set_target_properties(wgrib2_lib PROPERTIES PUBLIC_HEADER "${headers}")
  target_compile_definitions(wgrib2_lib PUBLIC ${definitions_list})
  
  install(
    TARGETS wgrib2_lib
    EXPORT wgrib2_exports
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
    )
  
endif()
@AlysonStahl-NOAA AlysonStahl-NOAA changed the title Library does not link properly to gctpc Library does not link to gctpc Nov 29, 2024
@AlysonStahl-NOAA AlysonStahl-NOAA linked a pull request Nov 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant