FLTK logo

Re: [fltk/fltk] Missing symbols when building with MSVC 2022 and CMAKE_BUILD_TYPE to RelWithDebInfo (Issue #960)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] Missing symbols when building with MSVC 2022 and CMAKE_BUILD_TYPE to RelWithDebInfo (Issue #960) Albrecht Schlosser 08:25 Apr 27  
 

@ggarra13 Can you please try the patch below? This should define the macro FL_DLL in MSVC (Visual Studio) projects that link to the shared FLTK library.

diff --git a/CMake/fl_add_library.cmake b/CMake/fl_add_library.cmake
index ebf9e28c0..c4e5f91c4 100644
--- a/CMake/fl_add_library.cmake
+++ b/CMake/fl_add_library.cmake
@@ -197,7 +197,7 @@ function(fl_add_library LIBNAME LIBTYPE SOURCES)
         OUTPUT_NAME_DEBUG   ${LIBNAME}_dlld
         OUTPUT_NAME_RELEASE ${LIBNAME}_dll
       )
-      target_compile_definitions(${TARGET_NAME} PRIVATE FL_DLL)
+      target_compile_definitions(${TARGET_NAME} PUBLIC FL_DLL)
     endif(MSVC)
   endif(LIBTYPE STREQUAL "SHARED")
 

Please let me know if this fixes the issue for your (example) project. Note that I'm not going to build your project myself (it's too large for me to check the details for such a tiny issue).


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/960/2080899752@github.com>

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.