Hello
What i do wrong,
i work with octave 3.2.0_
i have my
lib TWUClib.a on Dir “C:\TWUClib\lib”
I give
command.
>
mkoctfile -LC:\TWUClib\lib
octave-3.0.2.exe:105:C:\Programme\Octave\3.0.2_gcc-4.3.0\mingw32
>
and then I call
mkoctfile –lTWUClib.a TWUsetUserAgent.cc
1)
TWUClib.a
could not be copied in lib.
2)
Therefore if I give
>
mkoctfile -lTWUClib.a TWUsetUserAgent.cc
c:/programme/octave/3.0.2_gcc-4.3.0/mingw32/bin/../lib/gcc/mingw32/4.3.0-dw2/../../../../mingw32/bin/ld.exe:
cannot find
-lTWUClib.a
collect2: ld returned 1 exit status
thanks
--- Michael Goffioul <address@hidden> schrieb am Di, 20.1.2009:
Von: Michael Goffioul <address@hidden> Betreff: Re: mkoctfile problem An: address@hidden CC: address@hidden, address@hidden Datum: Dienstag, 20. Januar 2009, 10:34
On Tue, Jan 20, 2009 at 8:21 AM, Allahyari Rahim <address@hidden> wrote: > hello > > I have command mkoctfile –v TWUsetUserAgent.cc > > > >> mkoctfile -v TWUsetUserAgent.cc > > mingw32-g++-4.3.0-dw2 -c -march=i686 -mtune=i686 > -IC:\Programme\Octave\3.0.2_gcc-4.3.0\include\octave-3.0.2 -IC:\Progra > > mme\Octave\3.0.2_gcc-4.3.0\include\octave-3.0.2\octave > -IC:\Programme\Octave\3.0.2_gcc-4.3.0\include -mieee-fp -D_DLL
-O > > 2 -Wall TWUsetUserAgent.cc -o TWUsetUserAgent.o > > mingw32-g++-4.3.0-dw2 -shared -shared-libgcc -Wl,--export-all-symbols > -Wl,--enable-auto-import -Wl,--enable-runtime-pseu > > do-reloc -o TWUsetUserAgent.oct TWUsetUserAgent.o > -LC:\Programme\Octave\3.0.2_gcc-4.3.0\lib\octave-3.0.2 -LC:\Progra > > mme\Octave\3.0.2_gcc-4.3.0\lib -loctinterp -loctave -lcruft -shared-libgcc > -llapack -lblas -lfftw3 -lreadline -lncurse > > s -lhdf5 -lz -lm -lstdc++_s -lws2_32 -lkernel32 -lgfortran -lstdc++_s > > TWUsetUserAgent.o:TWUsetUserAgent.cc:(.text+0x4d6): undefined reference to > `_TWUsetUserAgent'
I already told you that. You need to link your oct-file with the library providing the TWUsetUserAgent symbol. Let's say that you library is called libtwu.dll. Then you need an import library file named either libtwu.dll.a for MinGW
compilation, or twu.lib for MSVC compilation. Then you need to tell mkoctfile 2 things: 1) add the import library pathname to the library path: -L/my/dir/where/lib/is 2) link against the library: -ltwu
Michael.
|