0

My program compiles on Debian, but Fedora has another package named ncurses-static. I compile:

$gcc -std=c99 -static moje.o pliki.o -o static_file -lncursesw -ltinfo

I get 2 errors:

/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libncursesw.a(lib_mouse.o): In function `enable_gpm_mouse':

and

undefined reference to `dlclose'

How can I compile a static program with ncursesw in Fedora?

I can't compile ncurses itself I would do it in normal Fedora system.

Andrew Regan
  • 5,087
  • 6
  • 37
  • 73
Eliasz Łukasz
  • 478
  • 1
  • 3
  • 17
  • 1
    Can you just link to ˋdlˋ (ˋ-ldlˋ)? – Simpl Sep 24 '19 at 12:57
  • I do this. And prewiously showing what I get /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libncursesw.a(lib_mouse.o): In function `load_gpm_library': (.text+0x5b8): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking (who deleting my comment i dont know) – Eliasz Łukasz Sep 25 '19 at 10:44

0 Answers0