Mkoctfile cannot find -loctinterp and -loctave libraries

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Mkoctfile cannot find -loctinterp and -loctave libraries

Fávero Santos
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


Fávero

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

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mkoctfile cannot find -loctinterp and -loctave libraries

tmacchant
----- Original Message -----

>From: Fávero Santos 
>To: [hidden email]
>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

If you fail using the above, try add verbose option. 


mkoctfile -v ./samples/c/analogin_sample.cpp -L.lib/x86 -ldwf


And copy and paste message into reply

For simple example on 
https://www.gnu.org/software/octave/doc/interpreter/Getting-Started-with-Oct_002dFiles.html#index-mkoctfile-1

mkoctfile helloworld.cc


If I add -v option

mkoctfile -v helloworld.cc

verbose option echo commands as they are executed


so that the above expanded as below.

g++ -std=gnu++11 -c -I/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w64-mingw3
2/include  -IC:\octave\Octave-4.2.0\include\octave-4.2.0\octave\.. -IC:\octave\O
ctave-4.2.0\include\octave-4.2.0\octave -IC:\octave\Octave-4.2.0\include  -pthre
ad -fopenmp -g -O2    helloworld.cc -o helloworld.o
g++ -std=gnu++11 -IC:\octave\Octave-4.2.0\include\octave-4.2.0\octave\.. -IC:\oc

tave\Octave-4.2.0\include\octave-4.2.0\octave -IC:\octave\Octave-4.2.0\include
-pthread -fopenmp -g -O2 -shared  -o helloworld.oct  helloworld.o   -LC:\octave\
Octave-4.2.0\lib\octave\4.2.0 -LC:\octave\Octave-4.2.0\lib -loctinterp -loctave
-Wl,-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/jw
e/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/u
sr/x86_64-w64-mingw32/lib    -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_64-w
64-mingw32/lib -lfreetype  -lhdf5 -lGraphicsMagick++ -lGraphicsMagick  -lz -lfft
w3  -lfftw3f  -lopengl32 -lglu32 -L/scratch/jwe/mxe-octave/4.2.0/w64-32/usr/x86_
64-w64-mingw32/lib -lfontconfig -lfreetype     -lgl2ps  -ladvapi32 -llapack
 -lws2_32  -lws2_32 -lws2_32      -lcurl -lcholmod -lumfpack -lamd -lcamd -lcola
md -lccolamd -lcxsparse -lsuitesparseconfig -larpack -lqrupdate -lfftw3  -lfftw3
f  -llapack -lblas -lreadline -ltermcap  -L/scratch/jwe/mxe-octave/4.2.0/w64-32/
usr/x86_64-w64-mingw32/lib -lpcre    -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/lib/gcc/x86_64
-w64-mingw32/4.9.4 -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/../lib -L/scratch/jwe/mxe-octa
ve/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/j
we/mxe-octave/4.2.0/w64-32/usr/mingw/lib -lm -lgfortran -lmingw32 -lmoldname -lm
ingwex -lmsvcrt -lquadmath -ladvapi32 -lshell32 -luser32 -lkernel32 -lm   -lgdi3
2 -lws2_32 -luser32 -lkernel32 -lgdi32 -lws2_32 -luser32 -lkernel32



Tatsuro

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mkoctfile cannot find -loctinterp and -loctave libraries

tmacchant
----- 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: [hidden email]
>> 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

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mkoctfile cannot find -loctinterp and -loctave libraries

Fávero Santos
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 <[hidden email]> 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: [hidden email]
>> 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


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Mkoctfile cannot find -loctinterp and -loctave libraries

tmacchant
In reply to this post by Fávero Santos
--- favero.santos

> 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 <[hidden email]> 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: [hidden email]
> >> 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
>  
-l cannot have path name.
library path should be specified -L option.


see other -lxxx (xxx is library name) in mkoctfile -v output.

Tatsuro

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mkoctfile cannot find -loctinterp and -loctave libraries

tmacchant
In reply to this post by tmacchant
Nabble archive
http://octave.1599824.n4.nabble.com/Mkoctfile-cannot-find-loctinterp-and-loctave-libraries-td4682081.html

Mkoctfile cannot find -loctinterp and -loctave libraries



Some last posts were not CC.ed to help list.
Finally problem is solved.

Original command line

mkoctfile -l "lib/x86/dwf.lib" "samples/c/analogin_sample.cpp"


author pass -l "lib/x86/dwf.lib"
then -l appear in link command line illegal way 
-l-LC:\Octave\Octave-4.2.0\lib\octave\4.2.0


then library location option does not work 
(should be -LC:\Octave\Octave-4.2.0\lib\octave\4.2.0)
then lead to "cannot find -loctinterp and -loctave libraries"



Final working mkoctfile command

mkoctfile -L./lib/x64 -ldwf  ./samples/c/analogin_sample.cpp


-l option perhaps cannot have path.
-lxxxx (xxxx is library name for libxxxx.a, libxxxx.dll.a or xxxx.lib)


Specify library path by
-L./lib/x64
and
specify library name 
-ldwf


solves the issue

Tatsuro

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Loading...