Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
franciscotufro
Posts: 5
Registered: ‎02-11-2013
My Carrier: None

[SOLVED] Problems using external library

[ Edited ]
I'm having trouble porting AKU from Moai SDK to BlackBerry 10.
 
A minimal example of what's going on can be reproduced with a main.cpp with the following content:
 
#include "aku/AKU.h"

int main () {
  AKUContextID context;
  context = AKUCreateContext ();
  return 0;
}
 
 
which in line 54 declares AKUContextID:
54: typedef int AKUContextID;
 
and in line 58 declares AKUCreateContext ():
58: AKU_API AKUContextID AKUCreateContext ();

 

The problem is that when I build the application it throws 'undefined reference to AKUCreateContext()'
I know that the .h is being read because AKUContextID is being found.

I managed to build the aku library with no trouble, but when trying to use it, i get these errors.

Any idea of what could be happening?

Please use plain text.
Developer
BGmot
Posts: 1,061
Registered: ‎11-24-2011
My Carrier: x

Re: Problems using external library

Linker does not see your library (or library does not contain AKUCreateContext() function.

In what way do you tell linker to link with your library? can you post console output when you build your app?

Please use plain text.
New Contributor
franciscotufro
Posts: 5
Registered: ‎02-11-2013
My Carrier: None

Re: Problems using external library

The problem was solved by renaming main.c to main.cpp.

Thanks!

Please use plain text.