Salut a tous,
j'essais de faire ma propre bibliotheque !
J'ai donc compiler tout met fichier en .o, je les aient assembler en une bibliotheque, créer le header, j'ai tout bien placer aux bons endroits ! Tout marche et a la compile sa fait comem si il y avait rien ds la bibliotheque !

Script de création de la lib :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
#!/bin/sh
echo "Compilation ..."
g++ -c *.cpp
echo "Création de la bibliotheque ..."
rm ../Release/libXT3D.a
ar r ../Release/libXT3D.a *.o
chmod 777 ../Release/libXT3D.a
echo "Generation de l'index ..."
ranlib ../Release/libXT3D.a
echo "Création du header..."
cp XT3D.h ../Release -rf
echo "Nettoyage ..."
rm *.o
echo "Terminer !"


Script d'installation :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
#!/bin/sh
echo Installation lib XT3D...
cp ./Release/libXT3D.a /usr/lib
cp ./Release/XT3D.h /usr/include/XT3D/
echo Terminer
Compilation du projet test :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 
[XT95@localhost test]$ g++ -I include -L/usr/lib -lSDL -lpthread -lSDL_image -lSDL_ttf -lGL -lGLU -lGLEW -lXT3D -o main main.o
main.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text+0x2b): undefined reference to `CCameraRPG::CCameraRPG()'
main.cpp:(.text+0x53): undefined reference to `CMap::CMap()'
main.cpp:(.text+0x7b): undefined reference to `CSky::CSky()'
main.cpp:(.text+0xa3): undefined reference to `CWater::CWater()'
main.cpp:(.text+0xcb): undefined reference to `CTexte::CTexte()'
main.cpp:(.text+0xf3): undefined reference to `CTexte::CTexte()'
main.cpp:(.text+0x11b): undefined reference to `CTexte::CTexte()'
main.o: In function `__tcf_6':
main.cpp:(.text+0x164): undefined reference to `CTexte::~CTexte()'
main.o: In function `__tcf_5':
main.cpp:(.text+0x178): undefined reference to `CTexte::~CTexte()'
main.o: In function `__tcf_4':
main.cpp:(.text+0x18c): undefined reference to `CTexte::~CTexte()'
main.o: In function `__tcf_3':
main.cpp:(.text+0x1a0): undefined reference to `CWater::~CWater()'
main.o: In function `__tcf_2':
main.cpp:(.text+0x1b4): undefined reference to `CSky::~CSky()'
main.o: In function `__tcf_1':
main.cpp:(.text+0x1c8): undefined reference to `CMap::~CMap()'
main.o: In function `Draw()':
main.cpp:(.text+0x25e): undefined reference to `CMap::TerrainGetHPoint(int, int)'
main.cpp:(.text+0x284): undefined reference to `CCameraRPG::Look(int)'
main.cpp:(.text+0x2df): undefined reference to `CSky::SetPosition(int, int, int)'
main.cpp:(.text+0x2eb): undefined reference to `CSky::Look()'
main.cpp:(.text+0x2f7): undefined reference to `CMap::Look()'
main.o: In function `main':
main.cpp:(.text+0x4f0): undefined reference to `CSky::SetSize(int)'
main.cpp:(.text+0x504): undefined reference to `CSky::SetBack(char*)'
main.cpp:(.text+0x518): undefined reference to `CSky::SetFront(char*)'
main.cpp:(.text+0x52c): undefined reference to `CSky::SetBottom(char*)'
main.cpp:(.text+0x540): undefined reference to `CSky::SetTop(char*)'
main.cpp:(.text+0x554): undefined reference to `CSky::SetLeft(char*)'
main.cpp:(.text+0x568): undefined reference to `CSky::SetRight(char*)'
main.cpp:(.text+0x574): undefined reference to `CMap::Init()'
main.cpp:(.text+0x59a): undefined reference to `CMap::Load(char*, bool, bool)'
main.cpp:(.text+0x5ae): undefined reference to `CCameraRPG::LoadMan(char*)'
main.cpp:(.text+0x5c2): undefined reference to `CCameraRPG::SetTextureMan(char*)'
main.cpp:(.text+0x5e5): undefined reference to `CTexte::SetPolice(char*, int)'
main.cpp:(.text+0x601): undefined reference to `CTexte::SetPosition(int, int)'
main.cpp:(.text+0x625): undefined reference to `CTexte::SetColor(int, int, int)'
main.cpp:(.text+0x641): undefined reference to `CTexte::SetPolice(char*, int)'
main.cpp:(.text+0x65d): undefined reference to `CTexte::SetPosition(int, int)'
main.cpp:(.text+0x681): undefined reference to `CTexte::SetColor(int, int, int)'
main.cpp:(.text+0x695): undefined reference to `CTexte::SetTexte(char*)'
main.cpp:(.text+0x770): undefined reference to `CCameraRPG::GetEvent(SDL_Event*)'
main.cpp:(.text+0x7d0): undefined reference to `CTexte::SetTexte(char*)'
main.o: In function `CCameraRPG::~CCameraRPG()':
main.cpp:(.gnu.linkonce.t._ZN10CCameraRPGD1Ev+0x11): undefined reference to `CObjMd2::~CObjMd2()'
collect2: ld a retourné 1 code d'état d'exécution


Que je link la lib ou non il n'y a pas de différence :/ !
(vague impression que c'est juste les class qui plante...)
Quelqu'un peut m'aider ? !
Merci d'avance !