Bonjour, donc moi j'ai un petit soucis que je ne comprends pas, à la compilation j'obtiens les erreurs suivantes:
Mon .h1> Creating library ..\..\Lib\Win32\Debug\plgVisiProcess.lib and object ..\..\Lib\Win32\Debug\plgVisiProcess.exp
1>vsUtils.obj : error LNK2019: unresolved external symbol "void __cdecl vs::vsSubdivideShapes(class vs::ConvexCell *,class mgf::Vector4<float>,float,bool,class vs::ConvexCell *,class vs::ConvexCell *)" (?vsSubdivideShapes@vs@@YAXPAVConvexCell@1@V?$Vector4@M@mgf@@M_N00@Z) referenced in function "bool __cdecl vsSubdivideCell(class vs::ConvexCell *,class mgf::Vector4<float>,float,bool,class std::vector<class vs::ConvexCell *,class std::allocator<class vs::ConvexCell *> > &)" (?vsSubdivideCell@@YA_NPAVConvexCell@vs@@V?$Vector4@M@mgf@@M_NAAV?$vector@PAVConvexCell@vs@@V?$allocator@PAVConvexCell@vs@@@std@@@std@@@Z)
1>vsUtils.obj : error LNK2019: unresolved external symbol "bool __cdecl vs::vsSubdivideHulls(class vs::ConvexCell *,class mgf::Vector4<float>,float,class vs::ConvexCell *,class vs::ConvexCell *)" (?vsSubdivideHulls@vs@@YA_NPAVConvexCell@1@V?$Vector4@M@mgf@@M00@Z) referenced in function "bool __cdecl vsSubdivideCell(class vs::ConvexCell *,class mgf::Vector4<float>,float,bool,class std::vector<class vs::ConvexCell *,class std::allocator<class vs::ConvexCell *> > &)" (?vsSubdivideCell@@YA_NPAVConvexCell@vs@@V?$Vector4@M@mgf@@M_NAAV?$vector@PAVConvexCell@vs@@V?$allocator@PAVConvexCell@vs@@@std@@@std@@@Z)
1>vsUtils.obj : error LNK2019: unresolved external symbol "void __cdecl vs::vsSubdivideShape(class vrgl::Shape *,class mgf::Vector4<float>,float,bool,class std::vector<class vrml::Node *,class std::allocator<class vrml::Node *> > &,class std::vector<class vrml::Node *,class std::allocator<class vrml::Node *> > &)" (?vsSubdivideShape@vs@@YAXPAVShape@vrgl@@V?$Vector4@M@mgf@@M_NAAV?$vector@PAVNode@vrml@@V?$allocator@PAVNode@vrml@@@std@@@std@@3@Z) referenced in function "void __cdecl vsSubdivideShapes(class vs::ConvexCell *,class mgf::Vector4<float>,float,bool,class vs::ConvexCell *,class vs::ConvexCell *)" (?vsSubdivideShapes@@YAXPAVConvexCell@vs@@V?$Vector4@M@mgf@@M_N00@Z)
1>..\..\Lib\Win32\Debug\plgVisiProcess.dll : fatal error LNK1120: 3 unresolved externals
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 #ifndef _VS_PROCESS_UTILS_H_ #define _VS_PROCESS_UTILS_H_ // Magellan Library #include <mgf.h> // VRML97 #include <vrml.h> #include <vrgl.h> #include "vsStream.h" #include "vsProcessDll.h" namespace vs { VS_PROCESS_EXPORT bool vsSubdivideCell( ConvexCell* cell, mgf::Vector4f plane, float thickCut, bool notTwinPoly, std::vector< ConvexCell* >& cellList ); VS_PROCESS_EXPORT bool vsSubdivideHulls( ConvexCell* cell, mgf::Vector4f plane, float thickCut, ConvexCell* left, ConvexCell* right ); VS_PROCESS_EXPORT void vsSubdivideShapes( ConvexCell* cell, mgf::Vector4f plane, float thickCut, bool notTwinPoly, ConvexCell* left, ConvexCell* right ); VS_PROCESS_EXPORT void vsSubdivideShape( vrgl::Shape* shape, mgf::Vector4f plane, float thickCut, bool notTwinPoly, std::vector<vrml::Node*>& left, std::vector<vrml::Node*>& right ); } #endifLe problème est qu'il ne me met aucune erreur de link sur la première fonction mais toutes les autres en ont. De plus si je rajoute vs:: devant la fonction dans le .cpp je n'ai plus d'erreur. J'utilise pourtant bien le
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 #include "Utilities/vsUtils.h" using namespace vs; bool vsSubdivideCell( ConvexCell* cell, mgf::Vector4f plane, float thickCut, bool noTwinPoly, std::vector< ConvexCell* >& cellList ){ //Code } bool vsSubdivideHulls( ConvexCell* cell, mgf::Vector4f plane, float thickCut, ConvexCell* left, ConvexCell* right ){ //Code } void vsSubdivideShapes( ConvexCell* cell, mgf::Vector4f plane, float thickCut, bool noTwinPoly, ConvexCell* left, ConvexCell* right ){ //Code } void vsSubdivideShape( vrgl::Shape* shape, mgf::Vector4f plane, float thickCut, bool noTwinPoly, std::vector<vrml::Node*>& left, std::vector<vrml::Node*>& right ){ //code }en haut de mon .cpp.
Code : Sélectionner tout - Visualiser dans une fenêtre à part using namespace vs;
Je ne comprends vraiment pas quel pourrait être le problème.
Merci d'avance.
Partager