-
Notifications
You must be signed in to change notification settings - Fork 21
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
Shared lib #184
Comments
Thank you :) Can you can try the ˋ-DCFLTK_BUILD_SHARED` flag when configuring cmake. |
Any other recommendations you would like to give me, I have the following problem
|
I have updated the CMakeLists.txt to add set_target_properties(cfltk PROPERTIES POSITION_INDEPENDENT_CODE ON) when building a shared library. Can you try again after pulling the last changes? |
similar result with the last commit , could you replicate this and see if I am doing something wrong?
|
Sure will do. But it’ll be when I get back to my dev machine after the weekend. |
I tried it on a VM, can you try the following invocation:
Notice the last 3 cmake flags, also the removal of |
I compile without problem, but I don't link correctly, I haven't tested it yet, but this is what ldd shows me
Needless to say I am very grateful for your attention, I will keep trying and I will keep you informed. |
Hmm It seems shared libcfltk won't work with system image libs. I'll need to investigate further.
|
When building a dynamic library, I get the error of not having a PNG library: Build log$ cmake -B . -S ../cfltk/ \ -DCMAKE_BUILD_TYPE=Release \ -DOPTION_USE_SYSTEM_LIBJPEG=OFF \ -DOPTION_USE_SYSTEM_ZLIB=OFF \ -DOPTION_USE_GL=OFF \ -DFLTK_BUILD_EXAMPLES=OFF \ -DFLTK_BUILD_TEST=OFF \ -DOPTION_USE_THREADS=ON \ -DOPTION_LARGE_FILE=ON \ -DOPTION_BUILD_HTML_DOCUMENTATION=OFF \ -DOPTION_BUILD_PDF_DOCUMENTATION=OFF \ -DCFLTK_BUILD_SHARED=ON-- The C compiler identification is GNU 12.1.1 -- Configuration Summary for FLTK 1.4.0 generated by CMake 3.23.1 -- -- The following OPTIONAL packages have been found:
-- The following OPTIONAL packages have not been found:
-- Static libraries will be built in /home/alexander/programming/c/build_cfltk/fltk/lib -- End of Configuration Summary -- -- Configuring done |
I'm sorry, my inattention: -- Shared libraries will not be built (set OPTION_BUILD_SHARED_LIBS=ON to build) |
If you don't need fltk image support, make sure you have libpng-dev is installed.
To get built-in image support:
|
Greetings, great job.
Any recommendations for building cfltk dynamically, currently build
libcfltk.a
, but would like alibcfltk.so
insteadI tried with -DOPTION_BUILD_SHARED_LIBS=ON but it only works for fltk, cfltk stays the same.
The text was updated successfully, but these errors were encountered: