C++ Question Codeing Help

n72.75

Seize the means of computation
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,872
Reaction score
1,714
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
I am sorry if this is a bit much to look at, but can someone help me with some codeing problems that i am having.

This is what I've got:
Code:
#define STRICT
#define ORBITER_MODULE
#include "Orbitersdk.h"

class salyut6: public VESSEL2{
public:
salyut6 (OBJHANDLE hVessel, int flightmodel)
:VESSEL2 (hVessel, flightmodel) {}
void clbkSetClassCaps (FILEHANDLE cfg);
};

void salyut6::clbkSetClassCaps (FILEHANDLE cfg)
{
	SetSize (18);
	SetEmptyMass (18624);
	SetCW (0.09,1.0,1.8,1.8);
	SetWingAspect (0.5);
	SetWingEffectiveness (0);
	SetCrossSections (_V(10.5,15.0,5.8));
	SetRotDrag (_V(0.6,0.6,0.35));
	SetPMI (_V(131.19,156.2,31.43));
	SetTrimScale (0.05);
	SetCameraOffset (_V(0,0,0));
	SetDockParams (_V(0,0,-20.5), _V(0,0,-1), _V(0,0,-1));
	SetTouchdownPoints (_V(0,0,0),_V(0,0,0),_V(0,0,0));
	const double FUELMASS = 1200;
	const double ISP = 6000;
	const double MAXMAINTH = 3000;
	const double MAXRCSTH = 4000;
	PROPELLANT_HANDLE tank;
	tank = CreatePropellantResource (FUELMASS);
	THRUSTER_HANDLE th_main[2],th_rcs[40],th_group[8];
	th_main = CreateThruster (_V(0,0,-20.5), _V(0,0,1), MAXMAINTH, tank,ISP);
	CreateThrusterGroup (&th_main,1,THGROUP_MAIN);
	AddExhaust (th_main,8,1,_V(-1.34,0.9,-6.4),_V(0,0,-1));
	AddExhaust (th_main,8,1,_V(1.34,-0.9,-6.4),_V(0,0,-1));
	th_rcs[0] = CreateThruster (_V(0, -2.1, -5.9),(_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[1] = CreateThruster (_V(0, -2.1, -6.02),(_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[2] = CreateThruster (_V(0.1, -2.1, -5.9),(_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[3] = CreateThruster (_V(0.1, -2.1, -6.02),(_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[4] = CreateThruster (_V(-0.1, -2.1, -5.9),(_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[5] = CreateThruster (_V(-0.1, -2.1, -6.02),(_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[6] = CreateThruster (_V(0, 2.1, -5.9),(_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[7] = CreateThruster (_V(0, 2.1, -6.02),(_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[8] = CreateThruster (_V(-0.1, 2.1, -5.9),(_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[9] = CreateThruster (_V(-0.1, 2.1, -6.02),(_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[10] = CreateThruster (_V(0.1, 2.1, -5.9),(_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[11] = CreateThruster (_V(0.1, 2.1, -6.02),(_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[12] = CreateThruster (_V(-2.1, 0, -5.9),(_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[13] = CreateThruster (_V(-2.1, 0, -6.02),(_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[14] = CreateThruster (_V(-2.1, 0.1, -5.9),(_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[15] = CreateThruster (_V(-2.1, 0.1, -6.02),(_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[16] = CreateThruster (_V(-2.1, -0.1, -5.9),(_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[17] = CreateThruster (_V(-2.1, -0.1, -6.02),(_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[18] = CreateThruster (_V(2.1, 0, -5.9),(_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[19] = CreateThruster (_V(2.1, 0, -6.02),(_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[20] = CreateThruster (_V(2.1, 0.1, -5.9),(_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[21] = CreateThruster (_V(2.1, 0.1, -6.02),(_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[22] = CreateThruster (_V(2.1, -0.1, -5.9),(_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[23] = CreateThruster (_V(2.1, -0.1, -6.02),(_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[24] = CreateThruster (_V(-0.13, 2.21, -5.62),(_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[25] = CreateThruster (_V(-0.13, 2.21, -5.73),(_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[26] = CreateThruster (_V(-0.22, 2.16, -5.62),(_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[27] = CreateThruster (_V(-0.22, 2.16, -5.73),(_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[28] = CreateThruster (_V(0.13, 2.21, -5.62),(_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[29] = CreateThruster (_V(0.13, 2.21, -5.73),(_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[30] = CreateThruster (_V(0.22, 2.16, -5.62),(_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[31] = CreateThruster (_V(0.22, 2.16, -5.73),(_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[32] = CreateThruster (_V(-0.13, -2.21, -5.62),(_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[33] = CreateThruster (_V(-0.13, -2.21, -5.73),(_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[34] = CreateThruster (_V(-0.22, -2.16, -5.62),(_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[35] = CreateThruster (_V(-0.22, -2.16, -5.73),(_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[36] = CreateThruster (_V(0.13, -2.21, -5.62),(_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[37] = CreateThruster (_V(0.13, -2.21, -5.73),(_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[38] = CreateThruster (_V(0.22, -2.16, -5.62),(_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[39] = CreateThruster (_V(0.22, -2.16, -5.73),(_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_group[0] = th_rcs[0];
	th_group[1] = th_rcs[1];
	th_group[2] = th_rcs[2];
	th_group[3] = th_rcs[3];
	th_group[4] = th_rcs[4];
	th_group[5] = th_rcs[5];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_PITCHDOWN);
	th_group[0] = th_rcs[6];
	th_group[1] = th_rcs[7];
	th_group[2] = th_rcs[8];
	th_group[3] = th_rcs[9];
	th_group[4] = th_rcs[10];
	th_group[5] = th_rcs[11];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_PITCHUP);
	th_group[0] = th_rcs[12];
	th_group[1] = th_rcs[13];
	th_group[2] = th_rcs[14];
	th_group[3] = th_rcs[15];
	th_group[4] = th_rcs[16];
	th_group[5] = th_rcs[17];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_YAWLEFT);
	th_group[0] = th_rcs[18];
	th_group[1] = th_rcs[19];
	th_group[2] = th_rcs[20];
	th_group[3] = th_rcs[21];
	th_group[4] = th_rcs[22];
	th_group[5] = th_rcs[23];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_YAWRIGHT);
	th_group[0] = th_rcs[24];
	th_group[1] = th_rcs[25];
	th_group[2] = th_rcs[26];
	th_group[3] = th_rcs[27];
	th_group[4] = th_rcs[28];
	th_group[5] = th_rcs[29];
	th_group[6] = th_rcs[30];
	th_group[7] = th_rcs[31];
	CreateThrusterGroup (th_group,8,8THGROUP_ATT_BANKLEFT);
	th_group[0] = th_rcs[32];
	th_group[1] = th_rcs[33];
	th_group[2] = th_rcs[34];
	th_group[3] = th_rcs[35];
	th_group[4] = th_rcs[36];
	th_group[5] = th_rcs[37];
	th_group[6] = th_rcs[38];
	th_group[7] = th_rcs[39];
	CreateThrusterGroup (th_group,8,8THGROUP_ATT_BANKRIGHT);
	AddMesh("salyut6");
}

DLLCLBK VESSEL *ovcInit (OBJHANDEL hvessel, int flightmodel)
{
	return new salyut6 (hvessel, flightmodel);
}

DLLCLBL void ovcExit (VESSEL *vessel)
{
	if (vessel) deleat (salyut6*) vessel;
}


And this is what it tells me:
Code:
1>------ Build started: Project: Salyut6, Configuration: Debug Win32 ------
1>Compiling...
1>Main.cpp
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(33) : error C2440: '=' : cannot convert from 'THRUSTER_HANDLE' to 'THRUSTER_HANDLE [2]'
1>        There are no conversions to array types, although there are conversions to references or pointers to arrays
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(34) : error C2664: 'VESSEL::CreateThrusterGroup' : cannot convert parameter 1 from 'THRUSTER_HANDLE (*)[2]' to 'THRUSTER_HANDLE *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(37) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(37) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(38) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(38) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(39) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(39) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(40) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(40) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(41) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(41) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(42) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(42) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(43) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(43) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(44) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(44) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(45) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(45) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(46) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(46) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(47) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(47) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(48) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(48) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(49) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(49) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(50) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(50) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(51) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(51) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(52) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(52) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(53) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(53) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(54) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(54) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(55) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(55) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(56) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(56) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(57) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(57) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(58) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(58) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(59) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(59) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(60) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(60) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(61) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(61) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(62) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(62) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(63) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(63) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(64) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(64) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(65) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(65) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(66) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(66) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(67) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(67) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(68) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(68) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(69) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(69) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(70) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(70) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(71) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(71) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(72) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(72) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(73) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(73) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(74) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(74) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(75) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(75) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(76) : error C2143: syntax error : missing ')' before ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(76) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(113) : error C2059: syntax error : 'bad suffix on number'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(113) : error C2146: syntax error : missing ')' before identifier 'THGROUP_ATT_BANKLEFT'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(113) : error C2664: 'VESSEL::CreateThrusterGroup' : cannot convert parameter 3 from 'int' to 'THGROUP_TYPE'
1>        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(113) : error C2059: syntax error : ')'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(122) : error C2059: syntax error : 'bad suffix on number'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(122) : error C2146: syntax error : missing ')' before identifier 'THGROUP_ATT_BANKRIGHT'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(122) : error C2664: 'VESSEL::CreateThrusterGroup' : cannot convert parameter 3 from 'int' to 'THGROUP_TYPE'
1>        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(122) : error C2059: syntax error : ')'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(126) : error C2065: 'OBJHANDEL' : undeclared identifier
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(126) : error C2146: syntax error : missing ')' before identifier 'hvessel'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(126) : error C2059: syntax error : ')'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(127) : error C2143: syntax error : missing ';' before '{'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(127) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(131) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(131) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\main.cpp(133) : error C2059: syntax error : ')'
1>Build log was saved at "file://c:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Salyut6\Debug\BuildLog.htm"
1>Salyut6 - 98 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I just need to get my C++ training weals off ,then I will be alright
 
You have a "(" too much in the lines you copy and pasted.

And in CreateThrusterGroup, you need to use "&th_main", as you have no array of thrusters.
 
Also, you need to change your declaration of th_main (you only have one thruster so you don't need any array to hold the handles):
Code:
THRUSTER_HANDLE th_main[COLOR=Red][B][2][/B][/COLOR],th_rcs[40],th_group[8];
All your CreateThruster function calls for RCS have one too many '(', just before the position vector:
th_rcs[0] = CreateThruster (_V(0, -2.1, -5.9),(_V(0, -1, 0),MAXRCSTH,tank,ISP);
So, just delete the bits I have highlighted in red.
 
I still think tyring to figure out how to code by making Orbiter addons is a bad idea. Make win console programs to get a feel for how c++ operates first.
 
I have resolved some of the problems, now i am only down to 21 errors.
My major problem is still how to fix the main thrusters, I want two.

take a look at my new code:
Code:
#define STRICT
#define ORBITER_MODULE
#include "Orbitersdk.h"

class salyut6: public VESSEL2{
public:
salyut6 (OBJHANDLE hVessel, int flightmodel)
:VESSEL2 (hVessel, flightmodel) {}
void clbkSetClassCaps (FILEHANDLE cfg);
};

void salyut6::clbkSetClassCaps (FILEHANDLE cfg)
{
	SetSize (18);
	SetEmptyMass (18624);
	SetCW (0.09,1.0,1.8,1.8);
	SetWingAspect (0.5);
	SetWingEffectiveness (0);
	SetCrossSections (_V(10.5,15.0,5.8));
	SetRotDrag (_V(0.6,0.6,0.35));
	SetPMI (_V(131.19,156.2,31.43));
	SetTrimScale (0.05);
	SetCameraOffset (_V(0,0,0));
	SetDockParams (_V(0,0,-20.5), _V(0,0,-1), _V(0,0,-1));
	SetTouchdownPoints (_V(0,0,0),_V(0,0,0),_V(0,0,0));
	const double FUELMASS = 1200;
	const double ISP = 6000;
	const double MAXMAINTH = 3000;
	const double MAXRCSTH = 4000;
	PROPELLANT_HANDLE tank;
	tank = CreatePropellantResource (FUELMASS);
	THRUSTER_HANDLE th_main[2],th_rcs[40],th_group[8];
	th_main[0] = CreateThruster (_V(-1.34,0.9,-6.4),_V(0,0,-1)), MAXMAINTH, tank,ISP);
	th_main[1] = CreateThruster (_V(1.34,-0.9,-6.4),_V(0,0,-1)), MAXMAINTH, tank,ISP);
	CreateThrusterGroup (&th_main,1,THGROUP_MAIN);
	AddExhaust (th_main,8,1,_V(-1.34,0.9,-6.4),_V(0,0,-1));
	AddExhaust (th_main,8,1,_V(1.34,-0.9,-6.4),_V(0,0,-1));
	th_rcs[0] = CreateThruster (_V(0, -2.1, -5.9),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[1] = CreateThruster (_V(0, -2.1, -6.02),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[2] = CreateThruster (_V(0.1, -2.1, -5.9),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[3] = CreateThruster (_V(0.1, -2.1, -6.02),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[4] = CreateThruster (_V(-0.1, -2.1, -5.9),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[5] = CreateThruster (_V(-0.1, -2.1, -6.02),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[6] = CreateThruster (_V(0, 2.1, -5.9),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[7] = CreateThruster (_V(0, 2.1, -6.02),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[8] = CreateThruster (_V(-0.1, 2.1, -5.9),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[9] = CreateThruster (_V(-0.1, 2.1, -6.02),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[10] = CreateThruster (_V(0.1, 2.1, -5.9),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[11] = CreateThruster (_V(0.1, 2.1, -6.02),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[12] = CreateThruster (_V(-2.1, 0, -5.9),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[13] = CreateThruster (_V(-2.1, 0, -6.02),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[14] = CreateThruster (_V(-2.1, 0.1, -5.9),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[15] = CreateThruster (_V(-2.1, 0.1, -6.02),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[16] = CreateThruster (_V(-2.1, -0.1, -5.9),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[17] = CreateThruster (_V(-2.1, -0.1, -6.02),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[18] = CreateThruster (_V(2.1, 0, -5.9),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[19] = CreateThruster (_V(2.1, 0, -6.02),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[20] = CreateThruster (_V(2.1, 0.1, -5.9),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[21] = CreateThruster (_V(2.1, 0.1, -6.02),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[22] = CreateThruster (_V(2.1, -0.1, -5.9),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[23] = CreateThruster (_V(2.1, -0.1, -6.02),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[24] = CreateThruster (_V(-0.13, 2.21, -5.62),_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[25] = CreateThruster (_V(-0.13, 2.21, -5.73),_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[26] = CreateThruster (_V(-0.22, 2.16, -5.62),_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[27] = CreateThruster (_V(-0.22, 2.16, -5.73),_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[28] = CreateThruster (_V(0.13, 2.21, -5.62),_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[29] = CreateThruster (_V(0.13, 2.21, -5.73),_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[30] = CreateThruster (_V(0.22, 2.16, -5.62),_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[31] = CreateThruster (_V(0.22, 2.16, -5.73),_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[32] = CreateThruster (_V(-0.13, -2.21, -5.62),_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[33] = CreateThruster (_V(-0.13, -2.21, -5.73),_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[34] = CreateThruster (_V(-0.22, -2.16, -5.62),_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[35] = CreateThruster (_V(-0.22, -2.16, -5.73),_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[36] = CreateThruster (_V(0.13, -2.21, -5.62),_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[37] = CreateThruster (_V(0.13, -2.21, -5.73),_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[38] = CreateThruster (_V(0.22, -2.16, -5.62),_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[39] = CreateThruster (_V(0.22, -2.16, -5.73),_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_group[0] = th_rcs[0];
	th_group[1] = th_rcs[1];
	th_group[2] = th_rcs[2];
	th_group[3] = th_rcs[3];
	th_group[4] = th_rcs[4];
	th_group[5] = th_rcs[5];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_PITCHDOWN);
	th_group[0] = th_rcs[6];
	th_group[1] = th_rcs[7];
	th_group[2] = th_rcs[8];
	th_group[3] = th_rcs[9];
	th_group[4] = th_rcs[10];
	th_group[5] = th_rcs[11];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_PITCHUP);
	th_group[0] = th_rcs[12];
	th_group[1] = th_rcs[13];
	th_group[2] = th_rcs[14];
	th_group[3] = th_rcs[15];
	th_group[4] = th_rcs[16];
	th_group[5] = th_rcs[17];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_YAWLEFT);
	th_group[0] = th_rcs[18];
	th_group[1] = th_rcs[19];
	th_group[2] = th_rcs[20];
	th_group[3] = th_rcs[21];
	th_group[4] = th_rcs[22];
	th_group[5] = th_rcs[23];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_YAWRIGHT);
	th_group[0] = th_rcs[24];
	th_group[1] = th_rcs[25];
	th_group[2] = th_rcs[26];
	th_group[3] = th_rcs[27];
	th_group[4] = th_rcs[28];
	th_group[5] = th_rcs[29];
	th_group[6] = th_rcs[30];
	th_group[7] = th_rcs[31];
	CreateThrusterGroup (th_group,8,8THGROUP_ATT_BANKLEFT);
	th_group[0] = th_rcs[32];
	th_group[1] = th_rcs[33];
	th_group[2] = th_rcs[34];
	th_group[3] = th_rcs[35];
	th_group[4] = th_rcs[36];
	th_group[5] = th_rcs[37];
	th_group[6] = th_rcs[38];
	th_group[7] = th_rcs[39];
	CreateThrusterGroup (th_group,8,8THGROUP_ATT_BANKRIGHT);
	AddMesh("salyut6");
}

DLLCLBK VESSEL *ovcInit (OBJHANDEL hvessel, int flightmodel)
{
	return new salyut6 (hvessel, flightmodel);
}

DLLCLBL void ovcExit (VESSEL *vessel)
{
	if (vessel) deleat (salyut6*) vessel;
}

And the error report:
Code:
1>------ Build started: Project: Salyut6, Configuration: Debug Win32 ------
1>Compiling...
1>salyut6.cpp
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(33) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(33) : error C2059: syntax error : ')'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(34) : error C2660: 'VESSEL::CreateThruster' : function does not take 2 arguments
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(34) : error C2059: syntax error : ')'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(35) : error C2664: 'VESSEL::CreateThrusterGroup' : cannot convert parameter 1 from 'THRUSTER_HANDLE (*)[2]' to 'THRUSTER_HANDLE *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(114) : error C2059: syntax error : 'bad suffix on number'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(114) : error C2146: syntax error : missing ')' before identifier 'THGROUP_ATT_BANKLEFT'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(114) : error C2664: 'VESSEL::CreateThrusterGroup' : cannot convert parameter 3 from 'int' to 'THGROUP_TYPE'
1>        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(114) : error C2059: syntax error : ')'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(123) : error C2059: syntax error : 'bad suffix on number'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(123) : error C2146: syntax error : missing ')' before identifier 'THGROUP_ATT_BANKRIGHT'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(123) : error C2664: 'VESSEL::CreateThrusterGroup' : cannot convert parameter 3 from 'int' to 'THGROUP_TYPE'
1>        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(123) : error C2059: syntax error : ')'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(127) : error C2065: 'OBJHANDEL' : undeclared identifier
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(127) : error C2146: syntax error : missing ')' before identifier 'hvessel'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(127) : error C2059: syntax error : ')'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(128) : error C2143: syntax error : missing ';' before '{'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(128) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(132) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(132) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\matthew\documents\visual studio 2008\projects\salyut6\salyut6\salyut6.cpp(134) : error C2059: syntax error : ')'
1>Build log was saved at "file://c:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Salyut6\Debug\BuildLog.htm"
1>Salyut6 - 21 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

And thanks for the help so far guys, I really appreaciate it.

-Matt
 
I still think tyring to figure out how to code by making Orbiter addons is a bad idea. Make win console programs to get a feel for how c++ operates first.
OK, we are going a little OT here, but I couldn't help but respond...

I have published* three addons in the last 18 months or so (two new and one upgrade) all without having touched C++ or any other object oriented programming before I started. Understanding object oriented principles was quite important in my learning, but I sure didn't need console apps to learn that. Some good books and tutorials helped but, more than anything, reading and understanding other similar code is what you need, IMHO.

Related to this thread: reading and understanding your compiler's error messages/warnings helps too ;)

* There are others unpublished too...

---------- Post added at 11:14 ---------- Previous post was at 11:06 ----------

I have resolved some of the problems, now i am only down to 21 errors.
My major problem is still how to fix the main thrusters, I want two.

take a look at my new code:
This is OK:
Code:
    THRUSTER_HANDLE th_main[2],th_rcs[40],th_group[8];
You have too many parentheses on these lines (delete the ones highlighted in red):
Code:
    th_main[0] = CreateThruster (_V(-1.34,0.9,-6.4),_V(0,0,-1)[B][COLOR=Red])[/COLOR][/B], MAXMAINTH, tank,ISP);
    th_main[1] = CreateThruster (_V(1.34,-0.9,-6.4),_V(0,0,-1)[COLOR=Red][B])[/B][/COLOR], MAXMAINTH, tank,ISP);
Make these changes (in red):
Code:
    CreateThrusterGroup ([B][COLOR=Red]th_main,2[/COLOR][/B],THGROUP_MAIN);
Do you understand the "&" and "*" operators and how pointers and arrays are related in C/C++?
 
I commend you tblaxland but I still stand by that it is a really tough way to start. The proper way to learn to play an instrument, for example, is not starting with the Beatles. It's to build your way up with simplier tunes to get the feel for it. Although people do pick up a guitar and try for the stars to start and succeed, it's not the best way for the majority to learn.
 
Code:
Do you understand the "&" and "*" operators and how pointers and arrays are related in C/C++?
Not really, is it easily explainable or should I look for a resource that explains it.
Code:
THRUSTER_HANDLE th_main[2],th_rcs[40],th_group[8];
th_main[0]= CreateThruster (_V(-1.34,0.9,-6.4),_V(0,0,-1),MAXMAINTH,tank,ISP;
th_main[1]= CreateThruster (_V(1.34,-0.9,-6.4),_V(0,0,-1),MAXMAINTH,tank,ISP;
CreateThrusterGroup (th_group,2,THGROUP_MAIN);
My thinking was that Main Thrusters were created and grouped in a similar was as RCS Thrusters, apparently not.

I commend you tblaxland but I still stand by that it is a really tough way to start. The proper way to learn to play an instrument, for example, is not starting with the Beatles. It's to build your way up with simplier tunes to get the feel for it. Although people do pick up a guitar and try for the stars to start and succeed, it's not the best way for the majority to learn.

I find that this is an easer way for me to learn, just keep trying until I get it right. I have created some console programs in the past.

Okay forget everything above, i am leaveing it there just for clarity.


My problem was just parenthese location. i still need to learn about the
"&" and "*" operators and how pointers and arrays are related in C/C++

now my only problem is:
Code:
#define STRICT
#define ORBITER_MODULE
#include "Orbitersdk.h"

class salyut6: public VESSEL2{
public:
salyut6 (OBJHANDLE hVessel, int flightmodel)
:VESSEL2 (hVessel, flightmodel) {}
void clbkSetClassCaps (FILEHANDLE cfg);
};

void salyut6::clbkSetClassCaps (FILEHANDLE cfg)
{
	SetSize (18);
	SetEmptyMass (18624);
	SetCW (0.09,1.0,1.8,1.8);
	SetWingAspect (0.5);
	SetWingEffectiveness (0);
	SetCrossSections (_V(10.5,15.0,5.8));
	SetRotDrag (_V(0.6,0.6,0.35));
	SetPMI (_V(131.19,156.2,31.43));
	SetTrimScale (0.05);
	SetCameraOffset (_V(0,0,0));
	SetDockParams (_V(0,0,-20.5), _V(0,0,-1), _V(0,0,-1));
	SetTouchdownPoints (_V(0,0,0),_V(0,0,0),_V(0,0,0));
	const double FUELMASS = 1200;
	const double ISP = 6000;
	const double MAXMAINTH = 3000;
	const double MAXRCSTH = 4000;
	PROPELLANT_HANDLE tank;
	tank = CreatePropellantResource (FUELMASS);
	THRUSTER_HANDLE th_main[2],th_rcs[40],th_group[8];
	th_main[0]= CreateThruster (_V(1.34,-0.9,-6.4),_V(0,0,-1),MAXMAINTH,tank,ISP);
	th_main[1]= CreateThruster (_V(-1.34,0.9,-6.4),_V(0,0,-1),MAXMAINTH,tank,ISP);
	CreateThrusterGroup (th_group,2,THGROUP_MAIN);
	th_rcs[0] = CreateThruster (_V(0, -2.1, -5.9),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[1] = CreateThruster (_V(0, -2.1, -6.02),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[2] = CreateThruster (_V(0.1, -2.1, -5.9),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[3] = CreateThruster (_V(0.1, -2.1, -6.02),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[4] = CreateThruster (_V(-0.1, -2.1, -5.9),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[5] = CreateThruster (_V(-0.1, -2.1, -6.02),_V(0, -1, 0),MAXRCSTH,tank,ISP);
	th_rcs[6] = CreateThruster (_V(0, 2.1, -5.9),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[7] = CreateThruster (_V(0, 2.1, -6.02),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[8] = CreateThruster (_V(-0.1, 2.1, -5.9),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[9] = CreateThruster (_V(-0.1, 2.1, -6.02),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[10] = CreateThruster (_V(0.1, 2.1, -5.9),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[11] = CreateThruster (_V(0.1, 2.1, -6.02),_V(0, 1, 0),MAXRCSTH,tank,ISP);
	th_rcs[12] = CreateThruster (_V(-2.1, 0, -5.9),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[13] = CreateThruster (_V(-2.1, 0, -6.02),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[14] = CreateThruster (_V(-2.1, 0.1, -5.9),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[15] = CreateThruster (_V(-2.1, 0.1, -6.02),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[16] = CreateThruster (_V(-2.1, -0.1, -5.9),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[17] = CreateThruster (_V(-2.1, -0.1, -6.02),_V(-1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[18] = CreateThruster (_V(2.1, 0, -5.9),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[19] = CreateThruster (_V(2.1, 0, -6.02),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[20] = CreateThruster (_V(2.1, 0.1, -5.9),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[21] = CreateThruster (_V(2.1, 0.1, -6.02),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[22] = CreateThruster (_V(2.1, -0.1, -5.9),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[23] = CreateThruster (_V(2.1, -0.1, -6.02),_V(1, 0, 0),MAXRCSTH,tank,ISP);
	th_rcs[24] = CreateThruster (_V(-0.13, 2.21, -5.62),_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[25] = CreateThruster (_V(-0.13, 2.21, -5.73),_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[26] = CreateThruster (_V(-0.22, 2.16, -5.62),_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[27] = CreateThruster (_V(-0.22, 2.16, -5.73),_V(-0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[28] = CreateThruster (_V(0.13, 2.21, -5.62),_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[29] = CreateThruster (_V(0.13, 2.21, -5.73),_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[30] = CreateThruster (_V(0.22, 2.16, -5.62),_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[31] = CreateThruster (_V(0.22, 2.16, -5.73),_V(0.5, 0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[32] = CreateThruster (_V(-0.13, -2.21, -5.62),_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[33] = CreateThruster (_V(-0.13, -2.21, -5.73),_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[34] = CreateThruster (_V(-0.22, -2.16, -5.62),_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[35] = CreateThruster (_V(-0.22, -2.16, -5.73),_V(-0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[36] = CreateThruster (_V(0.13, -2.21, -5.62),_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[37] = CreateThruster (_V(0.13, -2.21, -5.73),_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[38] = CreateThruster (_V(0.22, -2.16, -5.62),_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_rcs[39] = CreateThruster (_V(0.22, -2.16, -5.73),_V(0.5, -0.866, 0),MAXRCSTH,tank,ISP);
	th_group[0] = th_rcs[0];
	th_group[1] = th_rcs[1];
	th_group[2] = th_rcs[2];
	th_group[3] = th_rcs[3];
	th_group[4] = th_rcs[4];
	th_group[5] = th_rcs[5];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_PITCHDOWN);
	th_group[0] = th_rcs[6];
	th_group[1] = th_rcs[7];
	th_group[2] = th_rcs[8];
	th_group[3] = th_rcs[9];
	th_group[4] = th_rcs[10];
	th_group[5] = th_rcs[11];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_PITCHUP);
	th_group[0] = th_rcs[12];
	th_group[1] = th_rcs[13];
	th_group[2] = th_rcs[14];
	th_group[3] = th_rcs[15];
	th_group[4] = th_rcs[16];
	th_group[5] = th_rcs[17];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_YAWLEFT);
	th_group[0] = th_rcs[18];
	th_group[1] = th_rcs[19];
	th_group[2] = th_rcs[20];
	th_group[3] = th_rcs[21];
	th_group[4] = th_rcs[22];
	th_group[5] = th_rcs[23];
	CreateThrusterGroup (th_group,6,THGROUP_ATT_YAWRIGHT);
	th_group[0] = th_rcs[24];
	th_group[1] = th_rcs[25];
	th_group[2] = th_rcs[26];
	th_group[3] = th_rcs[27];
	th_group[4] = th_rcs[28];
	th_group[5] = th_rcs[29];
	th_group[6] = th_rcs[30];
	th_group[7] = th_rcs[31];
	CreateThrusterGroup (th_group,8,THGROUP_ATT_BANKLEFT);
	th_group[0] = th_rcs[32];
	th_group[1] = th_rcs[33];
	th_group[2] = th_rcs[34];
	th_group[3] = th_rcs[35];
	th_group[4] = th_rcs[36];
	th_group[5] = th_rcs[37];
	th_group[6] = th_rcs[38];
	th_group[7] = th_rcs[39];
	CreateThrusterGroup (th_group,8,THGROUP_ATT_BANKRIGHT);
	AddMesh("salyut6");
}

DLLCLBK VESSEL *ovcInit (OBJHANDLE hvessel, int flightmodel)
{
	return new salyut6 (hvessel, flightmodel);
}

DLLCLBK void ovcExit (VESSEL *vessel)
{
	if (vessel) delete (salyut6*) vessel;
}

Code:
1>------ Build started: Project: Salyut6, Configuration: Debug Win32 ------
1>Compiling...
1>salyut6.cpp
1>Linking...
1>   Creating library C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.lib and object C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.exp
1>LINK : fatal error LNK1561: entry point must be defined
1>Build log was saved at "file://c:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Salyut6\Debug\BuildLog.htm"
1>Salyut6 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
Last edited:
Okay forget everything above, i am leaveing it there just for clarity.


Code:
1>LINK : fatal error LNK1561: entry point must be defined


I know what you did, you havenot set your compiler to compile in a .dll format, right now you have it set to .exe format. Go to configuration properties -> configuration type | and change it to .dll

I commend you tblaxland but I still stand by that it is a really tough way to start. The proper way to learn to play an instrument, for example, is not starting with the Beatles. It's to build your way up with simplier tunes to get the feel for it. Although people do pick up a guitar and try for the stars to start and succeed, it's not the best way for the majority to learn.

I started with VB, after that I started learning C++ by looking at other peoples code for Orbiter. Three months later, I took a workshop class in C++. It took the rest of the class six months to catch up to where I was.;)
 
My problem was just parenthese location. i still need to learn about the "&" and "*" operators and how pointers and arrays are related in C/C++
Pretty good article here:
http://www.cplusplus.com/doc/tutorial/pointers.html

EDIT: Once you have digested that, you should also know about references, since the Orbiter API uses them quite a bit:
http://www.parashift.com/c++-faq-lite/references.html

I know what you did, you havenot set your compiler to compile in a .dll format, right now you have it set to .exe format. Go to configuration properties -> configuration type | and change it to .dll
Interesting, that was my first thought too but I couldn't replicate it here using ShuttlePB code. I'm using VC++2005 Pro.
 
Interesting, that was my first thought too but I couldn't replicate it here using ShuttlePB code. I'm using VC++2005 Pro.

It might be a difference in compilers... I saw that error a little while back, and I noticed I had the compiler on .exe instead of .dll ...switching it fixed the problem, so to speak...
 
I changed it to a DLL and now i get this error:
Code:
1>------ Build started: Project: Salyut6, Configuration: Debug Win32 ------
1>Compiling...
1>salyut6.cpp
1>Linking...
1>   Creating library C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.lib and object C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.exp
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual char * __thiscall LaunchpadItem::Name(void)" (?Name@LaunchpadItem@@UAEPADXZ)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual char * __thiscall LaunchpadItem::Description(void)" (?Description@LaunchpadItem@@UAEPADXZ)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall LaunchpadItem::OpenDialog(struct HINSTANCE__ *,struct HWND__ *,int,int (__stdcall*)(struct HWND__ *,unsigned int,unsigned int,long))" (?OpenDialog@LaunchpadItem@@UAE_NPAUHINSTANCE__@@PAUHWND__@@HP6GH1IIJ@Z@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall LaunchpadItem::clbkOpen(struct HWND__ *)" (?clbkOpen@LaunchpadItem@@UAE_NPAUHWND__@@@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall LaunchpadItem::clbkWriteConfig(void)" (?clbkWriteConfig@LaunchpadItem@@UAEHXZ)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall LaunchpadItem::~LaunchpadItem(void)" (??1LaunchpadItem@@UAE@XZ) referenced in function "public: virtual void * __thiscall LaunchpadItem::`scalar deleting destructor'(unsigned int)" (??_GLaunchpadItem@@UAEPAXI@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CameraMode_Cockpit::Store(char *)" (?Store@CameraMode_Cockpit@@UAEXPAD@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CameraMode_Cockpit::GetDescr(char *,int)" (?GetDescr@CameraMode_Cockpit@@UAEXPADH@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CameraMode_Track::Init(char *)" (?Init@CameraMode_Track@@UAEXPAD@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CameraMode_Track::Store(char *)" (?Store@CameraMode_Track@@UAEXPAD@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CameraMode_Track::GetDescr(char *,int)" (?GetDescr@CameraMode_Track@@UAEXPADH@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CameraMode_Ground::Init(char *)" (?Init@CameraMode_Ground@@UAEXPAD@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CameraMode_Ground::Store(char *)" (?Store@CameraMode_Ground@@UAEXPAD@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CameraMode_Ground::GetDescr(char *,int)" (?GetDescr@CameraMode_Ground@@UAEXPADH@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "void __cdecl dummy(void)" (?dummy@@YAXXZ) referenced in function "void __cdecl calldummy(void)" (?calldummy@@YAXXZ)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CELBODY::bEphemeris(void)const " (?bEphemeris@CELBODY@@UBE_NXZ)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CELBODY::clbkInit(void *)" (?clbkInit@CELBODY@@UAEXPAX@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CELBODY::clbkEphemeris(double,int,double *)" (?clbkEphemeris@CELBODY@@UAEHNHPAN@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CELBODY::clbkFastEphemeris(double,int,double *)" (?clbkFastEphemeris@CELBODY@@UAEHNHPAN@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CELBODY::clbkAtmParam(double,struct ATMPARAM *)" (?clbkAtmParam@CELBODY@@UAE_NNPAUATMPARAM@@@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkSetClassCaps(void *)" (?clbkSetClassCaps@VESSEL2@@UAEXPAX@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkSaveState(void *)" (?clbkSaveState@VESSEL2@@UAEXPAX@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkLoadStateEx(void *,void *)" (?clbkLoadStateEx@VESSEL2@@UAEXPAX0@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkSetStateEx(void const *)" (?clbkSetStateEx@VESSEL2@@UAEXPBX@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkPostCreation(void)" (?clbkPostCreation@VESSEL2@@UAEXXZ)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkFocusChanged(bool,void *,void *)" (?clbkFocusChanged@VESSEL2@@UAEX_NPAX1@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkPreStep(double,double,double)" (?clbkPreStep@VESSEL2@@UAEXNNN@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkPostStep(double,double,double)" (?clbkPostStep@VESSEL2@@UAEXNNN@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall VESSEL2::clbkPlaybackEvent(double,double,char const *,char const *)" (?clbkPlaybackEvent@VESSEL2@@UAE_NNNPBD0@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkVisualCreated(void *,int)" (?clbkVisualCreated@VESSEL2@@UAEXPAXH@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkVisualDestroyed(void *,int)" (?clbkVisualDestroyed@VESSEL2@@UAEXPAXH@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkDrawHUD(int,struct HUDPAINTSPEC const *,struct HDC__ *)" (?clbkDrawHUD@VESSEL2@@UAEXHPBUHUDPAINTSPEC@@PAUHDC__@@@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkRCSMode(int)" (?clbkRCSMode@VESSEL2@@UAEXH@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkADCtrlMode(unsigned long)" (?clbkADCtrlMode@VESSEL2@@UAEXK@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkHUDMode(int)" (?clbkHUDMode@VESSEL2@@UAEXH@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkMFDMode(int,int)" (?clbkMFDMode@VESSEL2@@UAEXHH@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkNavMode(int,bool)" (?clbkNavMode@VESSEL2@@UAEXH_N@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkDockEvent(int,void *)" (?clbkDockEvent@VESSEL2@@UAEXHPAX@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VESSEL2::clbkAnimate(double)" (?clbkAnimate@VESSEL2@@UAEXN@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall VESSEL2::clbkConsumeDirectKey(char *)" (?clbkConsumeDirectKey@VESSEL2@@UAEHPAD@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall VESSEL2::clbkConsumeBufferedKey(unsigned long,bool,char *)" (?clbkConsumeBufferedKey@VESSEL2@@UAEHK_NPAD@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall VESSEL2::clbkLoadGenericCockpit(void)" (?clbkLoadGenericCockpit@VESSEL2@@UAE_NXZ)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall VESSEL2::clbkLoadPanel(int)" (?clbkLoadPanel@VESSEL2@@UAE_NH@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall VESSEL2::clbkPanelMouseEvent(int,int,int,int)" (?clbkPanelMouseEvent@VESSEL2@@UAE_NHHHH@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall VESSEL2::clbkPanelRedrawEvent(int,int,void *)" (?clbkPanelRedrawEvent@VESSEL2@@UAE_NHHPAX@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall VESSEL2::clbkLoadVC(int)" (?clbkLoadVC@VESSEL2@@UAE_NH@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall VESSEL2::clbkVCMouseEvent(int,int,union VECTOR3 &)" (?clbkVCMouseEvent@VESSEL2@@UAE_NHHAATVECTOR3@@@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall VESSEL2::clbkVCRedrawEvent(int,int,void *)" (?clbkVCRedrawEvent@VESSEL2@@UAE_NHHPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall MFD::~MFD(void)" (??1MFD@@UAE@XZ) referenced in function "public: virtual void * __thiscall MFD::`scalar deleting destructor'(unsigned int)" (??_GMFD@@UAEPAXI@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall GraphMFD::~GraphMFD(void)" (??1GraphMFD@@UAE@XZ) referenced in function "public: virtual void * __thiscall GraphMFD::`scalar deleting destructor'(unsigned int)" (??_GGraphMFD@@UAEPAXI@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExternMFD::SetVessel(void *)" (?SetVessel@ExternMFD@@UAEXPAX@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExternMFD::clbkUpdate(void)" (?clbkUpdate@ExternMFD@@UAEXXZ)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExternMFD::clbkRefreshDisplay(void *)" (?clbkRefreshDisplay@ExternMFD@@UAEXPAX@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExternMFD::clbkRefreshButtons(void)" (?clbkRefreshButtons@ExternMFD@@UAEXXZ)
1>salyut6.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExternMFD::clbkFocusChanged(void *)" (?clbkFocusChanged@ExternMFD@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall ExternMFD::~ExternMFD(void)" (??1ExternMFD@@UAE@XZ) referenced in function "public: virtual void * __thiscall ExternMFD::`scalar deleting destructor'(unsigned int)" (??_GExternMFD@@UAEPAXI@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall VESSEL::AddMesh(char const *,union VECTOR3 const *)const " (?AddMesh@VESSEL@@QBEIPBDPBTVECTOR3@@@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void * __thiscall VESSEL::CreateThrusterGroup(void * *,int,enum THGROUP_TYPE)const " (?CreateThrusterGroup@VESSEL@@QBEPAXPAPAXHW4THGROUP_TYPE@@@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void * __thiscall VESSEL::CreateThruster(union VECTOR3 const &,union VECTOR3 const &,double,void *,double,double,double)const " (?CreateThruster@VESSEL@@QBEPAXABTVECTOR3@@0NPAXNNN@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void * __thiscall VESSEL::CreatePropellantResource(double,double,double)const " (?CreatePropellantResource@VESSEL@@QBEPAXNNN@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetTouchdownPoints(union VECTOR3 const &,union VECTOR3 const &,union VECTOR3 const &)const " (?SetTouchdownPoints@VESSEL@@QBEXABTVECTOR3@@00@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetDockParams(union VECTOR3 const &,union VECTOR3 const &,union VECTOR3 const &)const " (?SetDockParams@VESSEL@@QBEXABTVECTOR3@@00@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetCameraOffset(union VECTOR3 const &)const " (?SetCameraOffset@VESSEL@@QBEXABTVECTOR3@@@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetTrimScale(double)const " (?SetTrimScale@VESSEL@@QBEXN@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetPMI(union VECTOR3 const &)const " (?SetPMI@VESSEL@@QBEXABTVECTOR3@@@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetRotDrag(union VECTOR3 const &)const " (?SetRotDrag@VESSEL@@QBEXABTVECTOR3@@@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetCrossSections(union VECTOR3 const &)const " (?SetCrossSections@VESSEL@@QBEXABTVECTOR3@@@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetWingEffectiveness(double)const " (?SetWingEffectiveness@VESSEL@@QBEXN@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetWingAspect(double)const " (?SetWingAspect@VESSEL@@QBEXN@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetCW(double,double,double,double)const " (?SetCW@VESSEL@@QBEXNNNN@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetEmptyMass(double)const " (?SetEmptyMass@VESSEL@@QBEXN@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: void __thiscall VESSEL::SetSize(double)const " (?SetSize@VESSEL@@QBEXN@Z) referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "public: __thiscall VESSEL2::VESSEL2(void *,int)" (??0VESSEL2@@QAE@PAXH@Z) referenced in function "public: __thiscall salyut6::salyut6(void *,int)" (??0salyut6@@QAE@PAXH@Z)
1>C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.dll : fatal error LNK1120: 73 unresolved externals
1>Build log was saved at "file://c:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Salyut6\Debug\BuildLog.htm"
1>Salyut6 - 74 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

It's kind of cryptic.
 
Last edited:
I changed it to a DLL and now i get this error:

Make sure you have the orbiter libraries (orbiter.lib and OrbiterSDK.lib) linked into the project. Either add them as "Existing Item" to your project or use the linker settings (library directory and additional libraries)
 
Make sure you have the orbiter libraries (orbiter.lib and OrbiterSDK.lib) linked into the project. Either add them as "Existing Item" to your project or use the linker settings (library directory and additional libraries)


okayyy now i get this error:

Code:
1>------ Build started: Project: Salyut6, Configuration: Debug Win32 ------
1>Linking...
1>LINK : fatal error LNK1104: cannot open file '[COLOR="Red"]msvcirt.lib[/COLOR]'
1>Build log was saved at "file://c:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Salyut6\Debug\BuildLog.htm"
1>Salyut6 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What the heck is this msvcirt.lib, someone on M6 appaerentialy had the same problem some time ago.
 
okayyy now i get this error:

What the heck is this msvcirt.lib, someone on M6 appaerentialy had the same problem some time ago.

Yes. It is a library which conflicts with the orbiter libraries, because martins used VC6 for making them. Ignore this one in the project settings.
 
I can never win, now i have 13 inresolved externals.
Code:
1>------ Build started: Project: Salyut6, Configuration: Debug Win32 ------
1>Linking...
1>   Creating library C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.lib and object C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.exp
1>salyut6.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
1>salyut6.obj : error LNK2001: unresolved external symbol __RTC_InitBase
1>salyut6.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
1>salyut6.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`scalar deleting destructor'(unsigned int)" (??_GLaunchpadItem@@UAEPAXI@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function "public: virtual void * __thiscall LaunchpadItem::`scalar deleting destructor'(unsigned int)" (??_GLaunchpadItem@@UAEPAXI@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
1>salyut6.obj : error LNK2001: unresolved external symbol __fltused
1>salyut6.obj : error LNK2001: unresolved external symbol __purecall
1>salyut6.obj : error LNK2019: unresolved external symbol @_RTC_CheckStackVars@8 referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol __chkstk referenced in function "public: virtual void __thiscall salyut6::clbkSetClassCaps(void *)" (?clbkSetClassCaps@salyut6@@UAEXPAX@Z)
1>salyut6.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function _ovcInit
1>LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
1>C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.dll : fatal error LNK1120: 13 unresolved externals
1>Build log was saved at "file://c:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Salyut6\Debug\BuildLog.htm"
1>Salyut6 - 14 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

And one more time.

Ok, i think i got it:
Code:
1>------ Build started: Project: Salyut6, Configuration: Debug Win32 ------
1>Linking...
1>LINK : C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.dll not found or not built by the last incremental link; performing full link
1>   Creating library C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.lib and object C:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Debug\Salyut6.exp
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Embedding manifest...
1>Build log was saved at "file://c:\Users\matthew\Documents\Visual Studio 2008\Projects\Salyut6\Salyut6\Debug\BuildLog.htm"
1>Salyut6 - 0 error(s), 1 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

I have one warning, but that's to be expected, right?
 
Last edited:
I have one warning, but that's to be expected, right?
No. You should always strive to have no errors or warnings on compilation/build. You can get rid of the warning by adding msvcrt.lib to the list of ignored libraries:
Properties-->Linker-->Ignore Specific Library.
 
Okay, I got it to compile with no errors and no warnings. However, I get a CTD every time I try to run it in orbiter. Would anyone care to take a look at it just to see it from a different perspective.
 

Attachments

You have no clbkLoadStateEx function, which is mandatory.
 
Back
Top