Connecting Tech Pros Worldwide Forums | Help | Site Map

Visual C++ 6 Compile Error

Connell Gauld
Guest
 
Posts: n/a
#1: Jul 22 '05
Hi,
I am quite new to C++ programming and I have been experimenting with
OpenGL and GLUT. When using one of the sample files for loading models,
on compilation I get the following error.

Example1.obj : error LNK2001: unresolved external symbol "void __cdecl
glmDelete(struct GLMmodel *)" (?glmDelete@@YAXPAUGLMmodel@@@Z)

Now, is this caused by an error in my code, or is it caused by an error
in the sample file I'm including?

Thanks
Connell

John Harrison
Guest
 
Posts: n/a
#2: Jul 22 '05

re: Visual C++ 6 Compile Error



"Connell Gauld" <connell@freebreakfast.co.uk> wrote in message
news:cdj9kb$pv5$1@news6.svr.pol.co.uk...[color=blue]
> Hi,
> I am quite new to C++ programming and I have been experimenting with
> OpenGL and GLUT. When using one of the sample files for loading models,
> on compilation I get the following error.
>
> Example1.obj : error LNK2001: unresolved external symbol "void __cdecl
> glmDelete(struct GLMmodel *)" (?glmDelete@@YAXPAUGLMmodel@@@Z)
>
> Now, is this caused by an error in my code, or is it caused by an error
> in the sample file I'm including?
>[/color]

Well gosh, in the COMPLETE ABSENCE of any posted code it is impossible to
tell.

What this error means is that somewhere in your code (or the sample code)
you are calling the function glmDelete, but nowhere in the your code (or the
sample code) is a definition for that function provided.

I would say that the most likely reason for that is that you are building
your program in the wrong way, perhaps you are not including some file in
your build that you should be. But that is a guess for what should be
obvious reasons.

john


Connell Gauld
Guest
 
Posts: n/a
#3: Jul 22 '05

re: Visual C++ 6 Compile Error


John Harrison wrote:
[color=blue]
> "Connell Gauld" <connell@freebreakfast.co.uk> wrote in message
> news:cdj9kb$pv5$1@news6.svr.pol.co.uk...
>[color=green]
>>Hi,
>>I am quite new to C++ programming and I have been experimenting with
>>OpenGL and GLUT. When using one of the sample files for loading models,
>>on compilation I get the following error.
>>
>>Example1.obj : error LNK2001: unresolved external symbol "void __cdecl
>>glmDelete(struct GLMmodel *)" (?glmDelete@@YAXPAUGLMmodel@@@Z)
>>
>>Now, is this caused by an error in my code, or is it caused by an error
>>in the sample file I'm including?
>>[/color]
>
>
> Well gosh, in the COMPLETE ABSENCE of any posted code it is impossible to
> tell.
>
> What this error means is that somewhere in your code (or the sample code)
> you are calling the function glmDelete, but nowhere in the your code (or the
> sample code) is a definition for that function provided.
>
> I would say that the most likely reason for that is that you are building
> your program in the wrong way, perhaps you are not including some file in
> your build that you should be. But that is a guess for what should be
> obvious reasons.
>
> john
>
>[/color]
Thanks, I'm sorry for the lack of code but I have been having similar
problems elsewhere and I was looking for a kinda generic answer, which I
got.
Thanks again,
Connell
JKop
Guest
 
Posts: n/a
#4: Jul 22 '05

re: Visual C++ 6 Compile Error


Connell Gauld posted:
[color=blue]
> Hi,
> I am quite new to C++ programming and I have been[/color]
experimenting with[color=blue]
> OpenGL and GLUT. When using one of the sample files for[/color]
loading models,[color=blue]
> on compilation I get the following error.
>
> Example1.obj : error LNK2001: unresolved external symbol[/color]
"void __cdecl[color=blue]
> glmDelete(struct GLMmodel *)" (?[/color]
glmDelete@@YAXPAUGLMmodel@@@Z)[color=blue]
>
> Now, is this caused by an error in my code, or is it[/color]
caused by an error[color=blue]
> in the sample file I'm including?
>
> Thanks
> Connell[/color]

My guess is it's an extern "C" issue.

-JKop
John Harrison
Guest
 
Posts: n/a
#5: Jul 22 '05

re: Visual C++ 6 Compile Error


>[color=blue]
> My guess is it's an extern "C" issue.
>[/color]

Good guess, I should have thought of that.

Connell are you trying to call C code from C++ code?

john


jeffc
Guest
 
Posts: n/a
#6: Jul 22 '05

re: Visual C++ 6 Compile Error



"Connell Gauld" <connell@freebreakfast.co.uk> wrote in message
news:cdj9kb$pv5$1@news6.svr.pol.co.uk...[color=blue]
> Hi,
> I am quite new to C++ programming and I have been experimenting with
> OpenGL and GLUT. When using one of the sample files for loading models,
> on compilation I get the following error.
>
> Example1.obj : error LNK2001: unresolved external symbol "void __cdecl
> glmDelete(struct GLMmodel *)" (?glmDelete@@YAXPAUGLMmodel@@@Z)
>
> Now, is this caused by an error in my code, or is it caused by an error
> in the sample file I'm including?[/color]

You'll have to check a microsoft newsgroup for Visual C++ - it's not a C++
language problem per se.


Connell Gauld
Guest
 
Posts: n/a
#7: Jul 22 '05

re: Visual C++ 6 Compile Error


John Harrison wrote:
[color=blue][color=green]
>>My guess is it's an extern "C" issue.
>>[/color]
>
>
> Good guess, I should have thought of that.
>
> Connell are you trying to call C code from C++ code?
>
> john
>
>[/color]
Yep, that's it! Thanks!!!
Connell
JKop
Guest
 
Posts: n/a
#8: Jul 22 '05

re: Visual C++ 6 Compile Error


Connell Gauld posted:
[color=blue]
> John Harrison wrote:
>[color=green][color=darkred]
>>>My guess is it's an extern "C" issue.
>>>[/color]
>>
>>
>> Good guess, I should have thought of that.
>>
>> Connell are you trying to call C code from C++ code?
>>
>> john
>>
>>[/color]
> Yep, that's it! Thanks!!!
> Connell[/color]

*bows*

-JKop
Closed Thread