IntelLabs / pmgd

Persistent Memory Graph Database
MIT License
43 stars 9 forks source link

Simplest makefile for filtertest #22

Closed Outstep closed 5 years ago

Outstep commented 5 years ago

Hello,

I am trying to use the test/filtertest.cc as a template but am having trouble determining what is the either the simplest makefile or gcc command line to build just that test file and link it against the pmgd.lib and pmgd-util.lib

Can you please show me a simple command like compile for it?

I should be able to integrate it from there. Thanks

Outstep commented 5 years ago

Hi,

Actually, I forgot to mention that they whole repo does compile just fine and I am able to produce the

lib/pmgd.lib lib/pmgd-util.lib

as well as the associated *.so files.

I am able to go into the "test" directory and do a "make tests" which makes all of the test examples.

What I need to do now is to just simple build "filtertest.cc" in an empty directory on its own from the command line invocation of gcc.

The reason is that I am working on a project that builds fine in another directory and now want to include some of the features that I found in the test/filtertest.cc file so to begin with, I will just see if I can add into my main.cc


define __STDC_FORMAT_MACROS

include

include "pmgd.h"

include "util.h"

. . . using namespace PMGD; . . . int main() { Graph db("filtergraph", Graph::Create);

    Transaction tx(db, Transaction::ReadWrite);

. . . }


And see if I can get it to compile and link against the pmgd.lib and pmgd-util.lib code, but right now it seem to compile, but cannot link for some reason.

Can you please show me a single command like way to compile just the filtertest.cc so that I can see what is happening here?

Thanks,