×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    16

    Undefined symbol linking cpp + c objects

    Hi,

    i have searched the thread but i found no similar problem.
    I try to link c and c++ objects compiled with carbide.c++ and i always get the linker error:

    >Undefined symbol: 'int gsm_decode(struct gsm_state *, unsigned char *, short *) (?gsm_decode@@YAHPAUgsm_state@@PAEPAF@Z)'
    >referenced from 'int CGSM::GSMToLinear(unsigned char const *, int, unsigned short *) (?GSMToLinear@CGSM@@QAEHPBEHPAG@Z)' in gsm.cpp:56

    The c object exist and in the corresponding include file the label is also correct.
    Pls any idea whats wrong ?
    ctk

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,748

    Re: Undefined symbol linking cpp + c objects

    It seems to be a C to C++ linking problem. Have you actually surrounded your C-headers with extern "C" when you include them from C++?

  3. #3
    Registered User
    Join Date
    Jul 2006
    Posts
    16

    Re: Undefined symbol linking cpp + c objects

    Thanks a lot (of course i forgot this)
    ctk

Similar Threads

  1. Fail to build syexpat 1.3 under 2nd FP3
    By harry_zhang in forum Symbian
    Replies: 10
    Last Post: 2010-03-19, 10:24
  2. Replies: 0
    Last Post: 2006-08-18, 10:17
  3. Carbide Compilation Error
    By d2army in forum Symbian
    Replies: 3
    Last Post: 2006-06-23, 14:15
  4. S80 Platform SDK and Visual Studio .NET Linking Error
    By jayantjain in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2005-10-07, 22:14
  5. how to avoid linking error
    By skdas in forum Symbian
    Replies: 6
    Last Post: 2003-07-07, 07:57

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×