Page 1 of 1

ubuntu 18.04 help -

Posted: Mon Sep 19, 2022 2:16 pm
by jimmyrig
I am updating an old pc running a working linux code with phidgets to a new pc. However i am running into issues with the phidget libraries.

I've installed per the linux support section and installed the c/c++ -dev side as well. Everything else is compiling fine so gcc is working.

Here is the error i am getting
make[2]: *** No rule to make target '/usr/lib/libphidget22', needed by '/home/nvidia/master.....

I checked that file location and it doesnt exist. Should it exist? or has the path changed since my original code was written?

For fun i tried to run the hello world example and had no luck their either, here is the error.

any help would be great!
Thanks



nvidia@RLF:~/Downloads/helloworld/HelloWorld_Example$ gcc HelloWorld.c -o example -lphidget22
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libphidget22.: undefined reference to `log@GLIBC_2.29'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libphidget22: undefined reference to `pow@GLIBC_2.29'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libphidget22: undefined reference to `exp@GLIBC_2.29'
collect2: error: ld returned 1 exit status

Re: ubuntu 18.04 help -

Posted: Tue Sep 20, 2022 3:28 pm
by Patrick
Looks like it's having trouble finding the math calls. Try adding -lm to your gcc command to link in the math library.

Did you install libphidget22 as a package or did you compile from source?

Are you trying to run an old binary from your previous machine without recompiling?

-Patrick