regarding AlOpenDBase function in Al.h

Hi:

I’m writing a small test program as following that includes Al.h:

const char *path="/tran/src/test.ldb";
AlDataBase_t *db;
db=AlOpenDBase(path);

it’s linking to both Aplib and Phexlib, but then it says: undefined
symbol Al_db near * near AlOenDBase (char const near*). Can someone
try to test this program and see if gets the same error???


Ran Zhang

Ran Zhang <eng@vamcofeeds.com> wrote:

I’m writing a small test program as following that includes Al.h:

const char *path="/tran/src/test.ldb";
AlDataBase_t *db;
db=AlOpenDBase(path);

it’s linking to both Aplib and Phexlib, but then it says: undefined
symbol Al_db near * near AlOenDBase (char const near*). Can someone
try to test this program and see if gets the same error???

That’s because the header is missing the ‘extern “C”’ trick for C++.
I will add it, but for now, you can do it in your code:

extern “C” {
#include <photon/Al.h>
}


Wojtek Lerch (wojtek@qnx.com) QNX Software Systems Ltd.