就剩一个错误了 帮帮忙啊
//Global.h
#include <stdio.h>
#include <iostream.h>
#include <math.h>
#include <stdlib.h>
#include <iomanip.h>
#include <time.h>
#include <malloc.h>
#include <string.h>
#include <fstream.h>
#include "defines.h"
struct NODE{
double x;
double y;
double z;
double rho;
double P;
double u;
double v;
double w;
double f[Q];
double F[Q];
};
extern NODE ****node;
extern int NBLOCK;
extern int **BLOCK;
void Grid_Read();
void Grid_DataDeal();
//Grid Read.cpp
#include "Global.h"
int NBLOCK;
int **BLOCK;
NODE ****node;
void Grid_read()
{
int i=0,j=0,k=0,l=0;
FILE *fp;
if ( (fp = fopen( "Grid/airfoil.grd", "r" )) == NULL )
printf("ERROR on open Grid!\n");
fscanf( fp, "%d",&NBLOCK);
BLOCK = new int*[NBLOCK];
for(i = 0; i < NBLOCK; i++)
{
BLOCK[i] = new int[3];
}
for(i=0;i <NBLOCK;i++)
for(j=0;j <3;j++)
{
fscanf( fp, "%d",&BLOCK[i][j]);
}
node = new NODE ***[NBLOCK];
for( i=0;i <NBLOCK;i++)
{
node[i]= new NODE**[BLOCK[i][0]];
for(j=0;j <BLOCK[i][0];j++)
{
node[i][j]=new NODE*[BLOCK[i][1]];
for(k=0;k <BLOCK[i][j];k++)
{
node[i][j][k]=new NODE[BLOCK[i][2]];
}
}
}
for(i=0;i <NBLOCK;i++)
{
for(l=0;l <BLOCK[i][2];l++)
for(k=0;k <BLOCK[i][1];k++)
for(j=0;j <BLOCK[i][0];j++)
fscanf( fp, "%lf",&node[i][j][k][l].x);
for(l=0;l <BLOCK[i][2];l++)
for(k=0;k <BLOCK[i][1];k++)
for(j=0;j <BLOCK[i][0];j++)
fscanf( fp, "%lf",&node[i][j][k][l].y);
for(l=0;l <BLOCK[i][2];l++)
for(k=0;k <BLOCK[i][1];k++)
for(j=0;j <BLOCK[i][0];j++)
fscanf( fp, "%lf",&node[i][j][k][l].z);
}
fclose(fp);
cout < <"Read Grid successfully!!!" < <endl;
}
//Grid deal.cpp
#include "Global.h"
void Grid_DataDeal()
{
int i,j,k,l;
FILE *outfp;
char temp[500];
sprintf(temp,"Grid.dat");
outfp=fopen("output/temp","w");
fprintf(outfp,"%d\n",NBLOCK);
for(i=0;i <NBLOCK;i++)
fprintf(outfp,"%d\t%d\t%d\n",BLOCK[i][0],BLOCK[i][1],BLOCK[i][2]);
for(i=0;i <NBLOCK;i++)
{
for(l=0;l <BLOCK[i][2];l++)
for(k=0;k <BLOCK[i][1];k++)
for(j=0;j <BLOCK[i][0];j++)
fprintf( outfp, "%lf",&node[i][j][k][l].x);
for(l=0;l <BLOCK[i][2];l++)
for(k=0;k <BLOCK[i][1];k++)
for(j=0;j <BLOCK[i][0];j++)
fprintf( outfp, "%lf",&node[i][j][k][l].y);
for(l=0;l <BLOCK[i][2];l++)
for(k=0;k <BLOCK[i][1];k++)
for(j=0;j <BLOCK[i][0];j++)
fprintf( outfp, "%lf",&node[i][j][k][l].z);
}
fclose(outfp);
cout < <"Datadeal Grid successfully!" < <endl;
}
//main.cpp
#include "Global.h"
void main()
{
Grid_Read();
Grid_DataDeal();
}
编译时 出现如下错误
Linking...
main.obj : error LNK2001: unresolved external symbol "void __cdecl Grid_Read(void)" (?Grid_Read@@YAXXZ)
Debug/ISLBM.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.