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

cfltk tries to link with libfltk.a when building shared libs #222

Open
khacng opened this issue Jun 8, 2023 · 1 comment
Open

cfltk tries to link with libfltk.a when building shared libs #222

khacng opened this issue Jun 8, 2023 · 1 comment

Comments

@khacng
Copy link

khacng commented Jun 8, 2023

I built cfltk with CFLTK_BUILD_SHARED=ON and it tried to link with libfltk.a instead of libfltk.so. Here's the log:

/sbin/ld: /usr/local/lib64/libfltk.a(Fl_Message.cxx.o): warning: relocation against FL_NORMAL_SIZE' in read-only section .text'
/sbin/ld: /usr/local/lib64/libfltk.a(Fl.cxx.o): relocation R_X86_64_PC32 against symbol `_ZN16Fl_Screen_Driver13system_driverE' can not be used when making a shared object; recompile with -fPIC
/sbin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/cfltk.dir/build.make:485: libcfltk.so.1.4.5] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/cfltk.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

@MoAlyousef
Copy link
Owner

CFLTK_BUILD_SHARED creates a standalone libcfltk.so library which no longer needs libfltk.so.
See here:
#184 (comment)

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

No branches or pull requests

2 participants