Skip to main content

Error in Acquistion.cpp

Answered

Comments

9 comments

  • Official comment
    TDY_Ifeanyi
    Community team
    Great answers
    Expert (Gold)

    Hello Silvia,

    With "sudo make", executable is moved to /opt/spinnaker/bin after compilation. Have you tried running the application from this bin folder? Besides, running similar command as you pointed out should generate executable in the same .Acquisition.cpp directory. i.e:

    g++ -std=c++11 -o Acquisition .obj/build/Acquisition.o -Wl,-Bdynamic -L../../lib -lSpinnaker  -Wl,-rpath-link=../../lib

    Please let me know if you find any of the above options helpful.

    Thanks,

    Ifeanyi

  • TDY_Ifeanyi
    Community team
    Great answers
    Expert (Gold)

    Hello Silvia,

    Does it work using make file path of example directory to compile the project? i.e:

    $ sudo make 

    Thanks,

    Ifeanyi

    0
  • Silvia DT

    Sorry, I didn't get how to use $ sudo make.

    I try to execute $ sudo make Acquisition and this is the output:

    ubuntu@ubuntu:/opt/spinnaker/src/Acquisition$ sudo make Acquisition
    g++ -std=c++11 -o Acquisition .obj/build/Acquisition.o -Wl,-Bdynamic -L../../lib -lSpinnaker  -Wl,-rpath-ink=../../lib
    mv Acquisition ../../bin

    but then when I try to compile I get the same error:

    ubuntu@ubuntu:/opt/spinnaker/src/Acquisition$ g++ Acquisition.cpp -o Acquisition
    Acquisition.cpp:42:10: fatal error: Spinnaker.h: No such file or directory
       42 | #include "Spinnaker.h"
          |          ^~~~~~~~~~~~~

     

    can you explain better how can I do? sorry but I'm a beginner with c++. thank you

    0
  • TDY_Ifeanyi
    Community team
    Great answers
    Expert (Gold)

    Hello Silvia,

    I mean to only enter "sudo make" from Acquisition directory:

    "ubuntu@ubuntu:/opt/spinnaker/src/Acquisition$ sudo make "

    I hope this helps to resolve the issue.

    Thanks,

    Ifeanyi

    0
  • Silvia DT

    So this is the same I've done before since the output is :

    ubuntu@ubuntu:/opt/spinnaker/src/Acquisition$ sudo make
    g++ -std=c++11 -o Acquisition .obj/build/Acquisition.o -Wl,-Bdynamic -L../../lib -lSpinnaker  -Wl,-rpath-link=../../lib
    mv Acquisition ../../bin

    But compiling Acquisition.cpp, it still give me the same error of before.

    I also try to move Spinnaker.h in the directory /opt/spinnaker/src/Acquisition/ but permission denied.

    other ideas? thank you very much

    0
  • Silvia DT

    Hello,

    thank you very much now I got it!

    but now I'm trying again to run Acquisition in the bin folder but this error occurs:

    ubuntu@rpi-lumio:/opt/spinnaker/bin$ ./Acquisition
    ./Acquisition: error while loading shared libraries: libSpinnaker.so.3: cannot open shared object file: No such file or directory

    I see the library is in this directory opt/spinnaker/lib , so why this error?

    thank you

    0
  • TDY_Ifeanyi
    Community team
    Great answers
    Expert (Gold)

    Hi Silvia,

    This may be related to access permission. Does it work with below command line?

    "$ sudo -E ./Acquisition"

    Thanks,

    Ifeanyi

    0
  • Silvia DT

    No, it doesn't work. same error:

    ubuntu@ubuntu:/opt/spinnaker/bin$ sudo -E ./Acquisition
    ./Acquisition: error while loading shared libraries: libSpinnaker.so.3: cannot open shared object file: No such file or directory

    is there another solution?

    thank you

    0
  • Silvia DT

    Hello,

    I solved the problem finally!

    thank you very much for your support and your timely responses.

    Silvia

    0

Please sign in to leave a comment.

Powered by Zendesk