S
Sheldon
Hi,
Can anyone tell me why this script file.c and file.h causes a core
dump when it is compiled and run?
Any help is appreciated.
Sheldon
snip....
file.h:
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <dirent.h>
#include <errno.h>
#include <ctype.h>
#include <stdarg.h>
#include <sys/types.h>
#include "fort2c.h"
#define KELEM 500
#define KVALS 200000
#define IBFLEN 50000
char MODER[] = "r";
char FILNM[] = "string_path";
file.c:
#include "file.h"
int main() {
int IRET, ILEN, IUNIT1, IUNIT2, ILOOP, KERR;
int KTDLEN, KTDEXL;
/* 1D arrays */
int IBUFF[IBFLEN];
char CNAMES[64][KELEM];
char CUNITS[24][KELEM];
char CVALS[80][KVALS];
float VALUES[KVALS];
int KTDLST[KELEM];
int KTDEXP[KELEM];
int KSEC0[8];
int KSEC1[40];
int KSEC2[64];
int KEY[46];
int KSUP[9];
int KSEC3[4];
int KSEC4[2];
char ID[8];
int i, ii;
printf("Testing\n");
return 1;
}
snip....
Can anyone tell me why this script file.c and file.h causes a core
dump when it is compiled and run?
Any help is appreciated.
Sheldon
snip....
file.h:
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <dirent.h>
#include <errno.h>
#include <ctype.h>
#include <stdarg.h>
#include <sys/types.h>
#include "fort2c.h"
#define KELEM 500
#define KVALS 200000
#define IBFLEN 50000
char MODER[] = "r";
char FILNM[] = "string_path";
file.c:
#include "file.h"
int main() {
int IRET, ILEN, IUNIT1, IUNIT2, ILOOP, KERR;
int KTDLEN, KTDEXL;
/* 1D arrays */
int IBUFF[IBFLEN];
char CNAMES[64][KELEM];
char CUNITS[24][KELEM];
char CVALS[80][KVALS];
float VALUES[KVALS];
int KTDLST[KELEM];
int KTDEXP[KELEM];
int KSEC0[8];
int KSEC1[40];
int KSEC2[64];
int KEY[46];
int KSUP[9];
int KSEC3[4];
int KSEC4[2];
char ID[8];
int i, ii;
printf("Testing\n");
return 1;
}
snip....