C++ Question Compiling tutorial

MJR

C++ developer in the mix
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 19, 2008
Messages
2,447
Reaction score
5
Points
0
Location
United States
I am following the Orbiter compling tutorial all the way up to the include paths part. Do I only include the C:\Program Files\Microsoft SDKs\Include, or do I add the Orbiter SDK too.
 
I am following the Orbiter compling tutorial all the way up to the include paths part. Do I only include the C:\Program Files\Microsoft SDKs\Include, or do I add the Orbiter SDK too.
That path and the Orbiter SDK Include folder should be the only ones needed.
 
You may also want to add the UMMU SDK if you're making a compatible vessel, and Orbitsound's SDK if you'll be doing much with custom sounds (other than simply replacing "stock" sounds like thrusters.
 
Thanks.

---------- Post added at 08:55 PM ---------- Previous post was at 08:25 PM ----------

I keep getting this.


1>------ Build started: Project: ShuttlePB, Configuration: Release Win32 ------
1>Compiling...
1>ShuttlePB.cpp
1>.\ShuttlePB.cpp(43) : error C2065: 'i' : undeclared identifier
1>.\ShuttlePB.cpp(43) : error C2065: 'i' : undeclared identifier
1>.\ShuttlePB.cpp(43) : error C2065: 'i' : undeclared identifier
1>Build log was saved at "file://c:\Documents and Settings\MICHAEL\My Documents\Orbiter folder\Orbitersdk\samples\ShuttlePB\Release\BuildLog.htm"
1>ShuttlePB - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I know that it refers to kernel32.lib user32.lib gdi32.lib, but I can't figure what I did wrong. I entered it in the Linker\Input\Additional Dependencies.
 
I know it is. If it were clear to me in the tutorial I wouldn't have posted here. I am sure that I did what it told me me to do. I entered both the Orbiter SDK\Include and Microsoft SDK\Include and the same goes for the lib. paths. I also entered exactly what was on the screen for the additional dependencies and etc.
 
Last edited:
Thank you. I will try it as soon as I can. How would I change the reference? Do I just delete the .h from fstream or is it more than that?
 
If you have the 060929 SDK (and you should have) that bit has already been fixed. You just need to fix the scope of int i.
 

I keep getting this.


1>------ Build started: Project: ShuttlePB, Configuration: Release Win32 ------
1>Compiling...
1>ShuttlePB.cpp
1>.\ShuttlePB.cpp(43) : error C2065: 'i' : undeclared identifier
1>.\ShuttlePB.cpp(43) : error C2065: 'i' : undeclared identifier
1>.\ShuttlePB.cpp(43) : error C2065: 'i' : undeclared identifier
1>Build log was saved at "file://c:\Documents and Settings\MICHAEL\My Documents\Orbiter folder\Orbitersdk\samples\ShuttlePB\Release\BuildLog.htm"
1>ShuttlePB - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I know that it refers to kernel32.lib user32.lib gdi32.lib, but I can't figure what I did wrong. I entered it in the Linker\Input\Additional Dependencies.
Go to line 43 of ShuttlePB.cpp. This is where the error is. There is a variable on that line (named 'i') that you are using that has not been initialised.

If you still don't understand what this means, I suggest you do some reading and perhaps get a Teach Yourself C++ book or read some online C++ tutorials as it's a lot easier to learn C++ in a basic way before trying to worry about Orbiter.
 
I'll get back to you guys with the results.

---------- Post added at 09:53 AM ---------- Previous post was at 09:42 AM ----------

1>------ Build started: Project: ShuttlePB, Configuration: Release Win32 ------
1>Compiling...
1>ShuttlePB.cpp
1>Linking...
1> Creating library .\..\..\..\Modules/ShuttlePB.lib and object .\..\..\..\Modules/ShuttlePB.exp
1>Embedding manifest...
1>Build log was saved at "file://c:\Program Files\Orbiter SDK\Orbitersdk\samples\ShuttlePB\Release\BuildLog.htm"
1>ShuttlePB - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Thanks. I got it under a day. Now I need to study the APIreference.


---------- Post added at 10:11 AM ---------- Previous post was at 09:53 AM ----------

I am starting on the basis of my project. Am I on the right track? I am using the PB as an example and where to start.




// AtlasICBM.cpp : Defines the exported functions for the DLL application.
//
#define STRICT
#define ORBITER_MODULE
#include"orbitersdk.h"
// ==============================================================
// Some vessel parameters
// ==============================================================
constdouble BOOSTER_FUELMASS = 850.0;
constdouble BOOSTER_ISP = 5e4;
constdouble BOOSTER_MAXMAINTH = 3e4;
constdouble BOOSTER_MAXHOVERTH = 0;
constdouble BOOSTER_MAXRCSTH = 2e2;
// Calculate lift coefficient [Cl] as a function of aoa (angle of attack) over -Pi ... Pi
// Implemented here as a piecewise linear function
double LiftCoeff (double aoa)
{
constint nlift = 9;
staticconstdouble AOA[nlift] = {-180*RAD,-60*RAD,-30*RAD,-1*RAD,15*RAD,20*RAD,25*RAD,60*RAD,180*RAD};
staticconstdouble CL[nlift] = { 0, 0, -0.1, 0, 0.2, 0.25, 0.2, 0, 0};
staticconstdouble SCL[nlift] = {(CL[1]-CL[0])/(AOA[1]-AOA[0]), (CL[2]-CL[1])/(AOA[2]-AOA[1]),
(CL[3]-CL[2])/(AOA[3]-AOA[2]), (CL[4]-CL[3])/(AOA[4]-AOA[3]),
(CL[5]-CL[4])/(AOA[5]-AOA[4]), (CL[6]-CL[5])/(AOA[6]-AOA[5]),
(CL[7]-CL[6])/(AOA[7]-AOA[6]), (CL[8]-CL[7])/(AOA[8]-AOA[7])};
for (int i = 0; i < nlift-1 && AOA[i+1] < aoa; i++);
return CL + (aoa-AOA)*SCL;
}
// ==============================================================
// BOOSTER class interface
// ==============================================================
class AtlasICBM: public VESSEL2 {
public:
AtlasICBM (OBJHANDLE hVessel, int flightmodel)
: VESSEL2 (hVessel, flightmodel) {}
void clbkSetClassCaps (FILEHANDLE cfg);
};
// ==============================================================
// Overloaded callback functions
// ==============================================================
// --------------------------------------------------------------
// Set the capabilities of the vessel class
// --------------------------------------------------------------
void BOOSTER::clbkSetClassCaps (FILEHANDLE cfg)
{
THRUSTER_HANDLE th_main, th_hover, th_rcs[14], th_group[4];
// physical specs
SetSize (3.05);
SetEmptyMass (8754.0);
SetCW (0.3, 0.3, 0.6, 0.9);
SetWingAspect (0.7);
SetWingEffectiveness (2.5);
SetCrossSections (_V(51.30,50.99,6.50));
SetRotDrag (_V(0.6,0.6,0.35));
if (GetFlightModel() >= 1) {
SetPitchMomentScale (1e-4);
SetBankMomentScale (1e-4);
}
SetPMI (_V(33.11,32.99,1.76));
SetTrimScale (0.05);
SetCameraOffset (_V(0,0.8,0));
SetLiftCoeffFunc (LiftCoeff);
SetTouchdownPoints (_V(0,-1.5,2), _V(-1,-1.5,-1.5), _V(1,-1.5,-1.5));
// propellant resources
PROPELLANT_HANDLE hpr = CreatePropellantResource (PB_FUELMASS);
// ***************** thruster definitions *******************
PARTICLESTREAMSPEC contrail_main = {
0, 5.0, 16, 200, 0.15, 1.0, 5, 3.0, PARTICLESTREAMSPEC::DIFFUSE,
PARTICLESTREAMSPEC::LVL_PSQRT, 0, 2,
PARTICLESTREAMSPEC::ATM_PLOG, 1e-4, 1
};
PARTICLESTREAMSPEC contrail_hover = {
0, 5.0, 8, 200, 0.15, 1.0, 5, 3.0, PARTICLESTREAMSPEC::DIFFUSE,
PARTICLESTREAMSPEC::LVL_PSQRT, 0, 2,
PARTICLESTREAMSPEC::ATM_PLOG, 1e-4, 1
};
PARTICLESTREAMSPEC exhaust_main = {
0, 2.0, 20, 200, 0.05, 0.1, 8, 1.0, PARTICLESTREAMSPEC::EMISSIVE,
PARTICLESTREAMSPEC::LVL_SQRT, 0, 1,
PARTICLESTREAMSPEC::ATM_PLOG, 1e-5, 0.1
};
PARTICLESTREAMSPEC exhaust_hover = {
0, 2.0, 10, 200, 0.05, 0.05, 8, 1.0, PARTICLESTREAMSPEC::EMISSIVE,
PARTICLESTREAMSPEC::LVL_SQRT, 0, 1,
PARTICLESTREAMSPEC::ATM_PLOG, 1e-5, 0.1
};

th_main = CreateThruster (_V(0,0,-4.35), _V(0,0,1), BOOSTER_MAXMAINTH, hpr, BOOSTER_ISP);
CreateThrusterGroup (&th_main, 1, THGROUP_MAIN);
AddExhaust (th_main, 8, 1, _V(0,0.3,-4.35), _V(0,0,-1));
th_hover = CreateThruster (_V(0,-1.5,0), _V(0,1,0), PB_MAXHOVERTH, hpr, PB_ISP);
CreateThrusterGroup (&th_hover, 1, THGROUP_HOVER);
AddExhaust (th_hover, 8, 1, _V(0,-1.5,1), _V(0,-1,0));
AddExhaust (th_hover, 8, 1, _V(0,-1.5,-1), _V(0,-1,0));
AddExhaustStream (th_hover, _V(0,-3, 1), &contrail_hover);
AddExhaustStream (th_hover, _V(0,-3,-1), &contrail_hover);
AddExhaustStream (th_main, _V(0,0.3,-10), &contrail_main);
AddExhaustStream (th_hover, _V(0,-2, 1), &exhaust_hover);
AddExhaustStream (th_hover, _V(0,-2,-1), &exhaust_hover);
AddExhaustStream (th_main, _V(0,0.3,-5), &exhaust_main);
th_rcs[ 0] = CreateThruster (_V( 1,0, 3), _V(0, 1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 1] = CreateThruster (_V( 1,0, 3), _V(0,-1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 2] = CreateThruster (_V(-1,0, 3), _V(0, 1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 3] = CreateThruster (_V(-1,0, 3), _V(0,-1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 4] = CreateThruster (_V( 1,0,-3), _V(0, 1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 5] = CreateThruster (_V( 1,0,-3), _V(0,-1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 6] = CreateThruster (_V(-1,0,-3), _V(0, 1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 7] = CreateThruster (_V(-1,0,-3), _V(0,-1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 8] = CreateThruster (_V( 1,0, 3), _V(-1,0,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 9] = CreateThruster (_V(-1,0, 3), _V( 1,0,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[10] = CreateThruster (_V( 1,0,-3), _V(-1,0,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[11] = CreateThruster (_V(-1,0,-3), _V( 1,0,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[12] = CreateThruster (_V( 0,0,-3), _V(0,0, 1), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[13] = CreateThruster (_V( 0,0, 3), _V(0,0,-1), PB_MAXRCSTH, hpr, PB_ISP);
th_group[0] = th_rcs[0];
th_group[1] = th_rcs[2];
th_group[2] = th_rcs[5];
th_group[3] = th_rcs[7];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_PITCHUP);
th_group[0] = th_rcs[1];
th_group[1] = th_rcs[3];
th_group[2] = th_rcs[4];
th_group[3] = th_rcs[6];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_PITCHDOWN);
th_group[0] = th_rcs[0];
th_group[1] = th_rcs[4];
th_group[2] = th_rcs[3];
th_group[3] = th_rcs[7];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_BANKLEFT);
th_group[0] = th_rcs[1];
th_group[1] = th_rcs[5];
th_group[2] = th_rcs[2];
th_group[3] = th_rcs[6];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_BANKRIGHT);
th_group[0] = th_rcs[0];
th_group[1] = th_rcs[4];
th_group[2] = th_rcs[2];
th_group[3] = th_rcs[6];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_UP);
th_group[0] = th_rcs[1];
th_group[1] = th_rcs[5];
th_group[2] = th_rcs[3];
th_group[3] = th_rcs[7];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_DOWN);
th_group[0] = th_rcs[8];
th_group[1] = th_rcs[11];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_YAWLEFT);
th_group[0] = th_rcs[9];
th_group[1] = th_rcs[10];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_YAWRIGHT);
th_group[0] = th_rcs[8];
th_group[1] = th_rcs[10];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_LEFT);
th_group[0] = th_rcs[9];
th_group[1] = th_rcs[11];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_RIGHT);
CreateThrusterGroup (th_rcs+12, 1, THGROUP_ATT_FORWARD);
CreateThrusterGroup (th_rcs+13, 1, THGROUP_ATT_BACK);
// visual specs
AddMesh ("AtlasICBM");
}


---------- Post added at 10:32 AM ---------- Previous post was at 10:11 AM ----------

I then compilied it and got this.



1>------ Build started: Project: AtlasICBM, Configuration: Debug Win32 ------
1>Compiling...
1>AtlasICBM.cpp
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(7) : warning C4627: '#include "orbitersdk.h"': skipped when looking for precompiled header use
1> Add directive to 'stdafx.h' or rebuild precompiled header
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(4) : warning C4603: 'STRICT' : macro is not defined or definition is different after precompiled header use
1> Add macro to precompiled header instead of defining here
1> c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(8) : use of precompiled header
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(5) : warning C4603: 'ORBITER_MODULE' : macro is not defined or definition is different after precompiled header use
1> Add macro to precompiled header instead of defining here
1> c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(8) : use of precompiled header
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(39) : error C2504: 'VESSEL2' : base class undefined
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(41) : error C2061: syntax error : identifier 'OBJHANDLE'
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(43) : error C2061: syntax error : identifier 'FILEHANDLE'
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(41) : error C2065: 'hVessel' : undeclared identifier
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(41) : error C2065: 'flightmodel' : undeclared identifier
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(41) : error C2614: 'AtlasICBM' : illegal member initialization: 'VESSEL2' is not a base or member
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(53) : error C2653: 'BOOSTER' : is not a class or namespace name
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(53) : error C2065: 'FILEHANDLE' : undeclared identifier
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(53) : error C2182: 'clbkSetClassCaps' : illegal use of type 'void'
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(53) : error C2059: syntax error : ')'
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(54) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(54) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : error C2065: 'OBJHANDLE' : undeclared identifier
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : error C2062: type 'int' unexpected
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : error C2059: syntax error : ')'
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(197) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(208) : fatal error C1004: unexpected end-of-file found
1>Build log was saved at "file://c:\Documents and Settings\ANA\My Documents\Visual Studio 2008\Projects\AtlasICBM\AtlasICBM\Debug\BuildLog.htm"
1>AtlasICBM - 21 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


---------- Post added at 01:49 PM ---------- Previous post was at 10:32 AM ----------

Can I get a little bit of help. I had like 40 something errors and narrowed it down to 21.
 
Last edited:
Try Project->... Properties->Configuration properties->C/C++->Precompiled Headers->Create/Use precompiled headers=Not using precompiled headers.
 
That helped a bunch. It narrowed it down to 9 errors.



1>------ Build started: Project: AtlasICBM, Configuration: Debug Win32 ------
1>Compiling...
1>AtlasICBM.cpp
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(53) : error C2653: 'BOOSTER' : is not a class or namespace name
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(53) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(54) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(54) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : warning C4091: '__declspec(dllexport)' : ignored on left of 'int' when no variable is declared
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(196) : error C2062: type 'int' unexpected
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(197) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\documents and settings\ana\my documents\visual studio 2008\projects\atlasicbm\atlasicbm\atlasicbm.cpp(208) : fatal error C1004: unexpected end-of-file found
1>Build log was saved at "file://c:\Documents and Settings\ANA\My Documents\Visual Studio 2008\Projects\AtlasICBM\AtlasICBM\Debug\BuildLog.htm"
1>AtlasICBM - 9 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
One more problem is obvious, the rest is not in the piece of file presented.

I'm sure it is within your understanding to find the first.
If not, it's no use to continue with C++ until it is.
 
Ha ha. I switched to release. Got this.


1>------ Build started: Project: AtlasICBM, Configuration: Release Win32 ------
1>Compiling...
1>AtlasICBM.cpp
1>.\AtlasICBM.cpp(7) : fatal error C1083: Cannot open include file: 'orbitersdk.h': No such file or directory
1>Build log was saved at "file://c:\Documents and Settings\ANA\My Documents\Visual Studio 2008\Projects\AtlasICBM\AtlasICBM\Release\BuildLog.htm"
1>AtlasICBM - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
Ha ha. I switched to release. Got this.


1>------ Build started: Project: AtlasICBM, Configuration: Release Win32 ------
1>Compiling...
1>AtlasICBM.cpp
1>.\AtlasICBM.cpp(7) : fatal error C1083: Cannot open include file: 'orbitersdk.h': No such file or directory
1>Build log was saved at "file://c:\Documents and Settings\ANA\My Documents\Visual Studio 2008\Projects\AtlasICBM\AtlasICBM\Release\BuildLog.htm"
1>AtlasICBM - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
If you switch to release, you will need to set up all of the folders and paths again that you set up for debug.

There is no reason to switch to release until you are ready to release the project.
 
Oh ok. Then I guess the 1 error was wrong. I later put the paths and libraries and got 5 errors. Most of these I fixed. It is just these that I do not know how to.


1>------ Build started: Project: AtlasICBM, Configuration: Release Win32 ------
1>Compiling...
1>AtlasICBM.cpp
1>.\AtlasICBM.cpp(52) : error C2447: '{' : missing function header (old-style formal list?)
1>.\AtlasICBM.cpp(208) : fatal error C1004: unexpected end-of-file found
1>Build log was saved at "file://c:\Documents and Settings\ANA\My Documents\Visual Studio 2008\Projects\AtlasICBM\AtlasICBM\Release\BuildLog.htm"
1>AtlasICBM - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


---------- Post added at 03:43 PM ---------- Previous post was at 02:50 PM ----------

Here is the cpp. code for the errors.

52.
{;AtlasICBM;clbkSetClassCaps(FILEHANDLE);cfg
{
THRUSTER_HANDLE th_main, th_hover, th_rcs[14], th_group[4];

208.
DLLCLBK void ovcExit (VESSEL *vessel)
(if (vessel) delete (AtlasICBM*)vessel)
 
52.
{;AtlasICBM;clbkSetClassCaps(FILEHANDLE);cfg
{
THRUSTER_HANDLE th_main, th_hover, th_rcs[14], th_group[4];

208.
DLLCLBK void ovcExit (VESSEL *vessel)
(if (vessel) delete (AtlasICBM*)vessel)

That is a total WTF.
Both things.
Either something was posted wrong, or you have no idea about C syntax.
 
Must be posted wrong. Let me repost it.

---------- Post added at 05:57 PM ---------- Previous post was at 05:55 PM ----------

Code:
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]
// AtlasICBM.cpp : Defines the exported functions for the DLL application.
//
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]#define[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] STRICT
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]#define[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ORBITER_MODULE
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]#include[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"orbitersdk.h"
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// ==============================================================
// Some vessel parameters
// ==============================================================
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]const[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] BOOSTER_FUELMASS = 850.0;
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]const[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] BOOSTER_ISP = 5e4;
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]const[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] BOOSTER_MAXMAINTH = 3e4;
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]const[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] BOOSTER_MAXHOVERTH = 0;
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]const[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] BOOSTER_MAXRCSTH = 2e2;
[/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// Calculate lift coefficient [Cl] as a function of aoa (angle of attack) over -Pi ... Pi
// Implemented here as a piecewise linear function
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] LiftCoeff ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] aoa)
{
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]const[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] nlift = 9;
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]const[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] AOA[nlift] = {-180,-60,-30,-1,15,20,25,60,180};
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]const[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] CL[nlift] = { 0, 0, -0.1, 0, 0.2, 0.25, 0.2, 0, 0};
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]const[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] SCL[nlift] = {(CL[1]-CL[0])/(AOA[1]-AOA[0]), (CL[2]-CL[1])/(AOA[2]-AOA[1]),
(CL[3]-CL[2])/(AOA[3]-AOA[2]), (CL[4]-CL[3])/(AOA[4]-AOA[3]),
(CL[5]-CL[4])/(AOA[5]-AOA[4]), (CL[6]-CL[5])/(AOA[6]-AOA[5]),
(CL[7]-CL[6])/(AOA[7]-AOA[6]), (CL[8]-CL[7])/(AOA[8]-AOA[7])};
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] i;
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]for[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (i = 0; i < nlift-1 && AOA[i+1] < aoa; i++);

[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] CL[i] + (aoa-AOA[i])*SCL[i];
}
[/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// ==============================================================
// AtlasICBM class interface
// ==============================================================
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]class[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] AtlasICBM: [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] VESSEL2 {
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:
AtlasICBM (OBJHANDLE hVessel, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] flightmodel)
: VESSEL2 (hVessel, flightmodel) {}
;[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] clbkSetClassCaps (FILEHANDLE cfg);
};
[/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// ==============================================================
// Overloaded callback functions
// ==============================================================
// --------------------------------------------------------------
// Set the capabilities of the vessel class
// --------------------------------------------------------------
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{;AtlasICBM;clbkSetClassCaps(FILEHANDLE);cfg
{
THRUSTER_HANDLE th_main, th_hover, th_rcs[14], th_group[4];
[/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// physical specs
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]SetSize (3.05);
SetEmptyMass (8754.0);
SetCW (0.3, 0.3, 0.6, 0.9);
SetWingAspect (0.7);
SetWingEffectiveness (2.5);
SetCrossSections (_V(51.30,50.99,6.50));
SetRotDrag (_V(0.6,0.6,0.35));
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (GetFlightModel() >= 1) {
SetPitchMomentScale (1e-4);
SetBankMomentScale (1e-4);
}
SetPMI (_V(33.11,32.99,1.76));
SetTrimScale (0.05);
SetCameraOffset (_V(0,0.8,0));
SetLiftCoeffFunc (LiftCoeff);
SetTouchdownPoints (_V(0,-1.5,2), _V(-1,-1.5,-1.5), _V(1,-1.5,-1.5));
[/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// propellant resources
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]PROPELLANT_HANDLE hpr = CreatePropellantResource (PB_FUELMASS);
[/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// ***************** thruster definitions *******************
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]PARTICLESTREAMSPEC contrail_main = {
0, 5.0, 16, 200, 0.15, 1.0, 5, 3.0, PARTICLESTREAMSPEC::DIFFUSE,
PARTICLESTREAMSPEC::LVL_PSQRT, 0, 2,
PARTICLESTREAMSPEC::ATM_PLOG, 1e-4, 1
};
PARTICLESTREAMSPEC contrail_hover = {
0, 5.0, 8, 200, 0.15, 1.0, 5, 3.0, PARTICLESTREAMSPEC::DIFFUSE,
PARTICLESTREAMSPEC::LVL_PSQRT, 0, 2,
PARTICLESTREAMSPEC::ATM_PLOG, 1e-4, 1
};
PARTICLESTREAMSPEC exhaust_main = {
0, 2.0, 20, 200, 0.05, 0.1, 8, 1.0, PARTICLESTREAMSPEC::EMISSIVE,
PARTICLESTREAMSPEC::LVL_SQRT, 0, 1,
PARTICLESTREAMSPEC::ATM_PLOG, 1e-5, 0.1
};
PARTICLESTREAMSPEC exhaust_hover = {
0, 2.0, 10, 200, 0.05, 0.05, 8, 1.0, PARTICLESTREAMSPEC::EMISSIVE,
PARTICLESTREAMSPEC::LVL_SQRT, 0, 1,
PARTICLESTREAMSPEC::ATM_PLOG, 1e-5, 0.1
};

th_main = CreateThruster (_V(0,0,-4.35), _V(0,0,1), BOOSTER_MAXMAINTH, hpr, BOOSTER_ISP);
CreateThrusterGroup (&th_main, 1, THGROUP_MAIN);
AddExhaust (th_main, 8, 1, _V(0,0.3,-4.35), _V(0,0,-1));
th_hover = CreateThruster (_V(0,-1.5,0), _V(0,1,0), PB_MAXHOVERTH, hpr, PB_ISP);
CreateThrusterGroup (&th_hover, 1, THGROUP_HOVER);
AddExhaust (th_hover, 8, 1, _V(0,-1.5,1), _V(0,-1,0));
AddExhaust (th_hover, 8, 1, _V(0,-1.5,-1), _V(0,-1,0));
AddExhaustStream (th_hover, _V(0,-3, 1), &contrail_hover);
AddExhaustStream (th_hover, _V(0,-3,-1), &contrail_hover);
AddExhaustStream (th_main, _V(0,0.3,-10), &contrail_main);
AddExhaustStream (th_hover, _V(0,-2, 1), &exhaust_hover);
AddExhaustStream (th_hover, _V(0,-2,-1), &exhaust_hover);
AddExhaustStream (th_main, _V(0,0.3,-5), &exhaust_main);
th_rcs[ 0] = CreateThruster (_V( 1,0, 3), _V(0, 1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 1] = CreateThruster (_V( 1,0, 3), _V(0,-1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 2] = CreateThruster (_V(-1,0, 3), _V(0, 1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 3] = CreateThruster (_V(-1,0, 3), _V(0,-1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 4] = CreateThruster (_V( 1,0,-3), _V(0, 1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 5] = CreateThruster (_V( 1,0,-3), _V(0,-1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 6] = CreateThruster (_V(-1,0,-3), _V(0, 1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 7] = CreateThruster (_V(-1,0,-3), _V(0,-1,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 8] = CreateThruster (_V( 1,0, 3), _V(-1,0,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[ 9] = CreateThruster (_V(-1,0, 3), _V( 1,0,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[10] = CreateThruster (_V( 1,0,-3), _V(-1,0,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[11] = CreateThruster (_V(-1,0,-3), _V( 1,0,0), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[12] = CreateThruster (_V( 0,0,-3), _V(0,0, 1), PB_MAXRCSTH, hpr, PB_ISP);
th_rcs[13] = CreateThruster (_V( 0,0, 3), _V(0,0,-1), PB_MAXRCSTH, hpr, PB_ISP);
th_group[0] = th_rcs[0];
th_group[1] = th_rcs[2];
th_group[2] = th_rcs[5];
th_group[3] = th_rcs[7];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_PITCHUP);
th_group[0] = th_rcs[1];
th_group[1] = th_rcs[3];
th_group[2] = th_rcs[4];
th_group[3] = th_rcs[6];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_PITCHDOWN);
th_group[0] = th_rcs[0];
th_group[1] = th_rcs[4];
th_group[2] = th_rcs[3];
th_group[3] = th_rcs[7];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_BANKLEFT);
th_group[0] = th_rcs[1];
th_group[1] = th_rcs[5];
th_group[2] = th_rcs[2];
th_group[3] = th_rcs[6];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_BANKRIGHT);
th_group[0] = th_rcs[0];
th_group[1] = th_rcs[4];
th_group[2] = th_rcs[2];
th_group[3] = th_rcs[6];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_UP);
th_group[0] = th_rcs[1];
th_group[1] = th_rcs[5];
th_group[2] = th_rcs[3];
th_group[3] = th_rcs[7];
CreateThrusterGroup (th_group, 4, THGROUP_ATT_DOWN);
th_group[0] = th_rcs[8];
th_group[1] = th_rcs[11];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_YAWLEFT);
th_group[0] = th_rcs[9];
th_group[1] = th_rcs[10];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_YAWRIGHT);
th_group[0] = th_rcs[8];
th_group[1] = th_rcs[10];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_LEFT);
th_group[0] = th_rcs[9];
th_group[1] = th_rcs[11];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_RIGHT);
CreateThrusterGroup (th_rcs+12, 1, THGROUP_ATT_FORWARD);
CreateThrusterGroup (th_rcs+13, 1, THGROUP_ATT_BACK);
[/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// visual specs
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]AddMesh ([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"AtlasICBM"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
}
[/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// ==============================================================
// API callback interface
// ==============================================================
// --------------------------------------------------------------
// Vessel initialisation
// --------------------------------------------------------------
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];{DLLCLBK ;VESSEL ;*ovcInit (OBJHANDLE);hvessel, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] flightmodel
;{
;{ [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] BOOSTER ;(hvessel, flightmodel);
}
[/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// --------------------------------------------------------------
// Vessel cleanup
// --------------------------------------------------------------
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]DLLCLBK [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ovcExit (VESSEL *vessel)
{
([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (vessel) [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]delete[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (AtlasICBM*)vessel)
[/SIZE]
 
These are nonsense, as far as C++ syntax is concerned:
Code:
{;AtlasICBM;clbkSetClassCaps(FILEHANDLE);cfg

;{DLLCLBK ;VESSEL ;*ovcInit (OBJHANDLE);hvessel, int flightmodel
;{
;{ returnnew BOOSTER ;(hvessel, flightmodel);
I can't even see how you arrived at that since it bears no resemblance (syntax-wise) to anything else in the file. I strongly recommend learning about basic C++ syntax before proceeding.
http://www.learncpp.com/
http://www.cplusplus.com/doc/tutorial/
 
Back
Top