On Wed, 23 Nov 2016 15:25:53 GMT, Timoses wrote:
Thanks! I've "solved" it now by adding
"lflags": ["-L$PACKAGE_DIR/lib"],to the dub.json of dneo4j.
Why is it that the linker flags of the library package are taken over by the project where I'm using the package? Just a kind of redundancy to be sure to get all library paths included (even though the ones from the dependency package include relative paths as well)?
Looking at the output of the first scenario:
dmd -of.dub/build/osx-debug-posix.osx-x86_64-dmd_2072-B74417139C39638134843B1B9E823EA2/projectname .dub/build/osx-debug-posix.osx-x86_64-dmd_2072-B74417139C39638134843B1B9E823EA2/projectname.o ../dneo4j/libdneo4j.a -L-Llib -L-Llib -L-lneo4jCon -g ld: library not found for -lneo4jCon
With the flag
lib refers to the "lib" directory in the current directory. I'm guessing your library is instead in
../dneo4/lib. Another thing that is interesting is the following argument:
../dneo4j/libdneo4j.a. That should also link to the library, assuming the path is correct.
BTW, you can use DStep  to automatically generate bindings to C libraries.