rageworx / fl_imgtk

FLTK image toolkit for some useful effects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Makefile.llvm need fix for Linux

Luciogi opened this issue · comments

Hi, I am using Artix Linux (Arch Linux based distro), I did not have llvm-g++ and llvm-gcc
I am not sure , llvm-g++ and llvm-gcc only available in MacOS.
On Linux we have clang and clang++

GPP = llvm-g++

Dear @Luciogi ,

On Linux we have clang and clang++

I'm using aarch64 Linux (my designed board, using debian-9, or 10)
image

Looks your case is for 'Artix Linux', sorry for missing other cases like you.
LLVM also availed for Linux (you can find your package installer).
And I'm using gcc (actually gcc is a collector, not real compiler) through Makefile.gcc.
I recommend to copy Makefile.gcc to Makefile.clang, then change these part to clang.
image

$ cp Makefile.gcc Makefile.clang
$ ln -s Makefile.clang Makefile
$ vi Makefile

If is it works fine, let result here.
I will include Makefile.clang for your case.

+++ Makefile.clang      2023-06-30 14:56:51.354718441 +0500
@@ -18,8 +18,8 @@
 #########################################################################
 
 # Compiler configure.
-GCC = ${CCPATH}gcc
-GPP = ${CCPATH}g++
+GCC = ${CCPATH}clang++
+GPP = ${CCPATH}clang++
 AR  = ${CCPATH}ar
 
 # FLTK place

Building library logs make -f Makefile.clang

Cleaning built directories ...
clang-15: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang-15: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang-15: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
clang-15: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
Generating lib/libfl_imgtk.a ...
ar: creating lib/libfl_imgtk.a


compiling test.cpp with clang++ test.cpp -lfltk -lfltk_images -L../fl_imgtk/lib/ -lfl_imgtk

/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::makeanempty(unsigned int, unsigned int, unsigned int, unsigned long)':
fl_imgtk.cpp:(.text+0x16e): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x20a): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined.':
fl_imgtk.cpp:(.text+0x2fe): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x352): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..1':
fl_imgtk.cpp:(.text+0x3fc): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x450): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::fliphorizontal(Fl_RGB_Image*)':
fl_imgtk.cpp:(.text+0x1048): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..2':
fl_imgtk.cpp:(.text+0x1148): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x1260): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::fliphorizontal_ex(Fl_RGB_Image*)':
fl_imgtk.cpp:(.text+0x133a): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..3':
fl_imgtk.cpp:(.text+0x13f9): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x1517): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::flipvertical(Fl_RGB_Image*)':
fl_imgtk.cpp:(.text+0x1602): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..4':
fl_imgtk.cpp:(.text+0x16fd): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x1819): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::flipvertical_ex(Fl_RGB_Image*)':
fl_imgtk.cpp:(.text+0x18dd): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..5':
fl_imgtk.cpp:(.text+0x1998): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x1ab4): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::rotate90(Fl_RGB_Image*)':
fl_imgtk.cpp:(.text+0x1bba): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..6':
fl_imgtk.cpp:(.text+0x1cbc): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x1d33): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::rotate180(Fl_RGB_Image*)':
fl_imgtk.cpp:(.text+0x1e0d): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..7':
fl_imgtk.cpp:(.text+0x1f02): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x1fbd): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::rotate270(Fl_RGB_Image*)':
fl_imgtk.cpp:(.text+0x20a5): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..8':
fl_imgtk.cpp:(.text+0x21a5): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x2252): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::rotatefree(Fl_RGB_Image*, float)':
fl_imgtk.cpp:(.text+0x2572): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..9':
fl_imgtk.cpp:(.text+0x266f): undefined reference to `__kmpc_for_static_init_8'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x28f0): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk_curve(Fl_RGB_Image*, unsigned char const*)':
fl_imgtk.cpp:(.text+0x29d8): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..10':
fl_imgtk.cpp:(.text+0x2acd): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x2b3f): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk_curve_ex(Fl_RGB_Image*, unsigned char const*)':
fl_imgtk.cpp:(.text+0x2c04): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..11':
fl_imgtk.cpp:(.text+0x2cbf): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x2d33): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::invert(Fl_RGB_Image*)':
fl_imgtk.cpp:(.text+0x4be3): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..12':
fl_imgtk.cpp:(.text+0x4cd5): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x4d56): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::invert_ex(Fl_RGB_Image*)':
fl_imgtk.cpp:(.text+0x4e14): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..13':
fl_imgtk.cpp:(.text+0x4ed3): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x4f36): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::filtered(Fl_RGB_Image*, fl_imgtk::kfconfig*)':
fl_imgtk.cpp:(.text+0x5067): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..14':
fl_imgtk.cpp:(.text+0x5166): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x53f5): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::filtered_ex(Fl_RGB_Image*, fl_imgtk::kfconfig*)':
fl_imgtk.cpp:(.text+0x54f5): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..15':
fl_imgtk.cpp:(.text+0x55ad): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x5823): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk_gen_lowfreq(unsigned char**, unsigned char const*, unsigned int, unsigned int, unsigned int, unsigned int)':
fl_imgtk.cpp:(.text+0x5945): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..16':
fl_imgtk.cpp:(.text+0x5a0c): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x5c03): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::edgeenhance(Fl_RGB_Image*, unsigned int, unsigned int)':
fl_imgtk.cpp:(.text+0x5dcc): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..17':
fl_imgtk.cpp:(.text+0x5f00): undefined reference to `__kmpc_for_static_init_8'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x60bd): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::edgeenhance_ex(Fl_RGB_Image*, unsigned int, unsigned int)':
fl_imgtk.cpp:(.text+0x6204): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..18':
fl_imgtk.cpp:(.text+0x62fc): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x6427): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::crop(Fl_RGB_Image*, unsigned int, unsigned int, unsigned int, unsigned int)':
fl_imgtk.cpp:(.text+0x6e9b): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..19':
fl_imgtk.cpp:(.text+0x6f7d): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x70bb): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk_convertrgb(unsigned char*&, unsigned int, unsigned int, unsigned int, unsigned char*, unsigned int)':
fl_imgtk.cpp:(.text+0x71b9): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..20':
fl_imgtk.cpp:(.text+0x7267): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x730b): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..21':
fl_imgtk.cpp:(.text+0x73b6): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x744b): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk_putimgonbuffer(unsigned char*, unsigned int, unsigned int, unsigned int, Fl_RGB_Image*, int, int, float)':
fl_imgtk.cpp:(.text+0x76e0): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x7740): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..22':
fl_imgtk.cpp:(.text+0x7840): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x7b16): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..23':
fl_imgtk.cpp:(.text+0x7bc7): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x7c32): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..24':
fl_imgtk.cpp:(.text+0x7cdd): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x7d4a): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk_subimgonbuffer(unsigned char*, unsigned int, unsigned int, unsigned int, Fl_RGB_Image*, int, int, float)':
fl_imgtk.cpp:(.text+0x7fe8): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x8045): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..25':
fl_imgtk.cpp:(.text+0x8145): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x8339): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..26':
fl_imgtk.cpp:(.text+0x83e4): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x844f): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..27':
fl_imgtk.cpp:(.text+0x84fa): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x8567): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::makealphamap(unsigned char*&, Fl_RGB_Image*, float)':
fl_imgtk.cpp:(.text+0x89c7): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..28':
fl_imgtk.cpp:(.text+0x8a6f): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x8acb): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..29':
fl_imgtk.cpp:(.text+0x8b76): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x8c0a): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::applyalpha(Fl_RGB_Image*, float)':
fl_imgtk.cpp:(.text+0x8d3a): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x8d66): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..30':
fl_imgtk.cpp:(.text+0x8e50): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x8ead): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..31':
fl_imgtk.cpp:(.text+0x8f54): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x8faa): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::applyalpha(Fl_RGB_Image*, unsigned char*, unsigned int)':
fl_imgtk.cpp:(.text+0x9088): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x90c2): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..32':
fl_imgtk.cpp:(.text+0x91b2): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x920a): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..33':
fl_imgtk.cpp:(.text+0x92b1): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x92f8): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::applyalpha_ex(Fl_RGB_Image*, float)':
fl_imgtk.cpp:(.text+0x93a3): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..34':
fl_imgtk.cpp:(.text+0x9442): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x9498): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..35':
fl_imgtk.cpp:(.text+0x9540): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x95ab): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::makegradation_h(unsigned int, unsigned int, unsigned long, unsigned long, bool)':
fl_imgtk.cpp:(.text+0x9770): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..36':
fl_imgtk.cpp:(.text+0x9877): undefined reference to `__kmpc_for_static_init_8'
/usr/bin/ld: fl_imgtk.cpp:(.text+0x9b65): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::makegradation_v(unsigned int, unsigned int, unsigned long, unsigned long, bool)':
fl_imgtk.cpp:(.text+0x9cd1): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..37':
fl_imgtk.cpp:(.text+0x9dd2): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0xa0e5): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::draw_smooth_line_ex(Fl_RGB_Image*, int, int, int, int, float, unsigned long)':
fl_imgtk.cpp:(.text+0xb16d): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..41':
fl_imgtk.cpp:(.text+0xb221): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0xb510): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `fl_imgtk::draw_fillrect(Fl_RGB_Image*, int, int, int, int, unsigned long)':
fl_imgtk.cpp:(.text+0xbde3): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_imgtk.o): in function `.omp_outlined..42':
fl_imgtk.cpp:(.text+0xbe9b): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_imgtk.cpp:(.text+0xc092): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `WeightsTable::WeightsTable(GenericFilter*, unsigned int, unsigned int)':
fl_smimg.cpp:(.text+0x12f): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `.omp_outlined.':
fl_smimg.cpp:(.text+0x1e4): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_smimg.cpp:(.text+0x20f): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `ResizeEngine::horizontalFilter(unsigned char const*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned char*, unsigned int)':
fl_smimg.cpp:(.text+0x84f): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: fl_smimg.cpp:(.text+0x8a5): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `ResizeEngine::verticalFilter(unsigned char const*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned char*, unsigned int, unsigned int)':
fl_smimg.cpp:(.text+0x9a7): undefined reference to `__kmpc_fork_call'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `.omp_outlined..1':
fl_smimg.cpp:(.text+0xa65): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_smimg.cpp:(.text+0xbe5): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `.omp_outlined..2':
fl_smimg.cpp:(.text+0xc95): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_smimg.cpp:(.text+0xe46): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `.omp_outlined..3':
fl_smimg.cpp:(.text+0xef6): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_smimg.cpp:(.text+0x1144): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `.omp_outlined..4':
fl_smimg.cpp:(.text+0x11f4): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_smimg.cpp:(.text+0x1472): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `.omp_outlined..5':
fl_smimg.cpp:(.text+0x1528): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_smimg.cpp:(.text+0x16c4): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `.omp_outlined..6':
fl_smimg.cpp:(.text+0x1779): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_smimg.cpp:(.text+0x193f): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `.omp_outlined..7':
fl_smimg.cpp:(.text+0x19f4): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_smimg.cpp:(.text+0x1c4a): undefined reference to `__kmpc_for_static_fini'
/usr/bin/ld: ../fl_imgtk/lib//libfl_imgtk.a(fl_smimg.o): in function `.omp_outlined..8':
fl_smimg.cpp:(.text+0x1cff): undefined reference to `__kmpc_for_static_init_8u'
/usr/bin/ld: fl_smimg.cpp:(.text+0x1f81): undefined reference to `__kmpc_for_static_fini'
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)`

--- Makefile.gcc        2023-06-30 14:43:48.558364112 +0500
+++ Makefile.clang      2023-06-30 15:01:39.978841482 +0500
@@ -18,8 +18,8 @@
 #########################################################################
 
 # Compiler configure.
-GCC = ${CCPATH}gcc
-GPP = ${CCPATH}g++
+GCC = ${CCPATH}clang++
+GPP = ${CCPATH}clang++
 AR  = ${CCPATH}ar
 
 # FLTK place
@@ -35,7 +35,7 @@
 OUTDIR      = ./lib
 DEFINEOPT   = -DUSING_INTERPOLATED_ROTATE_FREE -DUSING_OMP
 DEFINEOPT  += -DFLTK_ABI_VERISON=10304
-OPTIMIZEOPT = -ffast-math -fopenmp -Os -s
+OPTIMIZEOPT = -ffast-math -Os -s
 CPUARCHOPT  =
 
 ifeq (debug,$(firstword $(MAKECMDGOALS)))

compiling testfile clang++ test.cpp -lfltk -lfltk_images -L../fl_imgtk/lib/ -lfl_imgtk does not produce above errors

Dear @Luciogi ,

I think you don't know symbolic link difference between openmp and non-openmp.
That's OK, It's not your fault !

Anyway, I think you always need to use -fopenmp when fl_imgtk built as openmp model.

There are two choices, maybe, Arch-Linux llvm looks different link mechanism,

  • Build fl_imgtk as non-openmp.
    • Linker want to find normal symbols in fl_imgtk but can't because fl_imgtk built with openmp, it has different symbols.
  • Build all sources with -fopenmp in your project.
    • Linker may find normal symbols in fl_imgtk as exported symbol.

In case of macOS,

  • I can use llvm from homebrew, not from Xcode.
  • Homebrew llvm supports libomp, yes llvm has -fopenmp.
  • But static library not able to be linked with Xcode ojbects, so I need fl_imgtk build to dylib(so).
  • It works, but not able to build universal binary (Apple has universal binary architecture to contains multiple machine code in a mach-O image. ragard a mach-O is an ELF)

You can,

  • Build fl_imgtk to shared object with -fopenmp
  • Build your non-oepnmp model with fl_imgtk.so in link time.
    clang++ main.o ${WHERE_FLIMGTK}/fl_imgtk.so -o ${YOUR_ELF}

Also,

  • You can remove -s in Makefile, macOS llvm/clang doesn't have -s too, even no openmp.
  • You can copy fl_imgtk.so to /usr/local/lib as sudoer if you want to use fl_imgtk.so anywhere in your Linux.
  • Don't forget run sudo ldconfig after copy fl_imgtk.so (Only once after copy shared object).

Hope it can help your project.

Dear @Luciogi ,

Here's my another application source code using fl_imgtk, https://bitbucket.org/rageworx/make_img_o_hdr/src/master/.
You can refer to mine.

Plus, here's a sample more easier understanding Fl_RGB_Image buffer control, https://github.com/rageworx/fltk-cpp-barcode.

Regards, Raph.

Thanks for explaining. You may close issues

Thanks for explaining. You may close issues

Thank you !