
Signature
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>
Legalize Adulthood! <http://blogs.xmission.com/legalize/>
> How much programming have you done in C/C++?
Well,.. Basic studies, but it is not my main sublect and I have not really
been coding myself. But I suppose I wrote the question a bit wrong.. I know
what is written in there. I do not know what I can do for it.
> These errors are saying you have the same function defined twice and
> you are referencing functions that you haven't linked into your
> executable.
main is defined on a project front page but I do not find _main anywhere. So
it is not something I know. And those gsl_whatever are library parameters.
How can they be defined twice or not at all? And the problem was really that,
where should I go if I need to solve it? Suppose not to main.obj anyway.
Richard - 12 Dec 2007 18:13 GMT
[Please do not mail me a copy of your followup]
=?Utf-8?B?Y2xvdWR5MTM=?= <cloudy13@discussions.microsoft.com> spake the secret code
<3AE59B0E-37FF-4B2F-8162-843B92B0040E@microsoft.com> thusly:
>> These errors are saying you have the same function defined twice and
>> you are referencing functions that you haven't linked into your
>> executable.
>main is defined on a project front page but I do not find _main anywhere.
main is defined twice in your code. When the C/C++ compiler takes a
function and builds a linker symbol out of it, it prepends the "_" to
the name of the function. Visual Studio includes a tool called
"dumpbin" that will dump out the contents of a Windows executable
binary. You can run dumpbin on exe, dll, lib and obj files to see
what's inside them in a human readable form. If you do that, you'll
see the kinds of things the compiler and linker do to your source code
names as they are compiled and made ready for linking.
>So
>it is not something I know. And those gsl_whatever are library parameters.
>How can they be defined twice or not at all? And the problem was really that,
>where should I go if I need to solve it? Suppose not to main.obj anyway.
Symbols remain undefined after linking if no link input defines the
symbol. To resolve undefined symbol errors, you generally add more
code to the project (that defines the symbols via source code, creating
object files that are fed to the linker to resolve the symbol) or add
more link inputs (obj, lib files) to your link properties.
Symbols defined more than once are the cause of multiply defined
symbol errors. The symbol can be defined more than once because
you're defining it more than once in source code or because you've
defined it in source code and linked against an input that also
defines it. The detailed error message should tell you the offending
objects that are multiply defining the symbol.

Signature
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>
Legalize Adulthood! <http://blogs.xmission.com/legalize/>