Hello everyone,
I'm facing a persistent error trying to access a function within a Symbian library using a Qt program. My setup is Qt 4.6.3, S60 5th Edition SDK v1.0 with OpenC/C++ plugin, Carbide v2.6 on Windows Vista Home Premium.
There's a simple function I must call within the class Csample:
EXPORT_C TInt Csample::ExampleSum()
{ return 5; }
EXPORT_C TInt Csample::ExampleSum()
{ return 5; }
To copy to clipboard, switch view to plain text mode
and the Qt function I used is:
void s60Calling::callToSym()
{
Csample* sampleAccess;
TInt result = sampleAccess->ExampleSum();
// afterwards display result on the screen
}
void s60Calling::callToSym()
{
Csample* sampleAccess;
TInt result = sampleAccess->ExampleSum();
// afterwards display result on the screen
}
To copy to clipboard, switch view to plain text mode
I've included the relevant header file sample.h. However, when I build for the Emulator I get the error "Undefined symbol: 'int Csample::ExampleSum(void) (?ExampleSum@Csample@@QAEHXZ)'".
Building for the phone (GCCE) gives the "Undefined reference to Csample::ExampleSum();" error. I've Googled and suspect a library is missing, but found nothing useful. How can I fix these errors?
(thanks Lykurg for the resources!)
Bookmarks