Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!k17g2000yqb.googlegroups.com!not-for-mail
From: Praetorian <ashish.sadanandan@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Compiling MEX-file with external library
Date: Thu, 29 Oct 2009 10:18:16 -0700 (PDT)
Organization: http://groups.google.com
Lines: 26
Message-ID: <df86608e-e1ec-47f2-a846-c5e3cdfd8508@k17g2000yqb.googlegroups.com>
References: <a23855e8-0d6f-4496-b672-014203e218e1@p15g2000vbl.googlegroups.com> 
	<hcch1u$73r$1@fred.mathworks.com>
NNTP-Posting-Host: 63.238.229.186
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256836696 2508 127.0.0.1 (29 Oct 2009 17:18:16 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 29 Oct 2009 17:18:16 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: k17g2000yqb.googlegroups.com; posting-host=63.238.229.186; 
	posting-account=uxNuEQoAAABwxsrGxAKeLxAj2hdO1tck
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) 
	Gecko/20091016 Firefox/3.5.4,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:581070


On Oct 29, 10:49 am, "James Tursa"
<aclassyguy_with_a_k_not_...@hotmail.com> wrote:
> Ralf <meteora...@gmx.net> wrote in message <a23855e8-0d6f-4496-b672-014203e21...@p15g2000vbl.googlegroups.com>...
>
> > I am trying to compile a MEX-file, which uses an external library
> > function. The library is available as "tcdlls.lib".
>
> > I have tried
> > also copying the .lib file to the working directory, but this did not
> > help.
>
> What mex command did you use when you tried this method? I would expect this to work:
>
> mex timestwo.c tcdlls.lib
>
> James Tursa

Do as James suggested, do no use the -l or -L directives, just list
the .lib files along with the list of source files. You can either
copy the library to the working directory or enter the path to
wherever it is located.

HTH,
Ashish.