[問題] VisualStudio檔案路徑設定 & 編譯錯誤訊息
我用的編譯器是visual studio 2010
寫了一個project包含數個標頭檔與cpp檔
project檔案太多,實在不知怎麼po上網
只好請大家直接幫我看看錯誤訊息,
猜猜哪裡出了錯.非常謝謝.
錯誤訊息如下
1>------ Rebuild All started: Project: Rod, Configuration: Debug Win32 ------
1> main.cpp
1> RotationMatrix.cpp
1> EulerAngle.cpp
1> Bacillus.cpp
1> Generating Code...
1>RotationMatrix.obj : error LNK2005: "public: void __thiscall
Quaternion::SetInitialValue(double,double,double)"
(?SetInitialValue@Quaternion@@QAEXNNN@Z) already defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "void __cdecl W_Matrix(class
std::vector<class std::vector<double,class std::allocator<double> >,class
std::allocator<class std::vector<double,class std::allocator<double> > > >
&,class Quaternion)"
(?W_Matrix@@YAXAAV?$vector@V?$vector@NV?$allocator@N@std@@@std@@V?$allocator@V?$vector@NV?$allocator@N@std@@@std@@@2@@std@@VQuaternion@@@Z)
already defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "void __cdecl W_Transverse(class
std::vector<class std::vector<double,class std::allocator<double> >,class
std::allocator<class std::vector<double,class std::allocator<double> > > >
&,class Quaternion)"
(?W_Transverse@@YAXAAV?$vector@V?$vector@NV?$allocator@N@std@@@std@@V?$allocator@V?$vector@NV?$allocator@N@std@@@std@@@2@@std@@VQuaternion@@@Z)
already defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "public: double __thiscall
Vector3::magnitude(void)" (?magnitude@Vector3@@QAENXZ) already defined in
Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "public: double __thiscall
Vector3::magnitude2(void)" (?magnitude2@Vector3@@QAENXZ) already defined in
Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "public: class Vector3 __thiscall
Vector3::operator+(class Vector3 const &)" (??HVector3@@QAE?AV0@ABV0@@Z)
already defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "public: class Vector3 __thiscall
Vector3::operator-(class Vector3 const &)" (??GVector3@@QAE?AV0@ABV0@@Z)
already defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "public: class Vector3 __thiscall
Vector3::operator*(double)" (??DVector3@@QAE?AV0@N@Z) already defined in
Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "public: class Vector3 __thiscall
Vector3::operator/(double)" (??KVector3@@QAE?AV0@N@Z) already defined in
Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "public: class Vector3 & __thiscall
Vector3::operator=(class Vector3)" (??4Vector3@@QAEAAV0@V0@@Z) already
defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "public: class Vector3 & __thiscall
Vector3::operator+=(class Vector3)" (??YVector3@@QAEAAV0@V0@@Z) already
defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "double __cdecl Dot(class Vector3
&,class Vector3 &)" (?Dot@@YANAAVVector3@@0@Z) already defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "class Vector3 __cdecl Cross(class
Vector3 &,class Vector3 &)" (?Cross@@YA?AVVector3@@AAV1@0@Z) already defined
in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "double __cdecl sign(double,double)"
(?sign@@YANNN@Z) already defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "double __cdecl max(double,double)"
(?max@@YANNN@Z) already defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "double __cdecl min(double,double)"
(?min@@YANNN@Z) already defined in Bacillus.obj
1>RotationMatrix.obj : error LNK2005: "void __cdecl SinCos(double *,double
*,double)" (?SinCos@@YAXPAN0N@Z) already defined in Bacillus.obj
1>c:\users\luckychild137\documents\visual studio
2010\Projects\Rod\Debug\Rod.exe : fatal error LNK1169: one or more multiply
defined symbols found
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.120.11.75
→
05/24 17:55, , 1F
05/24 17:55, 1F
→
05/24 17:55, , 2F
05/24 17:55, 2F
→
05/24 17:56, , 3F
05/24 17:56, 3F
→
05/24 18:15, , 4F
05/24 18:15, 4F
→
05/24 21:42, , 5F
05/24 21:42, 5F
→
05/24 22:02, , 6F
05/24 22:02, 6F
→
05/24 22:03, , 7F
05/24 22:03, 7F
→
05/24 22:03, , 8F
05/24 22:03, 8F
→
05/24 22:17, , 9F
05/24 22:17, 9F
→
05/24 22:18, , 10F
05/24 22:18, 10F
→
05/25 14:25, , 11F
05/25 14:25, 11F
→
05/25 14:27, , 12F
05/25 14:27, 12F
→
05/25 14:28, , 13F
05/25 14:28, 13F
→
05/25 14:28, , 14F
05/25 14:28, 14F
→
05/25 14:35, , 15F
05/25 14:35, 15F
→
05/25 14:36, , 16F
05/25 14:36, 16F
※ 編輯: luckychild 來自: 140.120.11.75 (05/25 14:37)
→
05/25 23:08, , 17F
05/25 23:08, 17F
→
05/25 23:09, , 18F
05/25 23:09, 18F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章