nirai-compiler / src

Core Nirai repo
Other
22 stars 5 forks source link

Errors when linking libpandadna to exectuable #11

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi, I'm not sure if this is nirai or libpandadna issue, but I posted it here because I thought it belongs in nirai issues, not libpandadna issues. Anyway, I can link it fine, but the executable doesn't like it.

:interrogatedb(error): Attempt to use type ostream which has not yet been defined!
:interrogatedb(error): Attempt to use type Filename which has not yet been defined!
:interrogatedb(error): Attempt to use type Datagram which has not yet been defined!
:interrogatedb(error): Attempt to use type Texture which has not yet been defined!
:interrogatedb(error): Attempt to use type NodePath which has not yet been defined!
:interrogatedb(error): Attempt to use type TextFont which has not yet been defined!
:interrogatedb(error): Attempt to use type TypedObject which has not yet been defined!
:interrogatedb(error): Attempt to use type ostream which has not yet been defined!
:interrogatedb(error): Attempt to use type TypeHandle which has not yet been defined!
:interrogatedb(error): Attempt to use type Datagram which has not yet been defined!
:interrogatedb(error): Attempt to use type LVecBase3f which has not yet been defined!
:interrogatedb(error): Attempt to use type LVecBase4f which has not yet been defined!
:interrogatedb(error): Attempt to use type LPoint3f which has not yet been defined!
:interrogatedb(error): Attempt to use type NodePath which has not yet been defined!
:interrogatedb(error): Attempt to use type TypeHandle which has not yet been defined!
:interrogatedb(error): Attempt to use type TypedObject which has not yet been defined!
:interrogatedb(error): Attempt to use type LPoint3f which has not yet been defined!
Fatal Python error: PyThreadState_Get: no current thread

Any ideas?

loblao commented 8 years ago

How did you link it? Did you call initlibpandadna and init_libpandadna in your code?

ghost commented 8 years ago

I built libpandadna with vs2010, then I set the libs to libpandadna.lib with NiraiCompiler('rebuilt.exe', libs=set(glob.glob('libpandadna/Release/libpandadna.lib'))). I didn't know there were 2 functions I was meant to call, so I didn't call init_libpandadna. But, when I try to call it, it produces a link error: rebuilt.obj : error LNK2001: unresolved external symbol _init_libpandadna.

ghost commented 8 years ago

@loblao Is there anything you can think of to solve this problem? Thanks in advance :D

ghost commented 8 years ago

I think this is actually a libpandadna issue. I'm going to close this issue and make a new one there.