473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

error C1004

Hello All,

I am making a program and need the grt_main.c but i try to compile have the error c1004.Please help me how to solve it?
Thank you.
--------------------Configuration: pre - Win32 Debug--------------------
Compiling...
pre.c
c:\matlab6p5\work\penat\grt_main.c(661) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

This code grt_main.c :

/* $Revision: 1.68 $
* Copyright 1994-2002 The MathWorks, Inc.
*
* File : grt_main.c
*
* Abstract:
* A Generic "Real-Time (single tasking or pseudo-multitasking,
* statically allocated data)" main that runs under most
* operating systems.
*
* This file may be a useful starting point when targeting a new
* processor or microcontroller.
*
*
* Compiler specified defines:
* RT - Required.
* MODEL=modelname - Required.
* NUMST=# - Required. Number of sample times.
* NCSTATES=# - Required. Number of continuous states.
* TID01EQ=1 or 0 - Optional. Only define to 1 if sample time task
* id's 0 and 1 have equal rates.
* MULTITASKING - Optional. (use MT for a synonym).
* SAVEFILE - Optional (non-quoted) name of .mat file to create.
* Default is <MODEL>.mat
* BORLAND - Required if using Borland C/C++
*/

#include <float.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "tmwtypes.h"
#include "rtmodel.h"
#include "rt_sim.h"
#include "rt_logging.h"
#include "rt_nonfinite.h"
#include "rt_mxclassid.h"

/*#include "stdafx.h"*/



/* Signal Handler header */
#ifdef BORLAND
#include <signal.h>
#include <float.h>
#endif

#include "ext_work.h"

/*=========*
* Defines *
*=========*/

#ifndef TRUE
#define FALSE (0)
#define TRUE (1)
#endif

#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif

#define QUOTE1(name) #name
#define QUOTE(name) QUOTE1(name) /* need to expand name */


#ifndef __RT_SIM__
#define __RT_SIM__

#ifndef RT
# error "must define RT"
#endif

#ifndef MODEL
# error "must define MODEL"
#endif

#ifndef NUMST
# error "must define number of sample times, NUMST"
#endif

#ifndef NCSTATES
# error "must define NCSTATES"
#endif

#ifndef SAVEFILE
# define MATFILE2(file) #file ".mat"
# define MATFILE1(file) MATFILE2(file)
# define MATFILE MATFILE1(MODEL)
#else
# define MATFILE QUOTE(SAVEFILE)
#endif

#define RUN_FOREVER -1.0

#define EXPAND_CONCAT(name1,name2) name1 ## name2
#define CONCAT(name1,name2) EXPAND_CONCAT(name1,name2)
#define RT_MODEL CONCAT(MODEL,_rtModel)

/*====================*
* External functions *
*====================*/
extern RT_MODEL *MODEL(void);

extern void MdlInitializeSizes(void);
extern void MdlInitializeSampleTimes(void);
extern void MdlStart(void);
extern void MdlOutputs(int_T tid);
extern void MdlUpdate(int_T tid);
extern void MdlTerminate(void);

#if NCSTATES > 0
extern void rt_ODECreateIntegrationData(RTWSolverInfo *si);
extern void rt_ODEUpdateContinuousStates(RTWSolverInfo *si);

# define rt_CreateIntegrationData(S) \
rt_ODECreateIntegrationData(rtmGetRTWSolverInfo(S) );
# define rt_UpdateContinuousStates(S) \
rt_ODEUpdateContinuousStates(rtmGetRTWSolverInfo(S ));
# else
# define rt_CreateIntegrationData(S) \
rtsiSetSolverName(rtmGetRTWSolverInfo(S),"FixedSte pDiscrete");
# define rt_UpdateContinuousStates(S) \
rtmSetT(S, rtsiGetSolverStopTime(rtmGetRTWSolverInfo(S)));
#endif


/*==================================*
* Global data local to this module *
*==================================*/

static struct {
int_T stopExecutionFlag;
int_T isrOverrun;
int_T overrunFlags[NUMST];
const char_T *errmsg;
} GBLbuf;


#ifdef EXT_MODE
# define rtExtModeSingleTaskUpload(S) \
{ \
int stIdx; \
rtExtModeUploadCheckTrigger(); \
for (stIdx=0; stIdx<NUMST; stIdx++) { \
if (rtmIsSampleHit(S, stIdx, 0 /*unused*/)) { \
rtExtModeUpload(stIdx,rtmGetTaskTime(S,stIdx)); \
} \
} \
}
#else
# define rtExtModeSingleTaskUpload(S) /* Do nothing */
#endif

/*=================*
* Local functions *
*=================*/

#ifdef BORLAND
/* Implemented for BC++ only*/

typedef void (*fptr)(int, int);

/* Function: divideByZero ================================================== ===
*
* Abstract: Traps the error Division by zero and prints a warning
* Also catches other FP errors, but does not identify them
* specifically.
*/
void divideByZero(int sigName, int sigType)
{
signal(SIGFPE, (fptr)divideByZero);
if ((sigType == FPE_ZERODIVIDE)||(sigType == FPE_INTDIV0)){
printf("*** Warning: Division by zero\n\n");
return;
}
else{
printf("*** Warning: Floating Point error\n\n");
return;
}
} /* end divideByZero */

#endif /* BORLAND */

#if !defined(MULTITASKING) /* SINGLETASKING */

/* Function: rtOneStep ================================================== ======
*
* Abstract:
* Perform one step of the model. This function is modeled such that
* it could be called from an interrupt service routine (ISR) with minor
* modifications.
*/
static void rt_OneStep(RT_MODEL *S)
{
real_T tnext;

/***********************************************
* Check and see if base step time is too fast *
***********************************************/

if (GBLbuf.isrOverrun++) {
GBLbuf.stopExecutionFlag = 1;
return;
}

/***********************************************
* Check and see if error status has been set *
***********************************************/

if (rtmGetErrorStatus(S) != NULL) {
GBLbuf.stopExecutionFlag = 1;
return;
}

/* enable interrupts here */

rtExtModeOneStep(rtmGetRTWExtModeInfo(S),
(boolean_T *)&rtmGetStopRequested(S));

tnext = rt_SimGetNextSampleHit();
rtsiSetSolverStopTime(rtmGetRTWSolverInfo(S),tnext );

MdlOutputs(0);

rtExtModeSingleTaskUpload(S);

GBLbuf.errmsg = rt_UpdateTXYLogVars(rtmGetRTWLogInfo(S),
rtmGetTPtr(S));
if (GBLbuf.errmsg != NULL) {
GBLbuf.stopExecutionFlag = 1;
return;
}

MdlUpdate(0);
rt_SimUpdateDiscreteTaskSampleHits(rtmGetNumSample Times(S),
rtmGetTimingData(S),
rtmGetSampleHitPtr(S),
rtmGetTPtr(S));

if (rtmGetSampleTime(S,0) == CONTINUOUS_SAMPLE_TIME) {
rt_UpdateContinuousStates(S);
}

GBLbuf.isrOverrun--;

rtExtModeCheckEndTrigger();

} /* end rtOneStep */

#else /* MULTITASKING */

# if TID01EQ == 1
# define FIRST_TID 1
# else
# define FIRST_TID 0
# endif

/* Function: rtOneStep ================================================== ======
*
* Abstract:
* Perform one step of the model. This function is modeled such that
* it could be called from an interrupt service routine (ISR) with minor
* modifications.
*
* This routine is modeled for use in a multitasking environment and
* therefore needs to be fully re-entrant when it is called from an
* interrupt service routine.
*
* Note:
* Error checking is provided which will only be used if this routine
* is attached to an interrupt.
*
*/
static void rt_OneStep(RT_MODEL *S)
{
int_T eventFlags[NUMST];
int_T i;
real_T tnext;
int_T *sampleHit = rtmGetSampleHitPtr(S);

/***********************************************
* Check and see if base step time is too fast *
***********************************************/

if (GBLbuf.isrOverrun++) {
GBLbuf.stopExecutionFlag = 1;
return;
}

/***********************************************
* Check and see if error status has been set *
***********************************************/

if (rtmGetErrorStatus(S) != NULL) {
GBLbuf.stopExecutionFlag = 1;
return;
}
/* enable interrupts here */

rtExtModeOneStep(rtmGetRTWExtModeInfo(S),
(boolean_T *)&rtmGetStopRequested(S));

/************************************************** **********************
* Update discrete events and buffer event flags locally so that ISR is *
* re-entrant. *
************************************************** **********************/

tnext = rt_SimUpdateDiscreteEvents(rtmGetNumSampleTimes(S) ,
rtmGetTimingData(S),
rtmGetSampleHitPtr(S),
rtmGetPerTaskSampleHitsPtr(S));
rtsiSetSolverStopTime(rtmGetRTWSolverInfo(S),tnext );
for (i=FIRST_TID+1; i < NUMST; i++) {
eventFlags[i] = sampleHit[i];
}

/*******************************************
* Step the model for the base sample time *
*******************************************/

MdlOutputs(FIRST_TID);

rtExtModeUploadCheckTrigger();
rtExtModeUpload(FIRST_TID,rtmGetTaskTime(S, FIRST_TID));

GBLbuf.errmsg = rt_UpdateTXYLogVars(rtmGetRTWLogInfo(S),
rtmGetTPtr(S));
if (GBLbuf.errmsg != NULL) {
GBLbuf.stopExecutionFlag = 1;
return;
}

MdlUpdate(FIRST_TID);

if (rtmGetSampleTime(S,0) == CONTINUOUS_SAMPLE_TIME) {
rt_UpdateContinuousStates(S);
}
else {
rt_SimUpdateDiscreteTaskTime(rtmGetTPtr(S),
rtmGetTimingData(S), 0);
}

#if FIRST_TID == 1
rt_SimUpdateDiscreteTaskTime(rtmGetTPtr(S),
rtmGetTimingData(S),1);
#endif


/************************************************** **********************
* Model step complete for base sample time, now it is okay to *
* re-interrupt this ISR. *
************************************************** **********************/

GBLbuf.isrOverrun--;


/*********************************************
* Step the model for any other sample times *
*********************************************/

for (i=FIRST_TID+1; i<NUMST; i++) {
if (eventFlags[i]) {
if (GBLbuf.overrunFlags[i]++) { /* Are we sampling too fast for */
GBLbuf.stopExecutionFlag=1; /* sample time "i"? */
return;
}

MdlOutputs(i);

rtExtModeUpload(i, rtmGetTaskTime(S,i));

MdlUpdate(i);

rt_SimUpdateDiscreteTaskTime(rtmGetTPtr(S),
rtmGetTimingData(S),i);

/* Indicate task complete for sample time "i" */
GBLbuf.overrunFlags[i]--;
}
}

rtExtModeCheckEndTrigger();

} /* end rtOneStep */

#endif /* MULTITASKING */


static void displayUsage (void)
{
(void) printf("usage: %s -tf <finaltime> -w -port <TCPport>\n",QUOTE(MODEL));
(void) printf("arguments:\n");
(void) printf(" -tf <finaltime> - overrides final time specified in "
"Simulink (inf for no limit).\n");
(void) printf(" -w - waits for Simulink to start model "
"in External Mode.\n");
(void) printf(" -port <TCPport> - overrides 17725 default port in "
"External Mode, valid range 256 to 65535.\n");
}

/*===================*
* Visible functions *
*===================*/


/* Function: main ================================================== ===========
*
* Abstract:
* Execute model on a generic target such as a workstation.
*/
int_T main(int_T argc, const char_T *argv[])
{
RT_MODEL *S;
const char *status;
real_T finaltime = -2.0;

int_T oldStyle_argc;
const char_T *oldStyle_argv[5];

/******************************
* MathError Handling for BC++ *
******************************/
#ifdef BORLAND
signal(SIGFPE, (fptr)divideByZero);
#endif

/*******************
* Parse arguments *
*******************/

if ((argc > 1) && (argv[1][0] != '-')) {
/* old style */
if ( argc > 3 ) {
displayUsage();
exit(EXIT_FAILURE);
}

oldStyle_argc = 1;
oldStyle_argv[0] = argv[0];

if (argc >= 2) {
oldStyle_argc = 3;

oldStyle_argv[1] = "-tf";
oldStyle_argv[2] = argv[1];
}

if (argc == 3) {
oldStyle_argc = 5;

oldStyle_argv[3] = "-port";
oldStyle_argv[4] = argv[2];

}

argc = oldStyle_argc;
argv = oldStyle_argv;

}

{
/* new style: */
double tmpDouble;
char_T tmpStr2[200];
int_T count = 1;
int_T parseError = FALSE;

/*
* Parse the standard RTW parameters. Let all unrecognized parameters
* pass through to external mode for parsing. NULL out all args handled
* so that the external mode parsing can ignore them.
*/
while(count < argc) {
const char_T *option = argv[count++];

/* final time */
if ((strcmp(option, "-tf") == 0) && (count != argc)) {
const char_T *tfStr = argv[count++];

sscanf(tfStr, "%200s", tmpStr2);
if (strcmp(tmpStr2, "inf") == 0) {
tmpDouble = RUN_FOREVER;
} else {
char_T tmpstr[2];

if ( (sscanf(tmpStr2,"%lf%1s", &tmpDouble, tmpstr) != 1) ||
(tmpDouble < 0.0) ) {
(void)printf("finaltime must be a positive, real value or inf\n");
parseError = TRUE;
break;
}
}
finaltime = (real_T) tmpDouble;

argv[count-2] = NULL;
argv[count-1] = NULL;
}
}

if (parseError) {
(void)printf("\nUsage: %s -option1 val1 -option2 val2 -option3 "
"...\n\n", QUOTE(MODEL));
(void)printf("\t-tf 20 - sets final time to 20 seconds\n");

exit(EXIT_FAILURE);
}

rtExtModeParseArgs(argc, argv, NULL);

/*
* Check for unprocessed ("unhandled") args.
*/
{
int i;
for (i=1; i<argc; i++) {
if (argv[i] != NULL) {
printf("Unexpected command line argument: %s\n",argv[i]);
exit(EXIT_FAILURE);
}
}
}
}

/****************************
* Initialize global memory *
****************************/
(void)memset(&GBLbuf, 0, sizeof(GBLbuf));

/************************
* Initialize the model *
************************/
rt_InitInfAndNaN(sizeof(real_T));

S = MODEL();
if (rtmGetErrorStatus(S) != NULL) {
(void)fprintf(stderr,"Error during model registration: %s\n",
rtmGetErrorStatus(S));
exit(EXIT_FAILURE);
}
if (finaltime >= 0.0 || finaltime == RUN_FOREVER) rtmSetTFinal(S,finaltime);

MdlInitializeSizes();
MdlInitializeSampleTimes();

status = rt_SimInitTimingEngine(rtmGetNumSampleTimes(S),
rtmGetStepSize(S),
rtmGetSampleTimePtr(S),
rtmGetOffsetTimePtr(S),
rtmGetSampleHitPtr(S),
rtmGetSampleTimeTaskIDPtr(S),
rtmGetTStart(S),
&rtmGetSimTimeStep(S),
&rtmGetTimingData(S));

if (status != NULL) {
(void)fprintf(stderr,
"Failed to initialize sample time engine: %s\n", status);
exit(EXIT_FAILURE);
}
rt_CreateIntegrationData(S);

GBLbuf.errmsg = rt_StartDataLogging(rtmGetRTWLogInfo(S),
rtmGetTFinal(S),
rtmGetStepSize(S),
&rtmGetErrorStatus(S));
if (GBLbuf.errmsg != NULL) {
(void)fprintf(stderr,"Error starting data logging: %s\n",GBLbuf.errmsg);
return(EXIT_FAILURE);
}

rtExtModeCheckInit();
rtExtModeWaitForStartMsg(rtmGetRTWExtModeInfo(S),
(boolean_T *)&rtmGetStopRequested(S));

(void)printf("\n** starting the model **\n");

MdlStart();
if (rtmGetErrorStatus(S) != NULL) {
GBLbuf.stopExecutionFlag = 1;
}

/************************************************** ***********************
* Execute the model. You may attach rtOneStep to an ISR, if so replace *
* the call to rtOneStep (below) with a call to a background task *
* application. *
************************************************** ***********************/

if (rtmGetTFinal(S) == RUN_FOREVER) {
printf ("\n**May run forever. Model stop time set to infinity.**\n");
}

while (!GBLbuf.stopExecutionFlag &&
(rtmGetTFinal(S) == RUN_FOREVER ||
rtmGetTFinal(S)-rtmGetT(S) > rtmGetT(S)*DBL_EPSILON)) {

rtExtModePauseIfNeeded(rtmGetRTWExtModeInfo(S),
(boolean_T *)&rtmGetStopRequested(S));

if (rtmGetStopRequested(S)) break;
rt_OneStep(S);
}

if (!GBLbuf.stopExecutionFlag && !rtmGetStopRequested(S)) {
/* Execute model last time step */
rt_OneStep(S);
}

/********************
* Cleanup and exit *
********************/

rt_StopDataLogging(MATFILE,rtmGetRTWLogInfo(S));

rtExtModeShutdown();

if (GBLbuf.errmsg) {
(void)fprintf(stderr,"%s\n",GBLbuf.errmsg);
exit(EXIT_FAILURE);
}

if (GBLbuf.isrOverrun) {
(void)fprintf(stderr,
"%s: ISR overrun - base sampling rate is too fast\n",
QUOTE(MODEL));
exit(EXIT_FAILURE);
}

if (rtmGetErrorStatus(S) != NULL) {
(void)fprintf(stderr,"%s\n", rtmGetErrorStatus(S));
exit(EXIT_FAILURE);
}
#ifdef MULTITASKING
else {
int_T i;
for (i=1; i<NUMST; i++) {
if (GBLbuf.overrunFlags[i]) {
(void)fprintf(stderr,
"%s ISR overrun - sampling rate is too fast for "
"sample time index %d\n", QUOTE(MODEL), i);
exit(EXIT_FAILURE);
}
}
}
#endif

MdlTerminate();
return(EXIT_SUCCESS);

/* end main */


/* EOF: grt_main.c */
Jan 5 '08 #1
12 7144
Studlyami
464 Expert 256MB
you probably forgot a closing bracket ( } ) somewhere. check over your code again and make sure each { has a } associated with it.
Jan 5 '08 #2
Studlyami
464 Expert 256MB
please post comments regarding this problem in here

looking at code that you posted
Expand|Select|Wrap|Line Numbers
  1. #ifndef __RT_SIM__
  2. #define __RT_SIM__
  3. //no endif for this ifndef
  4.  
Expand|Select|Wrap|Line Numbers
  1. #ifdef MULTITASKING //bottom of file
  2.     else {
  3. //is this else suppose to be #else
  4.  
Jan 5 '08 #3
weaknessforcats
9,208 Expert Mod 8TB
cl.exe is Microsoft's compiler.

It doesn't like the final line to have any data in it.

Go through all of your files and be sure there is a null line (enter key only) at the end of each file. Do this in both header and source files.
Jan 5 '08 #4
cl.exe is Microsoft's compiler.

It doesn't like the final line to have any data in it.

Go through all of your files and be sure there is a null line (enter key only) at the end of each file. Do this in both header and source files.
Thanks for your help. Error already settle about error c1004. Now my problem how to fill RT, NUMST=#, NCSTATES=#, MODEL (can be seen in abstract grt_main.c - compiler specified defines). i am trying to fill of RT,NUMST=#, NCSTATES=# using "string/number" and MODEL is name of file in MATLAB but still have error.

c:\matlab6p5\work\robot\grt_main.c(82) : fatal error C1189: #error : "1" --> i am trying fill RT =1

Could you explain with me how to solve them, because important for me.
Thank you so much.

-Jonatan-
Jan 7 '08 #5
weaknessforcats
9,208 Expert Mod 8TB
You are using a preprocessor definition (in an ifdef or ifndef) without ever having #define the definition.
Jan 7 '08 #6
You are using a preprocessor definition (in an ifdef or ifndef) without ever having #define the definition.
Sir, what should to do, because these code i got from matlab c:matlab6p5/rtw/c/grt/grt_main.c. Do you have suggestion for me?
Thank You
Jan 8 '08 #7
gpraghuram
1,275 Expert 1GB
Sir, what should to do, because these code i got from matlab c:matlab6p5/rtw/c/grt/grt_main.c. Do you have suggestion for me?
Thank You
I added the following at the end of the code

}
#endif

Now it is telling that it is not able to find the header files.


Raghuram
Jan 8 '08 #8
I added the following at the end of the code

}
#endif

Now it is telling that it is not able to find the header files.


Raghuram
Sir, grt_main.c is not able to find the header files.
Is it possible the code from simulink-matlab especially grt_main.c (generic real time) can to run on vc++? because to much error in grt_main.c. Actually code grt_main.c is the code of Matlab.
Jan 8 '08 #9
gpraghuram
1,275 Expert 1GB
Sir, grt_main.c is not able to find the header files.
Is it possible the code from simulink-matlab especially grt_main.c (generic real time) can to run on vc++? because to much error in grt_main.c. Actually code grt_main.c is the code of Matlab.
You should have all the header files with you as you have the source code grt_main.c
If not you have to get the same and try to compile it.

Raghuram
Jan 8 '08 #10
You should have all the header files with you as you have the source code grt_main.c
If not you have to get the same and try to compile it.

Raghuram
Sir, i try to compile grt_main.c on vc++ too much error (62 error(s), 9 warning(s)
). i already try to repair but still have error. Please help me.

------- Configuration: RV2AJFRONT_NEW - Win32 Debug-------
Compiling...
RV2AJFRONT_NEW.c
c:\matlab6p5\work\denas\grt_main.c(126) : warning C4003: not enough actual parameters for macro 'EXPAND_CONCAT'
c:\matlab6p5\work\denas\grt_main.c(126) : error C2143: syntax error : missing '{' before '*'
c:\matlab6p5\work\denas\grt_main.c(126) : error C2059: syntax error : 'type'
c:\matlab6p5\work\denas\grt_main.c(159) : error C2229: struct '__unnamed' has an illegal zero-sized array
c:\matlab6p5\work\denas\grt_main.c(217) : warning C4003: not enough actual parameters for macro 'EXPAND_CONCAT'
c:\matlab6p5\work\denas\grt_main.c(217) : error C2143: syntax error : missing ')' before '*'
c:\matlab6p5\work\denas\grt_main.c(217) : error C2143: syntax error : missing '{' before '*'
c:\matlab6p5\work\denas\grt_main.c(217) : error C2059: syntax error : ')'
c:\matlab6p5\work\denas\grt_main.c(218) : error C2054: expected '(' to follow 'S'
c:\matlab6p5\work\denas\grt_main.c(243) : warning C4002: too many actual parameters for macro 'rtExtModeOneStep'
c:\matlab6p5\work\denas\grt_main.c(422) : warning C4003: not enough actual parameters for macro 'QUOTE1'
c:\matlab6p5\work\denas\grt_main.c(422) : error C2059: syntax error : ')'
c:\matlab6p5\work\denas\grt_main.c(442) : error C2061: syntax error : identifier 'main'
c:\matlab6p5\work\denas\grt_main.c(442) : error C2059: syntax error : ';'
c:\matlab6p5\work\denas\grt_main.c(442) : error C2059: syntax error : 'type'
c:\matlab6p5\work\denas\grt_main.c(444) : warning C4003: not enough actual parameters for macro 'EXPAND_CONCAT'
c:\matlab6p5\work\denas\grt_main.c(463) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(505) : error C2059: syntax error : 'while'
c:\matlab6p5\work\denas\grt_main.c(532) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(534) : warning C4003: not enough actual parameters for macro 'QUOTE1'
c:\matlab6p5\work\denas\grt_main.c(545) : error C2449: found '{' at file scope (missing function header?)
c:\matlab6p5\work\denas\grt_main.c(553) : error C2059: syntax error : '}'
c:\matlab6p5\work\denas\grt_main.c(564) : error C2143: syntax error : missing ')' before 'sizeof'
c:\matlab6p5\work\denas\grt_main.c(564) : error C2143: syntax error : missing '{' before 'sizeof'
c:\matlab6p5\work\denas\grt_main.c(564) : error C2059: syntax error : 'sizeof'
c:\matlab6p5\work\denas\grt_main.c(566) : error C2040: 'S' : 'int ' differs in levels of indirection from 'int *'
c:\matlab6p5\work\denas\grt_main.c(566) : error C2059: syntax error : ')'
c:\matlab6p5\work\denas\grt_main.c(567) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(572) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(574) : error C2371: 'MdlInitializeSizes' : redefinition; different basic types
c:\matlab6p5\work\denas\grt_main.c(128) : see declaration of 'MdlInitializeSizes'
c:\matlab6p5\work\denas\grt_main.c(575) : error C2371: 'MdlInitializeSampleTimes' : redefinition; different basic types
c:\matlab6p5\work\denas\grt_main.c(129) : see declaration of 'MdlInitializeSampleTimes'
c:\matlab6p5\work\denas\grt_main.c(577) : error C2223: left of '->Sizes' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(578) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(579) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(580) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(581) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(582) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(583) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(584) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(585) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(585) : error C2198: 'rt_SimInitTimingEngine' : too few actual parameters
c:\matlab6p5\work\denas\grt_main.c(585) : error C2099: initializer is not a constant
c:\matlab6p5\work\denas\grt_main.c(587) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(592) : error C2143: syntax error : missing ')' before '->'
c:\matlab6p5\work\denas\grt_main.c(599) : error C2143: syntax error : missing '{' before '.'
c:\matlab6p5\work\denas\grt_main.c(599) : error C2059: syntax error : '.'
c:\matlab6p5\work\denas\grt_main.c(603) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(608) : warning C4002: too many actual parameters for macro 'rtExtModeCheckInit'
c:\matlab6p5\work\denas\grt_main.c(609) : error C2143: syntax error : missing ')' before '('
c:\matlab6p5\work\denas\grt_main.c(609) : error C2143: syntax error : missing ')' before '('
c:\matlab6p5\work\denas\grt_main.c(609) : error C2091: function returns function
c:\matlab6p5\work\denas\grt_main.c(609) : error C2091: function returns function
c:\matlab6p5\work\denas\grt_main.c(609) : error C2143: syntax error : missing '{' before '->'
c:\matlab6p5\work\denas\grt_main.c(609) : error C2059: syntax error : '->'
c:\matlab6p5\work\denas\grt_main.c(609) : error C2059: syntax error : ')'
c:\matlab6p5\work\denas\grt_main.c(613) : error C2059: syntax error : 'type'
c:\matlab6p5\work\denas\grt_main.c(615) : error C2371: 'MdlStart' : redefinition; different basic types
c:\matlab6p5\work\denas\grt_main.c(130) : see declaration of 'MdlStart'
c:\matlab6p5\work\denas\grt_main.c(616) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(626) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(630) : error C2059: syntax error : 'while'
c:\matlab6p5\work\denas\grt_main.c(641) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(654) : warning C4003: not enough actual parameters for macro 'MATFILE2'
c:\matlab6p5\work\denas\grt_main.c(654) : error C2143: syntax error : missing ')' before 'string'
c:\matlab6p5\work\denas\grt_main.c(654) : error C2143: syntax error : missing '{' before 'string'
c:\matlab6p5\work\denas\grt_main.c(654) : error C2059: syntax error : '<Unknown>'
c:\matlab6p5\work\denas\grt_main.c(658) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(663) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(666) : warning C4003: not enough actual parameters for macro 'QUOTE1'
c:\matlab6p5\work\denas\grt_main.c(670) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(688) : error C2371: 'MdlTerminate' : redefinition; different basic types
c:\matlab6p5\work\denas\grt_main.c(133) : see declaration of 'MdlTerminate'
c:\matlab6p5\work\denas\grt_main.c(689) : error C2059: syntax error : 'return'
Error executing cl.exe.

RV2AJFRONT_NEW.obj - 62 error(s), 9 warning(s)
Jan 10 '08 #11
Sir, i try to compile grt_main.c on vc++ too much error (62 error(s), 9 warning(s)
). i already try to repair but still have error. Please help me.

------- Configuration: RV2AJFRONT_NEW - Win32 Debug-------
Compiling...
RV2AJFRONT_NEW.c
c:\matlab6p5\work\denas\grt_main.c(126) : warning C4003: not enough actual parameters for macro 'EXPAND_CONCAT'
c:\matlab6p5\work\denas\grt_main.c(126) : error C2143: syntax error : missing '{' before '*'
c:\matlab6p5\work\denas\grt_main.c(126) : error C2059: syntax error : 'type'
c:\matlab6p5\work\denas\grt_main.c(159) : error C2229: struct '__unnamed' has an illegal zero-sized array
c:\matlab6p5\work\denas\grt_main.c(217) : warning C4003: not enough actual parameters for macro 'EXPAND_CONCAT'
c:\matlab6p5\work\denas\grt_main.c(217) : error C2143: syntax error : missing ')' before '*'
c:\matlab6p5\work\denas\grt_main.c(217) : error C2143: syntax error : missing '{' before '*'
c:\matlab6p5\work\denas\grt_main.c(217) : error C2059: syntax error : ')'
c:\matlab6p5\work\denas\grt_main.c(218) : error C2054: expected '(' to follow 'S'
c:\matlab6p5\work\denas\grt_main.c(243) : warning C4002: too many actual parameters for macro 'rtExtModeOneStep'
c:\matlab6p5\work\denas\grt_main.c(422) : warning C4003: not enough actual parameters for macro 'QUOTE1'
c:\matlab6p5\work\denas\grt_main.c(422) : error C2059: syntax error : ')'
c:\matlab6p5\work\denas\grt_main.c(442) : error C2061: syntax error : identifier 'main'
c:\matlab6p5\work\denas\grt_main.c(442) : error C2059: syntax error : ';'
c:\matlab6p5\work\denas\grt_main.c(442) : error C2059: syntax error : 'type'
c:\matlab6p5\work\denas\grt_main.c(444) : warning C4003: not enough actual parameters for macro 'EXPAND_CONCAT'
c:\matlab6p5\work\denas\grt_main.c(463) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(505) : error C2059: syntax error : 'while'
c:\matlab6p5\work\denas\grt_main.c(532) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(534) : warning C4003: not enough actual parameters for macro 'QUOTE1'
c:\matlab6p5\work\denas\grt_main.c(545) : error C2449: found '{' at file scope (missing function header?)
c:\matlab6p5\work\denas\grt_main.c(553) : error C2059: syntax error : '}'
c:\matlab6p5\work\denas\grt_main.c(564) : error C2143: syntax error : missing ')' before 'sizeof'
c:\matlab6p5\work\denas\grt_main.c(564) : error C2143: syntax error : missing '{' before 'sizeof'
c:\matlab6p5\work\denas\grt_main.c(564) : error C2059: syntax error : 'sizeof'
c:\matlab6p5\work\denas\grt_main.c(566) : error C2040: 'S' : 'int ' differs in levels of indirection from 'int *'
c:\matlab6p5\work\denas\grt_main.c(566) : error C2059: syntax error : ')'
c:\matlab6p5\work\denas\grt_main.c(567) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(572) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(574) : error C2371: 'MdlInitializeSizes' : redefinition; different basic types
c:\matlab6p5\work\denas\grt_main.c(128) : see declaration of 'MdlInitializeSizes'
c:\matlab6p5\work\denas\grt_main.c(575) : error C2371: 'MdlInitializeSampleTimes' : redefinition; different basic types
c:\matlab6p5\work\denas\grt_main.c(129) : see declaration of 'MdlInitializeSampleTimes'
c:\matlab6p5\work\denas\grt_main.c(577) : error C2223: left of '->Sizes' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(578) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(579) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(580) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(581) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(582) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(583) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(584) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(585) : error C2223: left of '->Timing' must point to struct/union
c:\matlab6p5\work\denas\grt_main.c(585) : error C2198: 'rt_SimInitTimingEngine' : too few actual parameters
c:\matlab6p5\work\denas\grt_main.c(585) : error C2099: initializer is not a constant
c:\matlab6p5\work\denas\grt_main.c(587) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(592) : error C2143: syntax error : missing ')' before '->'
c:\matlab6p5\work\denas\grt_main.c(599) : error C2143: syntax error : missing '{' before '.'
c:\matlab6p5\work\denas\grt_main.c(599) : error C2059: syntax error : '.'
c:\matlab6p5\work\denas\grt_main.c(603) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(608) : warning C4002: too many actual parameters for macro 'rtExtModeCheckInit'
c:\matlab6p5\work\denas\grt_main.c(609) : error C2143: syntax error : missing ')' before '('
c:\matlab6p5\work\denas\grt_main.c(609) : error C2143: syntax error : missing ')' before '('
c:\matlab6p5\work\denas\grt_main.c(609) : error C2091: function returns function
c:\matlab6p5\work\denas\grt_main.c(609) : error C2091: function returns function
c:\matlab6p5\work\denas\grt_main.c(609) : error C2143: syntax error : missing '{' before '->'
c:\matlab6p5\work\denas\grt_main.c(609) : error C2059: syntax error : '->'
c:\matlab6p5\work\denas\grt_main.c(609) : error C2059: syntax error : ')'
c:\matlab6p5\work\denas\grt_main.c(613) : error C2059: syntax error : 'type'
c:\matlab6p5\work\denas\grt_main.c(615) : error C2371: 'MdlStart' : redefinition; different basic types
c:\matlab6p5\work\denas\grt_main.c(130) : see declaration of 'MdlStart'
c:\matlab6p5\work\denas\grt_main.c(616) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(626) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(630) : error C2059: syntax error : 'while'
c:\matlab6p5\work\denas\grt_main.c(641) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(654) : warning C4003: not enough actual parameters for macro 'MATFILE2'
c:\matlab6p5\work\denas\grt_main.c(654) : error C2143: syntax error : missing ')' before 'string'
c:\matlab6p5\work\denas\grt_main.c(654) : error C2143: syntax error : missing '{' before 'string'
c:\matlab6p5\work\denas\grt_main.c(654) : error C2059: syntax error : '<Unknown>'
c:\matlab6p5\work\denas\grt_main.c(658) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(663) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(666) : warning C4003: not enough actual parameters for macro 'QUOTE1'
c:\matlab6p5\work\denas\grt_main.c(670) : error C2059: syntax error : 'if'
c:\matlab6p5\work\denas\grt_main.c(688) : error C2371: 'MdlTerminate' : redefinition; different basic types
c:\matlab6p5\work\denas\grt_main.c(133) : see declaration of 'MdlTerminate'
c:\matlab6p5\work\denas\grt_main.c(689) : error C2059: syntax error : 'return'
Error executing cl.exe.

RV2AJFRONT_NEW.obj - 62 error(s), 9 warning(s)
Sir, i already settle this problem. Thank u for your attention.
Jan 10 '08 #12
gpraghuram
1,275 Expert 1GB
Sir, i already settle this problem. Thank u for your attention.
Nice to hear that.
But what was the problem and how did you solve it?

Raghuram
Jan 10 '08 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: M. Faust | last post by:
In Visual C++ 6 (SP6) I get the error message Debug-------------------- Compiling... srs_wrap.cpp srs_wrap.cpp(887) : error C2146: syntax error : missing ';' before identifier 'name'...
1
by: geek04 | last post by:
i'm using pro*c to precompile my c++ code which accesses oracle 9i database, i'm running a oracle 9i client on my system on compiling the c++ file (generated by pro*c)i'm getting following...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
1
by: yanwan | last post by:
Hello I am now compling a project, but in one source file of this project, I met this problem. It seems very strange. Below is this source file: ----------------------------------------...
3
by: Andrew Luke | last post by:
Hi all you C++ guru's! I'm 'very, very' new to C++ and I'm having a little trouble configuring my VS environment I think - when I try and compile some sample code I'm getting the following...
4
by: yanwan | last post by:
Hello I am now compling a project, but in one source file of this project, I met this problem. It seems very strange. Below is this source file: ----------------------------------------...
2
by: Qiao Yun | last post by:
I used vc++.net (visual studio .net ) to open a project which can work well in vc++6.0. I succeeded in compiling the project in vc++.net in release mode . But when I tried to compile the project...
2
by: teddybyte | last post by:
my script below is: #include "stdafx.h" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, ...
1
by: eshuv | last post by:
hi I am faceing this problem when comlling the .cpp file . fatal error C1004: unexpected end of file found
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.