See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: Compiler exemple sous Code Blocks  (Read 2700 times)

0 Members and 1 Guest are viewing this topic.

Offline Capenoules

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 0
29 July 2008, 08:15:10
Bonjour,

  Je ne peux pas installer VC++, par contre j'ai Code Blocks. J'ai cherché à suivre le tutoriel qui montre comment compiler
l'exemple du shuttlePB en l'adaptant sous Code Blocks. Mais pour l'instant je ne réussi pas ...  

  Quelqu'un aurait-il l'habitude de programmer sous Code Blocks pour Orbiter ? Jusque là j'ai pu ouvrir le projet ShuttlePB
dans Code Blocks : il contient le fichier .cpp et deux librairies Orbiter. Est-ce tout ce qu'il doit contenir ? La
compilation me renvoie une erreur pour des fonctions "max" et "min" que je change à tout hasard en "fmin" et "fmax", je
déplace aussi la déclaration du "i" en dehors de la boucle for. Une autre série d'erreurs arrivent alors :

||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|
||Warning: .drectve `-defaultlib:msvcirt ' unrecognized|
||Warning: .drectve `-defaultlib:MSVCRT ' unrecognized|
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0xff)||undefined reference to `VESSEL::SetSize(double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x116)||undefined reference to `VESSEL::SetEmptyMass(double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x159)||undefined reference to `VESSEL::SetCW(double, double, double, double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x16b)||undefined reference to `VESSEL::SetWingAspect(double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x182)||undefined reference to `VESSEL::SetWingEffectiveness(double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x209)||undefined reference to `VESSEL::SetCrossSections(VECTOR3 const&) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x28b)||undefined reference to `VESSEL::SetRotDrag(VECTOR3 const&) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x293)||undefined reference to `VESSEL::GetFlightModel() const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x2b6)||undefined reference to `VESSEL::SetPitchMomentScale(double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x2cb)||undefined reference to `VESSEL::SetBankMomentScale(double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x34a)||undefined reference to `VESSEL::SetPMI(VECTOR3 const&) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x35c)||undefined reference to `VESSEL::SetTrimScale(double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x3de)||undefined reference to `VESSEL::SetCameraOffset(VECTOR3 const&) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x3ef)||undefined reference to `VESSEL::SetLiftCoeffFunc(double (*)(double)) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x598)||undefined reference to `VESSEL::SetDockParams(VECTOR3 const&, VECTOR3
const&, VECTOR3 const&) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x747)||undefined reference to `VESSEL::SetTouchdownPoints(VECTOR3 const&, VECTOR3
const&, VECTOR3 const&) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x77c)||undefined reference to `VESSEL::CreatePropellantResource(double, double,
double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x974)||undefined reference to `VESSEL::CreateThruster(VECTOR3 const&, VECTOR3
const&, double, void*, double, double, double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x99b)||undefined reference to `VESSEL::CreateThrusterGroup(void**, int,
THGROUP_TYPE) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0xafd)||undefined reference to `VESSEL::AddExhaust(void*, double, double, VECTOR3
const&, VECTOR3 const&, void*) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0xc6b)||undefined reference to `VESSEL::CreateThruster(VECTOR3 const&, VECTOR3
const&, double, void*, double, double, double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0xc95)||undefined reference to `VESSEL::CreateThrusterGroup(void**, int,
THGROUP_TYPE) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0xdf1)||undefined reference to `VESSEL::AddExhaust(void*, double, double, VECTOR3
const&, VECTOR3 const&, void*) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0xf4d)||undefined reference to `VESSEL::AddExhaust(void*, double, double, VECTOR3
const&, VECTOR3 const&, void*) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0xffe)||undefined reference to `VESSEL::AddExhaustStream(void*, VECTOR3 const&,
PARTICLESTREAMSPEC*) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x10af)||undefined reference to `VESSEL::AddExhaustStream(void*, VECTOR3 const&,
PARTICLESTREAMSPEC*) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x115c)||undefined reference to `VESSEL::AddExhaustStream(void*, VECTOR3 const&,
PARTICLESTREAMSPEC*) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x120d)||undefined reference to `VESSEL::AddExhaustStream(void*, VECTOR3 const&,
PARTICLESTREAMSPEC*) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x12be)||undefined reference to `VESSEL::AddExhaustStream(void*, VECTOR3 const&,
PARTICLESTREAMSPEC*) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x14dc)||undefined reference to `VESSEL::CreateThruster(VECTOR3 const&, VECTOR3
const&, double, void*, double, double, double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x1650)||undefined reference to `VESSEL::CreateThruster(VECTOR3 const&, VECTOR3
const&, double, void*, double, double, double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x17c4)||undefined reference to `VESSEL::CreateThruster(VECTOR3 const&, VECTOR3
const&, double, void*, double, double, double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x1938)||undefined reference to `VESSEL::CreateThruster(VECTOR3 const&, VECTOR3
const&, double, void*, double, double, double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x1aac)||undefined reference to `VESSEL::CreateThruster(VECTOR3 const&, VECTOR3
const&, double, void*, double, double, double) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x283b)||undefined reference to `VESSEL::CreateThrusterGroup(void**, int,
THGROUP_TYPE) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x2871)||undefined reference to `VESSEL::CreateThrusterGroup(void**, int,
THGROUP_TYPE) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x28a7)||undefined reference to `VESSEL::CreateThrusterGroup(void**, int,
THGROUP_TYPE) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x28dd)||undefined reference to `VESSEL::CreateThrusterGroup(void**, int,
THGROUP_TYPE) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x2913)||undefined reference to `VESSEL::CreateThrusterGroup(void**, int,
THGROUP_TYPE) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x2a45)||undefined reference to `VESSEL::AddMesh(char const*, VECTOR3 const*) const'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x2acd)||undefined reference to `VESSEL2::VESSEL2(void*, int)'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.text+0x5)||undefined reference to `dummy()'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.rdata$_ZTV9ShuttlePB[vtable for ShuttlePB]+0xc)||undefined reference to
`VESSEL2::clbkSaveState(void*)'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.rdata$_ZTV9ShuttlePB[vtable for ShuttlePB]+0x10)||undefined reference to
`VESSEL2::clbkLoadStateEx(void*, void*)'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.rdata$_ZTV9ShuttlePB[vtable for ShuttlePB]+0x14)||undefined reference to
`VESSEL2::clbkSetStateEx(void const*)'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.rdata$_ZTV9ShuttlePB[vtable for ShuttlePB]+0x18)||undefined reference to
`VESSEL2::clbkPostCreation()'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.rdata$_ZTV9ShuttlePB[vtable for ShuttlePB]+0x1c)||undefined reference to
`VESSEL2::clbkFocusChanged(bool, void*, void*)'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.rdata$_ZTV9ShuttlePB[vtable for ShuttlePB]+0x20)||undefined reference to
`VESSEL2::clbkPreStep(double, double, double)'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.rdata$_ZTV9ShuttlePB[vtable for ShuttlePB]+0x24)||undefined reference to
`VESSEL2::clbkPostStep(double, double, double)'|
Release\ShuttlePB.o:ShuttlePB.cpp:(.rdata$_ZTV9ShuttlePB[vtable for ShuttlePB]+0x28)||undefined reference to
`VESSEL2::clbkPlaybackEvent(double, double, char const*, char const*)'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 5 warnings ===|


  Quelqu'un pourrait-il m'aider ?

  Merci d'avance.


Offline no matter

  • Legend
  • ******
  • Posts: 2826
  • Karma: 1
Reply #1 - 29 July 2008, 08:35:05
Je ne connais rien à code block mais là, il me semble qu'il y a un problème de linkage, ton compilateur ne semble pas
trouver les définitions qu'il cherche, toutes les fonctions du shuttlePB te renvoies des "||undefined reference".

Et çà , ce n'est pas bon signe (mais ce ne sont que des warnings...)
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|
||Warning: .drectve `-defaultlib:msvcirt ' unrecognized|
||Warning: .drectve `-defaultlib:MSVCRT ' unrecognized|
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|

Malheureusement, j'aurais du mal à t'en dire plus, la syntaxe de code blocks m'étant inconnue.

------------

no matter.

Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15410
  • Karma: 266
  • Hein, quoi !?
    • FsPassengers
Reply #2 - 29 July 2008, 23:40:27
C'est déja pas super facile avec VC mais d'après ce que j'ai lu compiler avec un autre truc c'est encore plus le chemin
de croix. Pourquoi tu ne peux pas installer VC express ? il est gratos ?

Dan


Offline Capenoules

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 0
Reply #3 - 30 July 2008, 11:56:53
En fait je n'ai pas le SP2 de Windows XP et VC++ refuse donc de s'installer sur mon ordi ...


Offline no matter

  • Legend
  • ******
  • Posts: 2826
  • Karma: 1
Reply #4 - 30 July 2008, 12:36:56
peut-être pourrais-tu essayer quelque chose dans ce genre:
http://geekswithblogs.net/lorint/archive/2005/11/30/61699.aspx

Je n'ai pas testé moi-même vu que çà s'installe bien sous 2000SP4 (un comble hein^^) mais le fichier dont il est
question dans l'article est bien présent sur mon cd d'install de vc++2005 express edition obtenu à partir de l'iso que
j'avais téléchargé sur le site de microsoft.


------------

no matter.

Offline Capenoules

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 0
Reply #5 - 02 August 2008, 13:01:57
Bon, ça marche effectivement très bien avec ton astuce no matter.

Le seul pb maintenant c'est pour télécharger PSDK-x86. Pour tout vous avouer, j'ai installé (pour des raisons con d'ailleurs
une version pro de Windows XP) par dessus ma version familiale installée à la base. Ce qui fait que les vérifications de
Microsoft m'empêchent de télécharger ledit fichier (et qui m'empêchait par la même occasion de télécharger le SP2 de windows XP).

Je crois que je vais devoir passer par la case ré-installation de Windows XP édition familiale, ce que je voulais éviter à
tout prix. Donc je vais devoir faire le ménage sur mon PC et tout sauvegarder avant cette manip qui me fait un peu peur.

J'espère que je pourrai enfin programmer sur Orbiter après toutes ces aventures.

A bientôt donc et merci pour votre aide !


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15410
  • Karma: 266
  • Hein, quoi !?
    • FsPassengers
Reply #6 - 03 August 2008, 03:43:40
Bonne chance, en général si on arrive au bout de toutes ces conneries de settings et install c'est déja un bon signe:
On est assez acharné et débrouillard pour entamer la prog. Si ca peut te rassurer je suis aussi passé par la case
emmerde.

Pour le pro sur familliale c'est une version "olé olé" ? pas moyen de la revalider ? (si elle est légale)
Sinon y a ptet un iso des PSDK qui traine ?

Mais de toute facon l'express demande aussi à etre validé il me semble après un certain temps..

Sinon un reinstall famillial sur pro ca peut le faire si t'a la clé legale et en principe tu retrouve tes billes.
Sinon c'est l'occasion de refaire un truc clean.

Enfin bref, bonne chance ;)

Dan


Offline Capenoules

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 0
Reply #7 - 03 August 2008, 11:08:17
Finalement j'ai pu télécharger un ISO de la plateforme SDK qui portait un nom légèrement de celle sur le tuto, mais qui ne
m'a posé aucun problème au téléchargement ni à l'installation. J'ai réussi à suivre le tuto à la lettre et le projet a été
compilé avec succès !!!

Je vais enfin pourvoir faire du C++ dans Orbiter !

A bientôt.

« Last Edit: 03 August 2008, 11:08:17 by Capenoules »