Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!p15g2000vbl.googlegroups.com!not-for-mail
From: Ralf <meteoradix@gmx.net>
Newsgroups: comp.soft-sys.matlab
Subject: Compiling MEX-file with external library
Date: Thu, 29 Oct 2009 08:36:14 -0700 (PDT)
Organization: http://groups.google.com
Lines: 31
Message-ID: <a23855e8-0d6f-4496-b672-014203e218e1@p15g2000vbl.googlegroups.com>
NNTP-Posting-Host: 131.188.234.18
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256830574 28955 127.0.0.1 (29 Oct 2009 15:36:14 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 29 Oct 2009 15:36:14 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p15g2000vbl.googlegroups.com; posting-host=131.188.234.18; 
	posting-account=eSE2MwoAAAAqoP4uVtyslepjsEVCHTXr
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.3) 
	Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:581013


Hello all,

I am trying to compile a MEX-file, which uses an external library
function. The library is available as "tcdlls.lib".

But performing the compilation I get the following error. I have tried
also copying the .lib file to the working directory, but this did not
help. The library-file is correctly spelled. Using Visual Studio or
LCC-compiler did not make any difference. What is going wrong?

Thank you very much,
Ralf

>> mex timestwo.c -ltcdlls.lib -L"D:\Eigene Dateien\LibPath\"

Warning: MEX could not find the library "tcdlls.lib"
         specified with -l option on the path specified
         with the -L option.
   Bibliothek ".......\templib.x" und Objekt ".......\templib.exp"
werden erstellt.
timestwo.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
Symbol (unresolved external symbol) "_tc_init_root" in Funktion
"_timestwo".
timestwo.mexw32 : fatal error LNK1120: 1 nicht aufgelöste externe
Verweise (unresolved external symbol).

  C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: Link of
'timestwo.mexw32' failed.

??? Error using ==> mex at 221
Unable to complete successfully.