Home > Archive > Unix Programming > June 2007 > undefine referance to main
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
undefine referance to main
|
|
| kadudhularamesh@gmail.com 2007-06-20, 8:06 am |
| am running a cpp file it contains some functions corrospanding hedder
files but it shows undefine referance errors it shows below
errors
In file included from /usr/include/c++/3.3.3/backward/iostream.h:31,
from fwdDyn.h:4,
from main_fwdDyn.cpp:2:
/usr/include/c++/3.3.3/backward/backward_warning.h:32:2: warning:
#warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section
17.4.1.2 of the C++ standard. Examples include substituting the <X>
header for the <X.h> header for C++ includes, or <sstream> instead of
the deprecated header <strstream.h>. To disable this warning use -Wno-
deprecated.
/tmp/ccbQsFds.o(.text+0x11ba): In function `main':
: undefined reference to `fwdDyn(Matrix, char*, char*)'
collect2: ld returned 1 exit status
| |
| Joachim Schmitz 2007-06-20, 8:06 am |
| <kadudhularamesh@gmail.com> schrieb im Newsbeitrag
news:1182340078.710549.56270@d30g2000prg.googlegroups.com...
> am running a cpp file it contains some functions corrospanding hedder
> files but it shows undefine referance errors it shows below
> errors
> In file included from /usr/include/c++/3.3.3/backward/iostream.h:31,
> from fwdDyn.h:4,
> from main_fwdDyn.cpp:2:
> /usr/include/c++/3.3.3/backward/backward_warning.h:32:2: warning:
> #warning This file includes at least one deprecated or antiquated
> header. Please consider using one of the 32 headers found in section
> 17.4.1.2 of the C++ standard. Examples include substituting the <X>
> header for the <X.h> header for C++ includes, or <sstream> instead of
> the deprecated header <strstream.h>. To disable this warning use -Wno-
> deprecated.
> /tmp/ccbQsFds.o(.text+0x11ba): In function `main':
> : undefined reference to `fwdDyn(Matrix, char*, char*)'
> collect2: ld returned 1 exit status
There's not undefinet reference /to/ main, but /in/ main. The undefined
reference is fwdDyn().
Where is it /defined/ (not /declared/)? Is that object file part of the link
line (most probaly not)
Bye, Jojo
| |
|
|
|
|
|
|
|