hackrf_ook icon indicating copy to clipboard operation
hackrf_ook copied to clipboard

Build fails on MacOS due to glib

Open RobertoD91 opened this issue 5 years ago • 0 comments

last glib-2.0 installed with brew

after make i have this error:

Scanning dependencies of target hackrf_ook
[ 50%] Building C object CMakeFiles/hackrf_ook.dir/hackrf_ook.c.o
[100%] Linking C executable hackrf_ook
ld: library not found for -lglib-2.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [hackrf_ook] Error 1
make[1]: *** [CMakeFiles/hackrf_ook.dir/all] Error 2
make: *** [all] Error 2

workaround:

cd CMakeFiles/hackrf_ook.dir/
gcc -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include/ -lglib-2.0 -lhackrf -o hackrf_ook hackrf_ook.c.o 

RobertoD91 avatar Dec 22 '20 13:12 RobertoD91