node-gyp icon indicating copy to clipboard operation
node-gyp copied to clipboard

Issue with linking library

Open mamaicode opened this issue 3 years ago • 1 comments

So I'm trying to link libdqlite to a C++ node module this is my binding.gyp

{
    "targets": [
        {
            "target_name": "ndqlite",
            "sources": [
                "src/main.cc"
            ],
            "include_dirs": [
                "/usr/local/include"
            ],
            "libraries": [
                "/usr/local/lib/libdqlite.so.0.0.1"
            ],
           "cflags!": [ "-fno-exceptions" ],
           "cflags": [ "-std=c++11" ],
           "cflags_cc!": [ "-fno-exceptions" ]
        }
    ],
    
}

It's compiling fine but when I try to execute a simple test that calls:

dqlite_version_number();

I get the following:

undefined symbol: _Z21dqlite_version_number

Anyone have any idea how to fix the issue?

mamaicode avatar Apr 06 '22 14:04 mamaicode

Please try git grep dqlite_version_number

Perhaps open an issue here https://github.com/canonical/dqlite/issues

cclauss avatar Jun 30 '22 10:06 cclauss