How can I covert a c code to a MEX file?
Show older comments
Hi, I'm trying to convert a simple c code to a MEX file.I used the following command.
mex c_code.c
But it gives the following error.
c:\users\abrew\appdata\local\temp\mex_vgaoax\c_code.obj: multiple definition of _main
first definition is in file
c:\progra~2\matlab\r2008a\sys\lcc\lib\libcrt0.obj
Specified export _mexFunction is not defined
Missing exports. Aborting
C:\PROGRA~2\MATLAB\R2008A\BIN\MEX.PL: Error: Link of 'c_code.mexw32' failed.
??? Error using ==> mex at 207
Unable to complete successfully.
Can anyone help me to solve this issue.
Accepted Answer
More Answers (0)
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!