Results 1 to 3 of 3

Thread: Calling a library in Symbian C++ using Qt

  1. #1
    Join Date
    Jun 2010
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Post Calling a library in Symbian C++ using Qt

    Hi everyone,

    I need to call a function from a library (.dll format) using a Qt program to be run on a Symbian smartphone. However, the driver is written in Symbian C++. I've Googled and been seen some programs and an article about using Symbian and Qt together, but am not sure what procedure to take regarding header files and libraries to import--or where to begin for my own programs.

    At present I'm running the following on Windows Vista:

    Qt for Symbian 4.6.3
    Qt for Windows 4.6.2
    Carbide C++ v2.6
    and the S60 5th Edition SDK.

    Can anyone advise me on the procedure for doing so, and point me to relevant examples you're aware of? Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

  3. #3
    Join Date
    Jun 2010
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Re: Calling a library in Symbian C++ using Qt

    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:

    Qt Code:
    1. EXPORT_C TInt Csample::ExampleSum()
    2. { return 5; }
    To copy to clipboard, switch view to plain text mode 
    and the Qt function I used is:

    Qt Code:
    1. void s60Calling::callToSym()
    2. {
    3. Csample* sampleAccess;
    4. TInt result = sampleAccess->ExampleSum();
    5.  
    6. // afterwards display result on the screen
    7. }
    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!)

Similar Threads

  1. GL For Symbian
    By TJSonic in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 21st June 2010, 23:43
  2. SDK Symbian S60 v5 on QTcreator
    By nhs_0702 in forum Qt Programming
    Replies: 1
    Last Post: 3rd May 2010, 07:32
  3. VC++ 9.0 coding Symbian ?
    By nhs_0702 in forum Qt Programming
    Replies: 0
    Last Post: 3rd May 2010, 03:48
  4. In Symbian?
    By martinn in forum Qwt
    Replies: 1
    Last Post: 25th February 2010, 10:33
  5. Qt for Symbian, where to start?
    By Lawand in forum Qt Programming
    Replies: 4
    Last Post: 13th February 2010, 08:25

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.