octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation problem MSVC with recent 'sort' implementation


From: Shai Ayal
Subject: Re: Compilation problem MSVC with recent 'sort' implementation
Date: Sun, 3 Feb 2008 20:59:25 +0200

On Feb 3, 2008 4:16 PM, Michael Goffioul <address@hidden> wrote:
> On 2/3/08, Michael Goffioul <address@hidden> wrote:
> > Unfortunately, this is not enough to make it compilable with
> > MSVC. At link stage of liboctave, I get duplicated symbols
> > error (see below). This seems logical to me to have duplicated
> > symbols as Array-C.cc includes Array.cc and that the assign
> > instantiation also instantiates Array<double>. However, as
> > Array-d.cc also perform explicit specialization, I guess the
> > compiler cannot determine which one it has to export in the
> > DLL (I also wonder how gcc resolves this).
> >
> > I don't know how to handle this.
>
> The attached patch solves the problem.
>
> Michael.
>
>
> liboctave/ChangeLog
>
> 2008-02-03  Michael Goffioul <address@hidden>
>
>     * Array.cc (ascending_compare, descending_compare,
>     Array<T>::sort): Declare explicit specialization for T=double
>     to avoid symbol duplication error at link time.
>     * Array-d.cc: ascending_compare and descending_compare
>     are not part of Array<T> class.
>

This patch doesn't solve my problem. I still get the same link time
error. I did a fresh cvs checkout followed by autogen.sh and configure
and still th same problem. Am I the only one?

The error I get:
g++  -I. -I.. -I../liboctave -I../src -I../libcruft/misc
-DHAVE_CONFIG_H -mieee-fp -Wall -W -Wshadow -Wold-style-cast -g -O2
-rdynamic \
        -L..  -fPIC  -o octave \
        main.o  \
        -L../liboctave -L../libcruft -L../src -Wl,-rpath
-Wl,/usr/local/lib/octave-3.0.0+ \
        -loctinterp -loctave  -lcruft   \
         -lumfpack -lamd -lcamd -lcolamd \
        -lcholmod -lccolamd -lcxsparse -llapack -lblas \
        -lfftw3 -lreadline  -lncurses -ldl -lhdf5 -lz -lm
-L/usr/lib/gcc/i386-redhat-linux/4.1.2
-L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. -lhdf5 -lz
-lgfortranbegin -lgfortran -lm -lgcc_s
../liboctave/liboctave.so: undefined reference to
`octave_sort<vec_index<long long>*>::octave_sort()'
../liboctave/liboctave.so: undefined reference to `octave_sort<long
long>::octave_sort()'
../liboctave/liboctave.so: undefined reference to
`octave_sort<vec_index<long long>*>::merge_freemem()'
../liboctave/liboctave.so: undefined reference to `octave_sort<long
long>::sort(long long*, int)'
../liboctave/liboctave.so: undefined reference to `octave_sort<long
long>::merge_freemem()'
../liboctave/liboctave.so: undefined reference to
`octave_sort<vec_index<long long>*>::sort(vec_index<long long>**,
int)'
collect2: ld returned 1 exit status
make[2]: *** [octave] Error 1
make[2]: Leaving directory `/home/shaia/Download/octave-cvs/octave/src'
make[1]: *** [src] Error 2
make[1]: Leaving directory `/home/shaia/Download/octave-cvs/octave'
make: *** [all] Error 2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]