undefined symbol

Discussion in 'C++' started by mikethebike, Jun 24, 2009.

  1. mikethebike

    mikethebike Guest

    Hello
    dlerror:/home/michael/X-Plane/Resources/plugins/Cit_X.xpl: undefined
    symbol: pScene

    main.cpp:
    ------
    #include "includes/carmine_defs.h"

    extern fScene pScene;
    createParent(&pScene);

    declaration in carmine_defs.h:
    ------
    typedef struct
    {
    /// Pointer to array of texture entry objects describing the textures
    used in the scene.
    fTextureEntry* m_parrTextureEntry;
    etc.
    }fScene;

    void createParent(fScene* pScene);

    and in carmine_defs.c
    --------
    void createParent(fScene* pScene)

    Why this error? What am i doing wrong?
    Many thanks
    Michael
     
    mikethebike, Jun 24, 2009
    #1
    1. Advertising

  2. mikethebike

    mzdude Guest

    On Jun 24, 1:10 pm, mikethebike <> wrote:
    > Hello
    > dlerror:/home/michael/X-Plane/Resources/plugins/Cit_X.xpl: undefined
    > symbol: pScene
    >
    > main.cpp:
    > ------
    > #include "includes/carmine_defs.h"
    >
    >         extern fScene pScene;


    The extern says that pScene is declared in some other
    ..c or .cpp file. From the code you posted, there were
    no declaration of pScene. Drop the extern and it should
    at least compile and link.
     
    mzdude, Jun 24, 2009
    #2
    1. Advertising

  3. mikethebike

    mikethebike Guest

    Hi
    when I drop extern I get:

    dlerror:/home/michael/X-Plane/Resources/plugins/Cit_X.xpl: undefined
    symbol: _Z12createParentP6fScene

    Thanks again
    Michael
     
    mikethebike, Jun 24, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kenneth Kahl
    Replies:
    2
    Views:
    12,154
    Kenneth Kahl
    Feb 22, 2006
  2. Replies:
    1
    Views:
    1,039
    Nigel Wade
    Mar 24, 2006
  3. baumann@pan
    Replies:
    1
    Views:
    746
    Richard Bos
    Apr 15, 2005
  4. Song Ma
    Replies:
    2
    Views:
    235
    Charles Oliver Nutter
    Jul 20, 2008
  5. Replies:
    6
    Views:
    1,802
Loading...

Share This Page