a problem with MEX - 'Link of '___.c' failed.
    6 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    haMed
 el 16 de Mayo de 2014
  
    
    
    
    
    Respondida: James Tursa
      
      
 el 16 de Mayo de 2014
            I have a problem with MatLab mex. I will appreciate if you help me solve it.
I have set the compiler via 'mex -setup' and tested it by the standard example 'yprime.c' which was copied in a specific directory. Then when i try to mex my own c file 'mixer.c', there is linking problem and i can not successfully mex it! (The file mixer.c is located in the same directory as yprime.c)
I use Win 8 x64 / Matlab 2012b x64 / VS10 x32 + C++ 2010 x32, If helps.
The error is as bellow:
LINK : error LNK2001: unresolved external symbol mexFunction 
C:\Users\X550L\AppData\Local\Temp\mex_kcZP8h\templib.x : fatal error LNK1120: 1 unresolved externals 
C:\PROGRA~1\MATLAB\R2012B\BIN\MEX.PL: Error: Link of 'mixer.mexw64' failed. 
 Error using mex (line 206)
 Unable to complete successfully.
0 comentarios
Respuesta aceptada
  James Tursa
      
      
 el 16 de Mayo de 2014
        Please post your C code ... it appears you may be missing the gateway function mexFunction in your code.
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

