mfm102
Electrical
- Aug 5, 2003
- 8
Hi all,
I'm a newbie here. I am trying to compile some provided .c, .h and .m files. The C files already has the mexfunction. They can be compiled in Unix without a problem but I want to try to compile it in PC. I have looked into Matlab help and MSDN documentation on how to compile the C files and Object files.
For creating a dll file from a C file (without a header .h file) is not a problem, and I manage to do that by typing this command in the Matlab prompt
>> mex examplefile1.c
A file called examplefile1.dll is created.
However I have a problem in linking some C files with Object files as below
>> mex exfile1.c objfile2.obj objfile3.obj
(Note that there is some header files involved)
The error report that I get
exfile1.obj : error LNK2001: unresolved external symbol _vector_addition
exfile1.obj : error LNK2001: unresolved external symbol _equalizer_diversity
exfile1.dll : fatal error LNK1120: 2 unresolved externals
C:\MATLAB6P1\BIN\WIN32\MEX.PL: Error: Link of 'exfile1.dll' failed.
Do you guys have any idea?
I'm a newbie here. I am trying to compile some provided .c, .h and .m files. The C files already has the mexfunction. They can be compiled in Unix without a problem but I want to try to compile it in PC. I have looked into Matlab help and MSDN documentation on how to compile the C files and Object files.
For creating a dll file from a C file (without a header .h file) is not a problem, and I manage to do that by typing this command in the Matlab prompt
>> mex examplefile1.c
A file called examplefile1.dll is created.
However I have a problem in linking some C files with Object files as below
>> mex exfile1.c objfile2.obj objfile3.obj
(Note that there is some header files involved)
The error report that I get
exfile1.obj : error LNK2001: unresolved external symbol _vector_addition
exfile1.obj : error LNK2001: unresolved external symbol _equalizer_diversity
exfile1.dll : fatal error LNK1120: 2 unresolved externals
C:\MATLAB6P1\BIN\WIN32\MEX.PL: Error: Link of 'exfile1.dll' failed.
Do you guys have any idea?