Nena wrote:
Quote:
Mark P wrote: Quote:
>Nena wrote: Quote:
>>Hi there,
>>I'm trying to include the Numerical Recipes for C++
>>for the Dev-C++ Editor Version.
>>>
>>But so far I've failed.
>>>
>>Therefore I've copied all head-files (for example nr.h)
>>into the folder where my program is. When compiling my
>>program two windows are poping up.
>>The first one is saying "Total errors 0" and "Size of
>>output file: 0".
>>>
>>And the second window behind the first one is a
>>"compiler and linker output" with the following two
>>lines
>>C:\DOKUME~1\LOKALE~1\Temp\ccyQaaaa.o(.text+0x2fc ):lambda~1.cpp:
>>undefined reference to `NR::gammln(double)'
>>C:\DOKUME~1\LOKALE~1\Temp\ccyQaaaa.o(.text+0x317 ):lambda~1.cpp:
>>undefined reference to `NR::gammln(double)'
>>>
>>>
| >This is a compiler issue. Your code needs to be linked with the library
>code-- the linker is basically saying that it doesn't see a definition
>of the function NR::gammln( double) anywhere.
| >
|
Quote:
Okay, thanks.
I'm C++ beginner. And how can I link my code with the library code?
>
Thanks!
|
First, don't top-post-- reply below the message to which you're responding.
To your question, I don't know. You'll need to look at the
documentation for your compiler and perhaps also any info included with
the NR text. Generally you need to tell the compiler the name and
location of the library, but the details of this will depend on your
specific setup.
Normally I would say to find a discussion forum for your compiler, and
you might still try this, but Dev-C++ is sort of defunct at this point
and I don't know how much support you'll find. I'd suggest trying its
free successor, CodeBlocks, as you might find a more active community to
help you.