Link a dynamic library
-
Hello,
I created a .so library from a cpp file.
I want to use this library in the my project. I added in the INCLUDEPATH+= the path of the header of the created library. And I added the library path in LIBS+=
But, I am getting an error that indicates that the function used in library is not defined in the generated library of my project.
The error says: undefined reference to "my function" in the lib of my project.Can aanyone help me, I would like to know what did I miss?
-
@Rouja said in Link a dynamic library:
I install all the libraries in my hardware. It doesn't work and it dosn't recognize my library whil excution
You have to give more information.
Where do you install these libraries exactly?
Are these libraries build for your target hardware? -
@Rouja said in Link a dynamic library:
But, I have another problem. In fact, I install all the libraries in my hardware. It doesn't work and it dosn't recognize my library whil excution.
If you are getting an error message, please do not keep that message secret from people who are willing to try to help you. The standard format of working a bug is
1 I did X
2 I expected Y
3 But Z happened.You haven't shared what you actually did. (What hardware? How did you install?) Or what happened. (A particular error message? Is it a dynamic linker error that prevents the program for starting, or a dlopen error that occurs immediately after startup?) If you can take a moment to provide that kind of info when you ask for help online, you make it much easier for people to help you.
-
@Rouja said in Link a dynamic library:
Hardware card
Can you please tell us where exactly on your card?!
In /usr/lib/ or somewhere else?