Error when compiling a c++ file with Astra SDK libraries

Hi, I’m having problems when trying to compile the following c++ file, which is just a test for the library:

#include <astra/astra.hpp>
int main(int argc, char** argv){ 
     
    astra::initialize(); 

    astra::terminate(); 

    return 0; 
} 

I’m using these commands to compile:
g++ -std=c++11 -I/opt/astra/include -o main main.cpp

And the result is the following output:

g++ -std=c++11 -I/opt/astra/include -o main main.cpp
/tmp/ccCBySQc.o: In function astra::initialize()': main.cpp:(.text._ZN5astra10initializeEv[_ZN5astra10initializeEv]+0x5): undefined reference to astra_initialize’
/tmp/ccCBySQc.o: In function astra::terminate()': main.cpp:(.text._ZN5astra9terminateEv[_ZN5astra9terminateEv]+0x5): undefined reference to astra_terminate’
collect2: error: ld returned 1 exit status
Makefile:2: recipe for target ‘all’ failed
make: *** [all] Error 1

Thanks in advance for anyone that can help.

Those are linker errors. The compiler cant find the function definitions for astra::initialize and terminate. Try passing -lastra -lastra_core -lastra_core_api

Thank you for your answer. However, I’m still getting errors:

g++ -std=c++11 -I/opt/astra/include -lastra -lastra_core -lastra_core_api -o main main.cpp
/usr/bin/ld: cannot find -lastra
/usr/bin/ld: cannot find -lastra_core
/usr/bin/ld: cannot find -lastra_core_api
collect2: error: ld returned 1 exit status
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1

Looks like it is looking on /usr/bin for such libraries. I tried using -L/opt/astra/include but I got the same errors.

-L/path/to/library/ where /path/to/library contains libastra.so, libastra_core.so etc.

I tried to use -L/path/to/library/ but still not working. I looked where the .so files are located and it’s in the lib folder