On 11/22/16 8:30 AM, Timoses wrote:
Hey there,
(warning) I'm not all too experienced in programming. So here's my intention:
- Build an interface for a C-library that I can use in my project
- Put this interface in a separate package so that I can use it in other projects (e.g. in a subpackage of my project) per dependency
The problem I'm having is the following:
- I am writing my own c library file that interfaces with the actual library (this is since I did not get a translation of the original c library header -> d module running)
- my c library file is in my package's "lib" folder
When I now set the dependency on the package in my project with
"dependencies": { "path": "../<package>" }
I often get that the library is not found or that the function name symbol can't be found.
I'm wildly trying out things, but probably I'm doing a lot wrong. Is my idea feasible at all? Or is this "bs" and I should install my own library into "usr/local/lib"?
Definitely possible.
I'd experiment with dub -v to see what commands dub is actually calling.
Most likely your library is not being found by the linker.
-Steve