help-octave
[Top][All Lists]
Advanced

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

linking static libs on Windows


From: Programming Newbie
Subject: linking static libs on Windows
Date: Wed, 18 May 2011 16:24:28 -0400

Sorry for what is probably a simple question, but I'm stumped.

I am running Octave 3.2.4 on Windows 7, installed using the precompiled version Octave-3.2.4_i686-pc-mingw32_gcc-4.4.0_setup.exe

I am trying a very simple test, in which I have created an oct file that calls a function in a static library file (.lib).  FWIW, I compiled the .lib using MSVC 2008 Express.

I'm compiling with the following:
mkoctfile -l add_vecs_fcn.lib add_vecs.cc

I get the following error when I compile (or, rather, when octave tries to link):
c:/octave/3.2.4_gcc-4.4.0/mingw32/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -l-LC:\Octave\3.2.4_gcc-4.4.0\lib\octave-3.2.4

Here's the version that includes verbose:
octave-3.2.4.exe:38> mkoctfile add_vecs.cc -l add_vecs_fcn.lib -v mingw32-g++-4.4.0-dw2 -c -I/usr/local/octmgw32_gcc-4.4.0-dw2/include  -IC:\Octave\3.2.4_gcc-4.4.0\include\octave-3.2.4 -IC:\Octave\3.2.4_gcc-4.4.0\include\octave-3.2.4\octave IC:\Octave\3.2.4_gcc-4.4.0\include -mieee-fp  -D_GLIBCXX_DLL -march=i686 -mtune=generic -O3 -Wall    add_vecs.cc -o add_vecs.o
mingw32-g++-4.4.0-dw2 -shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -shared-libgcc -Wl,--allow-multiple-definition -o add_vecs.oct  add_vecs.o  add_vecs_fcn.lib  -l -LC:\Octave\3.2.4_gcc-4.4.0\lib\octave-3.2.4 -LC:\Octave\3.2.4_gcc-4.4.0\lib -loctinterp -loctave  -lcruft -shared-libgcc -Wl,--allow-multiple-definition -llapack -lblas -lfftw3 -lfftw3f -
lreadline  -lncurses -liberty -lhdf5 -lz -lm  -lgdi32 -lws2_32 -luser32 -lkernel32 -lgfortran -lstdc++_s
c:/octave/3.2.4_gcc-4.4.0/mingw32/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -l-LC:\Octave\3.2.4_gcc-4.4.0\lib\octave-3.2.4
collect2: ld returned 1 exit status

Any ideas?

reply via email to

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