compilation failed: too many initializers

조회 수: 13 (최근 30일)
Jane Jean
Jane Jean 2012년 5월 4일
Hi, I have generated a mexFunction using Matlab Coder; however the standalone mexFunction can't run on another version of Matlab due to some dependency issues (missing DLLs). Together with the mexFunction, there were also many other .c and .h files generated with Coder. I am now trying to recompile the generated .c files into mexFunction with the Matlab in which the final result must run perfectly. Unfortunately, I get the following error:
error C2078: too many initializers
What should I do to amend this?
Thanks in advance!
  댓글 수: 7
Kaustubha Govind
Kaustubha Govind 2012년 5월 4일
Jane: You need to have a make utility installed. For example, if you have Visual Studio, you should be able to call nmake.exe from a VS command window. Just say "nmake -f foo.mk".
Kaustubha Govind
Kaustubha Govind 2012년 5월 4일
Also, I would recommend looking into the Makefile to see what compiler commands are being used. You will need the corresponding compiler to be installed. For example "cl.exe" is the Visual Studio compiler.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by