[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
linker crosstalk on oct files
From: |
Paul Kienzle |
Subject: |
linker crosstalk on oct files |
Date: |
Tue, 13 Apr 2004 07:59:32 -0400 |
Any idea how to force an oct file to take a symbol from a particular
.o file? In particular, the following happens on 2.1.57 for Debian:
[crosstalk]# octave -q
octave:1> cross; talk
cross
cross
[crosstalk]# octave -q
octave:1> talk; cross
talk
talk
where both talk and cross call the same function name (crosstalk)
but crosstalk() is defined in different .o files, one of which prints
cross and the other which prints talk.
How do I tell mkoctfile to link statically to the .o files on the
command
line?
Thanks in advance,
Paul Kienzle
address@hidden
==== cross.cc:
#include <octave/oct.h>
extern "C" void crosstalk();
DEFUN_DLD(cross,args,nargout,"")
{
crosstalk();
return octave_value_list();
}
==== talk.cc:
#include <octave/oct.h>
extern "C" void crosstalk();
DEFUN_DLD(talk,args,nargout,"")
{
crosstalk();
return octave_value_list();
}
==== cross_c.c:
#include <stdio.h>
void crosstalk() { printf("cross\n"); }
==== talk_c.c:
#include <stdio.h>
void crosstalk() { printf("talk\n"); }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- linker crosstalk on oct files,
Paul Kienzle <=