help-octave
[Top][All Lists]
Advanced

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

Re: Mkoctfile cannot find -loctinterp and -loctave libraries


From: Fávero Santos
Subject: Re: Mkoctfile cannot find -loctinterp and -loctave libraries
Date: Thu, 2 Mar 2017 08:59:42 -0300

Hello, Tatsuro

Thanks for the help.

1. Changing arguments order resulted in the same error as before. Here follows the return from the cmd 
mkoctfile samples/c/analogin_sample.cpp -l lib/x86/dwf.lib
c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot
find -l-LC:\Octave\Octave-4.2.0\lib\octave\4.2.0
c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot
find -loctinterp
c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot
find -loctave
collect2.exe: error: ld returned 1 exit status
warning: mkoctfile: building exited with failure status

2. Running cmd the command with -v returns me the following:
mkoctfile -v -l lib/x86/dwf.lib samples/c/analogin_sample.cpp

c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot
find -l-LC:\Octave\Octave-4.2.0\lib\octave\4.2.0
c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot
find -loctinterp
c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot
find -loctave
collect2.exe: error: ld returned 1 exit status

g++ -std=gnu++11 -c -I/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w64-mingw32/include  -IC:\Octave\Octave-4.2
.0\include\octave-4.2.0\octave\.. -IC:\Octave\Octave-4.2.0\include\octave-4.2.0\octave -IC:\Octave\Octave-4.2.0\i
nclude  -pthread -fopenmp -g -O2    samples/c/analogin_sample.cpp -o analogin_sample.o
g++ -std=gnu++11 -IC:\Octave\Octave-4.2.0\include\octave-4.2.0\octave\.. -IC:\Octave\Octave-4.2.0\include\octave-
4.2.0\octave -IC:\Octave\Octave-4.2.0\include  -pthread -fopenmp -g -O2 -shared  -o dwf.oct  analogin_sample.o  l
ib/x86/dwf.lib  -l -LC:\Octave\Octave-4.2.0\lib\octave\4.2.0 -LC:\Octave\Octave-4.2.0\lib -loctinterp -loctave -W
l,-rpath-link,/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w64-mingw32/lib -L/scratch/jwe/mxe-octave/4.2.0/w64
-32/usr/x86_64-w64-mingw32/lib -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w64-mingw32/lib -Wl,--export-all
-symbols   -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w64-mingw32/lib   -L/scratch/jwe/mxe-octave/4.2.0/w6
4-32/usr/x86_64-w64-mingw32/lib  -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w64-mingw32/lib              -
L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w64-mingw32/lib  -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_
64-w64-mingw32/lib    -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w64-mingw32/lib -lfreetype  -lhdf5 -lGrap
hicsMagick++ -lGraphicsMagick  -lz -lfftw3  -lfftw3f  -lopengl32 -lglu32 -L/scratch/jwe/mxe-octave/4.2.0/w64-32/u
sr/x86_64-w64-mingw32/lib -lfontconfig -lfreetype     -lgl2ps  -ladvapi32 -llapack      -lws2_32  -lws2_32 -lws2_
32      -lcurl -lcholmod -lumfpack -lamd -lcamd -lcolamd -lccolamd -lcxsparse -lsuitesparseconfig -larpack -lqrup
date -lfftw3  -lfftw3f  -llapack -lblas -lreadline -ltermcap  -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w
64-mingw32/lib -lpcre    -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w64-mingw32/lib -L/scratch/jwe/mxe-oct
ave/4.2.0/w64-32/usr/lib/gcc/x86_64-w64-mingw32/4.9.4 -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/lib/gcc/x86_64-w
64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/lib/../lib -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/mingw/lib/.
./lib -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/
lib -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/mingw/lib -lm -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -
lquadmath -ladvapi32 -lshell32 -luser32 -lkernel32 -lm   -lgdi32 -lws2_32 -luser32 -lkernel32 -lgdi32 -lws2_32 -l
user32 -lkernel32
warning: mkoctfile: building exited with failure status

3. Result using 64b library (that's actually the right library I should use, as my Windows is 64 b)
>> mkoctfile -l lib/x64/dwf.lib samples/c/analogin_sample.cpp

c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot
find -l-LC:\Octave\Octave-4.2.0\lib\octave\4.2.0
c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot
find -loctinterp
c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot
find -loctave
collect2.exe: error: ld returned 1 exit status
warning: mkoctfile: building exited with failure status

4. Strangely, linker cannot find library octave and library octinterp, even though if I issue 

>> dir C:\Octave\Octave-4.2.0\lib\octave\4.2.0
.                   liboctave.dll.a     liboctgui.dll.a     liboctinterp.dll.a  oct
..                  liboctave.la        liboctgui.la        liboctinterp.la     site

I can see those libraries.

Any thougts?

Thanks!

Fávero



Fávero

"Jeder, der sich die Fähigkeit erhält, das Schöne zu erkennen, wird nie alt werden."
Franz Kafka

On Thu, Mar 2, 2017 at 5:53 AM, Tatsuro MATSUOKA <address@hidden> wrote:
----- Original Message -----

> From: Tatsuro MATSUOKA 
> To: Fávero Santos ; help
> Cc:
> Date: 2017/3/2, Thu 16:43
> Subject: Re: Mkoctfile cannot find -loctinterp and -loctave libraries
>
> ----- Original Message -----
>> From: Fávero Santos 
>> To: address@hidden
>> Date: 2017/3/1, Wed 21:48
>> Subject: Mkoctfile cannot find -loctinterp and -loctave libraries
>>
>>
>> Hello all!
>>
>>
>> I'm trying to compile a c code using mkoctfile in octave. When I issue
> the command, the linker returns me the following error messages (linker cannot
> find libraries).
>>
>>
>> Could anyone help me?
>>
>>
>> Thanks so much! 
>>
>>
>> mkoctfile -l "lib/x86/dwf.lib"
> "samples/c/analogin_sample.cpp"
>>
>>
>> c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe:
> cannot find -l-LC:\Octave\Octave-4.2.0\lib\octave\4.2.0
>>
>>
>> c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe:
> cannot find -loctinterp
>>
>>
>> c:/octave/octave-4.2.0/bin/../lib/gcc/x86_64-w64-mingw32/4.9.4/../../../../x86_64-w64-mingw32/bin/ld.exe:
> cannot find -loctave
>>
>>
>> collect2.exe: error: ld returned 1 exit status
>> warning: mkoctfile: building exited with failure status
>>
>>
>>
> Perhaps the above is arguments order issue.
>
> Try 
>
> mkoctfile ./samples/c/analogin_sample.cpp -L.lib/x86 -ldwf


Sorry I have made a mistake.

-L.lib/x86 should be -L./lib/x86


Perhaps the library you want to link 32 bit while your octave 64 bit.
This may cause link error.

At that time use, 32bit version octave.

Tatsuro


reply via email to

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