How to add a C library in linux?
Posted: Mon Aug 28, 2023 7:01 pm
Hi everyone.
I'm trying to add a library to the Love2D source code. (The main goal is to expose it as a module on lua). In Windows it was easy using vcpkg, just #include'ing the library compiled and worked.
However in Ubuntu the compilation throw errors, as it is not finding the library functions. In gcc I would use the flag -llibname to make it know about the library. It seems I would need to edit the CMakeList.txt file, however I'm a total noob on cmake.
How could I do that?
Thanks in advance!
I'm trying to add a library to the Love2D source code. (The main goal is to expose it as a module on lua). In Windows it was easy using vcpkg, just #include'ing the library compiled and worked.
However in Ubuntu the compilation throw errors, as it is not finding the library functions. In gcc I would use the flag -llibname to make it know about the library. It seems I would need to edit the CMakeList.txt file, however I'm a total noob on cmake.
How could I do that?
Thanks in advance!