comp.soft-sys.matlab
[Top] [All Lists]

Re: error LNK2001: unresolved external symbol

Subject: Re: error LNK2001: unresolved external symbol
From: "Markus"
Date: Thu, 22 Sep 2005 10:44:56 +0300
Newsgroups: comp.soft-sys.matlab
"Bull Dog" <ku.oc.balrs@xxxxxxxxxxxxx> wrote in message 
news:ef15c9a.-1@xxxxxxxxxxxxxxxxxxx
> Hi
>
> I tried compiling a MEX:
>>> mex mymex.cpp
>
> I got the following error:
>>>mymex.obj: error LNK2001: unresolved external symbol _myfunc
>
> From my limited experience, this happens when I've forgotten to
> include a headerfile in the directory. As far as I know, all the
> header files are there. The only thing that I'm worried about is
> that the declaration of myfunc takes the form:
>
> extern "C" float * myfunc();
>
> I was wondering if it had a problem with the "extern "C"" bit.
>
> Any ideas appreciated.
> Thanks
>
> Bull Dog

I think you need to link against the library which has "myfunc"
or provide the linker myfunc.obj (in Windows). 



<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy