[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unknown symbol
From: |
E2 |
Subject: |
Re: unknown symbol |
Date: |
Fri, 15 Aug 2003 08:56:09 -0400 |
User-agent: |
Mutt/1.5.4i |
Using
> extern "C" {
> #include "sausage_tree.h"
> }
>
Causes the name of the symbol to change, but for some reason it still
isn't found. I get the following error and octave exits:
/usr/libexec/ld-elf.so.1:
/usr/home/gatekeeper/robot/sausage/round2/opt_sausage.oct: Undefined symbol
"s_node_new"
s_node_new() is defined in my sausage_tree.c include file.
I get the feeling I need to compile sausage_tree.c to a .o file or something.
I'm running freeBSD, and I got a similar error earlier when #including
math.h, I had to use "gcc -lm" to actually include the math library.
Anybody know what's going on?
--
-E2
On Thu, Aug 14, 2003 at 07:12:38PM -0400, Paul Kienzle wrote:
> E2 wrote:
> >I've defined some C functions in sausage_tree.h/sausage_tree.c and I
> >#included sausage_tree.h into opt_sausage.cc which I use mkoctfile to
> >build into a octave function. mkoctfile compiles with no errors, but
> >when I attempt to run the opt_sausage function in octave, I get the
> >following error:
> >
> >/usr/libexec/ld-elf.so.1:
> >/usr/home/gatekeeper/robot/sausage/round2/opt_sausage.oct: Undefined
> >symbol "s_node_new__FddP6s_node"
> >
> >I do not have any symbols defined as "s_node_new_FddP6s_node".
> >
> >The error can be eliminated by not calling a function "s_node_new( .....)"
> >(which is defined in sausage_tree.c) in opt_sausage.cc
> >
> >sausage_tree.c compiles without error by itself.
> >With main() included sausage_tree.c runs without error by itself.
> >
> >Does anybody know why the symbol "s_node_new__FddP6s_node" exists, or
> >how I can fix the error?
> >
>
> Perhaps sausage_tree.h doesn't protect against
> being included in C++. You could try:
>
> extern "C" {
> #include "sausage_tree.h"
> }
>
> Paul Kienzle
> address@hidden
>
>
--
--E2
America without freedoms is not worth securing.
LB's RANDOM KEY WORDS OF INTEREST TO CARNIVORE SERVERS:
abortion, marijuana, cocaine, xtacy, lsd, plutonium, ammonium nitrate,
militia, cia, dea, nsa, fbi, pgp, president, white house, hacker, 2600,
dirty bomb, al qaeda, jihad, assassinate?
MINE TOO:
weed, bong, headys, anarchy, skinhead, wolves, acid, hash, pipe bomb,
communism, castro, canadians!
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------