Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab mex-function

  1. Jul 10, 2007 #1
    Hi everyone!
    I have a lot of trouble with the command mex.
    Here is the instruction i need to use...

    MEX Compile MEX-function.
    MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
    [objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]

    MEX compiles and links source files into a shared library called a
    MEX-file, executable from within MATLAB.

    Here is what i type after the prompt...

    >> mex inversie.f

    Here is the damn error...

    Creating library C:\DOCUME~1\PRINCI~1\IMPOST~1\Temp_lib1980.lib and object C:\DOCUME~1\PRINCI~1\IMPOST~1\Temp_lib1980.exp
    Temp_lib1980.exp : error LNK2001: unresolved external symbol _MEXFUNCTION@16
    inversie.mexw32 : fatal error LNK1120: 1 unresolved externals

    C:\PROGRAMMI\MATLAB\R2006A\BIN\MEX.PL: Error: Link of 'inversie.mexw32' failed.

    ??? Error using ==> mex
    Unable to complete successfully

    Does anybody know how to fix it?
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted