Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   undefined symbol (http://www.velocityreviews.com/forums/t688989-undefined-symbol.html)

mikethebike 06-24-2009 05:10 PM

undefined symbol
 
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

mzdude 06-24-2009 05:15 PM

Re: undefined symbol
 
On Jun 24, 1:10*pm, mikethebike <michael.sg...@gmail.com> 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.


mikethebike 06-24-2009 06:25 PM

Re: undefined symbol
 
Hi
when I drop extern I get:

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

Thanks again
Michael



All times are GMT. The time now is 10:11 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.