ねえ、私は弾丸2.78をダウンロードし、次の手順を実行しました。
解凍してこのチュートリアルを見つけました
チュートリアルの写真で、INSTALL LIBSのようにチェックされたものがいくつかあることがわかったのに、チェックしなかったので、可能な限りすべてをチェックすることになりました。
新しく生成されたBULLET_PHYSICS.vcxprojにアクセスし、デバッグおよびリリースでビルドしました
msvn / BulletBuild / libのlibフォルダーにたくさんの新しいライブラリがあるのを見ましたが、それらには何もしませんでした
実際のプロジェクトを設定するために、チュートリアルの残りの手順を正確に実行しました
コードの最後の行をビルドしようとしました:FAIL
.libsとpdbsのみがlibフォルダーに表示され、チュートリアルではemについて言及されていなかったため、dllが必要かどうか疑問に思いました。
ライブラリを再構築する私の唯一の経験は、ダウンロードに含まれるmsvnファイルをビルドし、結果のダイナミックlibファイルとdllファイルを使用することによるSFMLを介したものです。ただし、チュートリアルの手順は大きく異なります。(誰かがこれがどのように機能するかを私に説明できればそれは素晴らしいでしょう)
私は指示に正確に何度も従いましたが、何が欠けているのかわかりません。mainのコード行をコメントアウトし、インクルードを保持するとビルドは機能しますが、保持すると次のようになります。
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::getAabbSlow(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabbSlow@btConvexInternalShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall btCollisionShape::serialize(void *,class btSerializer *)const " (?serialize@btCollisionShape@@UBEPBDPAXPAVbtSerializer@@@Z)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: __thiscall btPolyhedralConvexShape::btPolyhedralConvexShape(void)" (??0btPolyhedralConvexShape@@QAE@XZ)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall btPolyhedralConvexShape::~btPolyhedralConvexShape(void)" (??1btPolyhedralConvexShape@@UAE@XZ)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btConvexInternalShape@@UAEXABVbtVector3@@@Z)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::getBoundingSphere(class btVector3 &,float &)const " (?getBoundingSphere@btCollisionShape@@UBEXAAVbtVector3@@AAM@Z)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@btCollisionShape@@UBEMXZ)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getContactBreakingThreshold(float)const " (?getContactBreakingThreshold@btCollisionShape@@UBEMM@Z)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::serializeSingleShape(class btSerializer *)const " (?serializeSingleShape@btCollisionShape@@UBEXPAVbtSerializer@@@Z)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::getAabb(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabb@btBoxShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btBoxShape@@UBEXMAAVbtVector3@@@Z)
1>BulletTestApp.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall btPolyhedralConvexShape::initializePolyhedralFeatures(void)" (?initializePolyhedralFeatures@btPolyhedralConvexShape@@UAE_NXZ)
1>C:\Libraries and Headers\Bullet\bullet-2.78\msvc\BulletTestApp\Release\BulletTestApp.exe : fatal error LNK1120: 14 unresolved externals
どこかにリンクの問題があることは知っていますが、指示に正確に従ったので、修正方法がわかりません。追加されたプロジェクトのプロパティを見ると、それが想定されている方法ではない場合、追加の依存関係は表示されません...しかし、そもそもライブラリを使用するこの方法を理解していないので、知識があります役立つだろう。