mpicc -o Tvtigpufd -L/usr/local/cuda-12.1/lib64 -lcudart -lcurand -w -lm `pkg-config --cflags --libs gtk+-2.0` GTK_main.o GPU_vti2dfd_kernels.o CPU_vti2dfd_kernels.o GPU_vti3dfd_kernels.o
/usr/bin/ld: GTK_main.o: in function `on_menu_activate':
GTK_main.c:(.text+0x27): undefined reference to `g_print'
/usr/bin/ld: GTK_main.o: in function `on_button_clicked':
GTK_main.c:(.text+0x55): undefined reference to `g_print'
/usr/bin/ld: GTK_main.o: in function `About_window':
GTK_main.c:(.text+0x6a): undefined reference to `gtk_window_new'
/usr/bin/ld: GTK_main.c:(.text+0x73): undefined reference to `gtk_window_get_type'
/usr/bin/ld: GTK_main.c:(.text+0x85): undefined reference to `g_type_check_instance_cast'
/usr/bin/ld: GTK_main.c:(.text+0x9a): undefined reference to `gtk_window_set_title'
/usr/bin/ld: GTK_main.c:(.text+0x9f): undefined reference to `gtk_window_get_type'
...
/usr/bin/ld: CPU_vti2dfd_kernels.o:CPU_vti2dfd_kernels.c:(.text+0x15a3e): more undefined references to `pow' follow
/usr/bin/ld: CPU_vti2dfd_kernels.o: in function `mute_directwave':
CPU_vti2dfd_kernels.c:(.text+0x164b8): undefined reference to `sqrtf'
/usr/bin/ld: CPU_vti2dfd_kernels.o: in function `CPU_vti2dfd':
CPU_vti2dfd_kernels.c:(.text+0x16a1c): undefined reference to `sqrtf'
collect2: error: ld returned 1 exit status
make: *** [Makefile:27: all] Error 1
在编译和链接过程中遇到未定义符号的错误
具体错误信息如下
修正
Makefile
中的链接顺序?