[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mkoctfile and linking newbie question
From: |
roumbaba |
Subject: |
Re: mkoctfile and linking newbie question |
Date: |
Wed, 27 May 2009 15:43:18 -0700 (PDT) |
Ok I have found a way around:
The same command with the -v option display the gcc commands issued.
It turns out that my -l option gets called at compile (-c) time and not a
link time for some reason.
So now instead of using mkoctfile use system( ) with the correct gcc
arguments order.
roumbaba wrote:
>
> Hi,
>
> I am trying to build a .mex file using mkoctfile --mex as described in the
> octave manual.
> I need to link in some other library 'libmylib.a' in my mex file. Trying
> to follow the manual I am doing something like this:
>
> mkoctfile --mex '-I/myincludedir/ -L/mylibdir/ -lmylib' mymexfunction.c
>
> but I get the following message from mkoctfile:
> powerpc-apple-darwin8-gcc-4.0.1: -lmylib: linker input file unused because
> linking not done
>
> and
>
> /usr/bin/ld: Undefined symbols:
> _mylib_symbol1
> collect2: ld returned 1 exit status
>
> What am I doing wrong?
>
> I am new at this, any hint will help.
>
> thanks
>
> baba
>
> btw: will a .mex file compiled using mkoctfile run under matlab?
>
>
>
--
View this message in context:
http://www.nabble.com/mkoctfile-and-linking-newbie-question-tp23735843p23752105.html
Sent from the Octave - General mailing list archive at Nabble.com.