okay here is the .h header file. at the end of main.h i have included the following file #include "import.h"
//#include "main.h"#ifndef IMPORT_H#define IMPORT_Hstruct RGB{ float r, g, b;};struct LAYER{ apstring Name, Class, Location, Filter; int Subno, Noise_level; float Amount, Angle, Blur, Blur_offset, Noise_amt, Noise_size, Noise_phase; POINT Offset, Tiling;};struct MATERIAL{ int Mat_ID; apstring Mat_name, Mat_file; RGB rgb_Ambient, rgb_Diffuse, rgb_Specular; float Transparency;};struct MESH{ int num_vertex, num_faces, num_t_vertex, //number of textured vertices mat_id; Vector3 vertex[3125]; //holds xyz values for vertices Vector3 face[3125]; //holds 3 values for triangle vertices Vector3 dir[3125]; //holds 3 values for winding polygon Vector3 fnormal[3125]; //holds 3 values for face normals Vector3 vnormal[3125]; //holds 3 values for vertex normals};#endif
and here are the errors i getting
--------------------Configuration: OpenGL Window - Win32 Release--------------------Compiling...main.cppG:\Adam\Software\Visual C++\OGL Window 2\main.cpp(87) : error C2065: 'Import' : undeclared identifierG:\Adam\Software\Visual C++\OGL Window 2\main.cpp(417) : error C2065: 'map' : undeclared identifierimport.cppG:\Adam\Software\Visual C++\OGL Window 2\import.h(12) : error C2146: syntax error : missing ';' before identifier 'Name'G:\Adam\Software\Visual C++\OGL Window 2\import.h(12) : error C2501: 'apstring' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(12) : error C2501: 'Name' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(13) : error C2501: 'Class' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(14) : error C2501: 'Location' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(15) : error C2501: 'Filter' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(25) : error C2146: syntax error : missing ';' before identifier 'Offset'G:\Adam\Software\Visual C++\OGL Window 2\import.h(25) : error C2501: 'POINT' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(25) : error C2501: 'Offset' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(26) : error C2501: 'Tiling' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(32) : error C2146: syntax error : missing ';' before identifier 'Mat_name'G:\Adam\Software\Visual C++\OGL Window 2\import.h(32) : error C2501: 'apstring' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(32) : error C2501: 'Mat_name' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(33) : error C2501: 'Mat_file' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(46) : error C2146: syntax error : missing ';' before identifier 'vertex'G:\Adam\Software\Visual C++\OGL Window 2\import.h(46) : error C2501: 'Vector3' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(46) : error C2501: 'vertex' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(47) : error C2146: syntax error : missing ';' before identifier 'face'G:\Adam\Software\Visual C++\OGL Window 2\import.h(47) : error C2501: 'Vector3' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(47) : error C2501: 'face' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(48) : error C2146: syntax error : missing ';' before identifier 'dir'G:\Adam\Software\Visual C++\OGL Window 2\import.h(48) : error C2501: 'Vector3' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(48) : error C2501: 'dir' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(49) : error C2146: syntax error : missing ';' before identifier 'fnormal'G:\Adam\Software\Visual C++\OGL Window 2\import.h(49) : error C2501: 'Vector3' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(49) : error C2501: 'fnormal' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(50) : error C2146: syntax error : missing ';' before identifier 'vnormal'G:\Adam\Software\Visual C++\OGL Window 2\import.h(50) : error C2501: 'Vector3' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.h(50) : error C2501: 'vnormal' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.cpp(6) : error C2146: syntax error : missing ';' before identifier 'map'G:\Adam\Software\Visual C++\OGL Window 2\import.cpp(6) : error C2501: 'GLuint' : missing storage-class or type specifiersG:\Adam\Software\Visual C++\OGL Window 2\import.cpp(6) : fatal error C1004: unexpected end of file foundError executing cl.exe.OpenGL Window.exe - 34 error(s), 0 warning(s)
now if you scroll through the errors the classes apstring, POINT, Vector3 (its basically a class that holds an x, y, and z value for vertices), and GLuint do not link during compile. in main.h i have included all of the source files i will need like windows.h and iostream.h etc. int, float, double and all of those basic data types WILL pass through. in case you are not familiar with apstring go to http://www.studio-ide.com/downloads/usingvc/AP.html. any ideas?
[edited by - adam17 on March 16, 2003 12:23:52 PM]