Did you link the IPhysics.lib in your code and set up the directories in your IDE to point to the .lib? That's all I can think of
In file included from ../../include/SPhysicsStructs.h:10,
from ../../include/CPhysics.h:10,
from ../../include/IPhysics.h:9,
from global.h:15,
from main.cpp:5:
../../include/EPhysicsEnums.h:34:7: warning: no newline at end of file
In file included from ../../include/CPhysics.h:10,
from ../../include/IPhysics.h:9,
from global.h:15, from main.cpp:5:
../../include/SPhysicsStructs.h:129:7: warning: no newline at end of file
In file included from ../../include/IPhysicsEntity.h:9,
from ../../include/CPhysicsEntity.h:8,
from ../../include/CPhysics.h:11,
from ../../include/IPhysics.h:9,
from global.h:15,
from main.cpp:5:
../../include/IPhysicsBaseEntity.h:31:7: warning: no newline at end of file
In file included from ../../include/CPhysicsEntity.h:8,
from ../../include/CPhysics.h:11,
from ../../include/IPhysics.h:9,
from global.h:15,
from main.cpp:5:
../../include/IPhysicsEntity.h:32:7: warning: no newline at end of file
In file included from ../../include/CPhysics.h:11,
from ../../include/IPhysics.h:9,
from global.h:15,
from main.cpp:5:
../../include/CPhysicsEntity.h:30:7: warning: no newline at end of file
In file included from ../../include/CPhysicsCar.h:15,
from ../../include/CPhysics.h:17,
from ../../include/IPhysics.h:9,
from global.h:15,
from main.cpp:5:
../../include/IPhysicsCar.h:38:7: warning: no newline at end of file
In file included from ../../include/CPhysics.h:17,
from ../../include/IPhysics.h:9,
from global.h:15,
from main.cpp:5:
../../include/CPhysicsCar.h:71:7: warning: no newline at end of file
In file included from ../../include/IPhysics.h:9,
from global.h:15,
from main.cpp:5:
../../include/CPhysics.h:63:7: warning: no newline at end of file
In file included from global.h:15,
from main.cpp:5:
../../include/IPhysics.h:13:7: warning: no newline at end of file
In file included from main.cpp:6:
example1.h:68:2: warning: no newline at end of file
In file included from main.cpp:7:
example2.h:96:2: warning: no newline at end of file
In file included from main.cpp:8:
example3.h:178:2: warning: no newline at end of file
main.cpp:31:2: warning: no newline at end of file
/tmp/ccOnw3in.o: In function `runExample3()':main.cpp:(.text+0x1e8): undefined reference to `CPhysics::CPhysics()'
:main.cpp:(.text+0x20c): undefined reference to `CPhysics::init(irr::ITimer*)'
:main.cpp:(.text+0x8fe): undefined reference to `CPhysics::addCar(SPhysicsCar*)':main.cpp:(.text+0xaa5): undefined reference to `CPhysics::addEntity(SPhysicsStaticMesh*)'
:main.cpp:(.text+0xb45): undefined reference to `CPhysics::update()'
:main.cpp:(.text+0xb7b): undefined reference to `CPhysics::~CPhysics()'
:main.cpp:(.text+0xbb9): undefined reference to `CPhysics::~CPhysics()'
/tmp/ccOnw3in.o: In function `runExample2()':main.cpp:(.text+0xd07): undefined reference to `CPhysics::CPhysics()'
:main.cpp:(.text+0xd2b): undefined reference to `CPhysics::init(irr::ITimer*)'
:main.cpp:(.text+0xf99): undefined reference to `CPhysics::addEntity(SPhysicsTerrain*)'
:main.cpp:(.text+0x1039): undefined reference to `CPhysics::update()'
:main.cpp:(.text+0x106c): undefined reference to `CPhysics::~CPhysics()'
:main.cpp:(.text+0x10a7): undefined reference to `CPhysics::~CPhysics()'
/tmp/ccOnw3in.o: In function `runExample1()':main.cpp:(.text+0x11f8): undefined reference to `CPhysics::CPhysics()'
:main.cpp:(.text+0x121c): undefined reference to `CPhysics::init(irr::ITimer*)'
:main.cpp:(.text+0x133e): undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
:main.cpp:(.text+0x14a4): undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
:main.cpp:(.text+0x1587): undefined reference to `CPhysics::update()'
:main.cpp:(.text+0x15af): undefined reference to `CPhysics::~CPhysics()'
:main.cpp:(.text+0x15cb): undefined reference to `CPhysics::~CPhysics()'
/tmp/ccOnw3in.o: In function `CEventReceiver_eg2::OnEvent(irr::SEvent)':main.cpp:(.text._ZN18CEventReceiver_eg27OnEventEN3irr6SEventE[CEventReceiver_eg2::OnEvent(irr::SEvent)]+0x68): undefined reference to `CPhysics::dropTestCube(irr::scene::ISceneManager*, irr::core::vector3d<float>, float, float)'
:main.cpp:(.text._ZN18CEventReceiver_eg27OnEventEN3irr6SEventE[CEventReceiver_eg2::OnEvent(irr::SEvent)]+0xc5): undefined reference to `CPhysics::dropTestSphere(irr::scene::ISceneManager*, irr::core::vector3d<float>, float, float)'
collect2: ld returned 1 exit status
g++ -o ex main.cpp -lIrrlicht -lGL -lGLU -lIPhysics -lNewton_cdecl
Axel186 wrote::oops: Maybe I did it bad... Plz tell me how you did it..
http://irrlicht.sourceforge.net/tut_devcpp.html - DevC++
http://irrlicht.sourceforge.net/tut_codeblocks.html - Code::Blocks
http://irrlicht.sourceforge.net/tut001.html - Visual Studio
My errors
Compiling...
main.cpp
Linking...
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
IPhysics.lib(CPhysics.obj) : warning LNK4078: multiple '.CRT' sections found with different attributes (40300040)
libcpmt.lib(locale0.obj) : error LNK2005: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z) already defined in IPhysics.lib(CPhysics.obj)
libcpmt.lib(locale0.obj) : error LNK2005: "public: void __thiscall std::locale::facet::_Register(void)" (?_Register@facet@locale@std@@QAEXXZ) already defined in IPhysics.lib(CPhysics.obj)
libcpmt.lib(locale0.obj) : error LNK2005: "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo@std@@QAE@XZ) already defined in IPhysics.lib(CPhysics.obj)
libcpmt.lib(locale0.obj) : error LNK2005: "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@std@@QAE@PBD@Z) already defined in IPhysics.lib(CPhysics.obj)
libcpmt.lib(locale0.obj) : error LNK2005: "public: __thiscall std::locale::locale(void)" (??0locale@std@@QAE@XZ) already defined in IPhysics.lib(CLog.obj)
libcpmt.lib(locale0.obj) : error LNK2005: "public: static unsigned int const std::ctype<char>::table_size" (?table_size@?$ctype@D@std@@2IB) already defined in IPhysics.lib(CPhysics.obj)
libcpmt.lib(ios.obj) : error LNK2005: "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base@std@@UAE@XZ) already defined in IPhysics.lib(CLog.obj)
libcpmt.lib(ios.obj) : error LNK2005: "public: void __thiscall std::ios_base::clear(int,bool)" (?clear@ios_base@std@@QAEXH_N@Z) already defined in IPhysics.lib(CPhysics.obj)
libcpmt.lib(ios.obj) : error LNK2005: "protected: void __thiscall std::ios_base::_Init(void)" (?_Init@ios_base@std@@IAEXXZ) already defined in IPhysics.lib(CLog.obj)
LIBCMT.lib(dosmap.obj) : error LNK2005: __dosmaperr already defined in LIBCD.lib(dosmap.obj)
LIBCMT.lib(isctype.obj) : error LNK2005: __isctype already defined in LIBCD.lib(isctype.obj)
LIBCMT.lib(mbctype.obj) : error LNK2005: __getmbcp already defined in LIBCD.lib(mbctype.obj)
LIBCMT.lib(mbctype.obj) : error LNK2005: __setmbcp already defined in LIBCD.lib(mbctype.obj)
LIBCMT.lib(mbctype.obj) : error LNK2005: ___initmbctable already defined in LIBCD.lib(mbctype.obj)
LIBCMT.lib(tolower.obj) : error LNK2005: __tolower already defined in LIBCD.lib(tolower.obj)
LIBCMT.lib(tolower.obj) : error LNK2005: _tolower already defined in LIBCD.lib(tolower.obj)
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) referenced in function "public: __thiscall std::bad_alloc::bad_alloc(char const *)" (??0bad_alloc@std@@QAE@PBD@Z)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z)
IPhysics.lib(IPhysicsWorld.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z)
IPhysics.lib(CPhysics.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
IPhysics.lib(IPhysicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) referenced in function "public: virtual __thiscall std::bad_alloc::~bad_alloc(void)" (??1bad_alloc@std@@UAE@XZ)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ)
IPhysics.lib(IPhysicsWorld.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ)
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol _memcpy_s referenced in function "public: static char * __cdecl std::char_traits<char>::_Copy_s(char *,unsigned int,char const *,unsigned int)" (?_Copy_s@?$char_traits@D@std@@SAPADPADIPBDI@Z)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol _memcpy_s
IPhysics.lib(IPhysicsWorld.obj) : error LNK2001: unresolved external symbol _memcpy_s
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol _memmove_s referenced in function "public: static char * __cdecl std::char_traits<char>::_Move_s(char *,unsigned int,char const *,unsigned int)" (?_Move_s@?$char_traits@D@std@@SAPADPADIPBDI@Z)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol _memmove_s
IPhysics.lib(IPhysicsWorld.obj) : error LNK2001: unresolved external symbol _memmove_s
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol "private: static void __cdecl std::locale::facet::facet_Register(class std::locale::facet *)" (?facet_Register@facet@locale@std@@CAXPAV123@@Z) referenced in function "public: void __thiscall std::locale::facet::_Register(void)" (?_Register@facet@locale@std@@QAEXXZ)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "private: static void __cdecl std::locale::facet::facet_Register(class std::locale::facet *)" (?facet_Register@facet@locale@std@@CAXPAV123@@Z)
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) referenced in function "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ)
IPhysics.lib(IMaterialCallback.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(IPhysicsJoint.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsCustom.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsCarWheel.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(IPhysicsWorld.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsCar.obj) : error LNK2019: unresolved external symbol ___CxxFrameHandler3 referenced in function __ehhandler$??1?$string@DV?$irrAllocator@D@core@irr@@@core@irr@@QAE@XZ
IPhysics.lib(CPhysicsEntity.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(MPhysicsCallbacks.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsCorkscrew.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsUniversal.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsUpVector.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsPulley.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsHinge.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsBallSocket.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsSlider.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol ___CxxFrameHandler3 referenced in function __ehhandler$?addCamera@CPhysics@@QAEPAVCPhysicsCamera@@PAUSPhysicsCamera@@@Z
IPhysics.lib(IPhysicsBodyModifier.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysicsCamera.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CMaterialManager.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
IPhysics.lib(CPhysics.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
IPhysics.lib(CLog.obj) : error LNK2019: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) referenced in function __ehhandler$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXII@Z
IPhysics.lib(IPhysicsWorld.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ)
IPhysics.lib(IPhysicsWorld.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ)
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) referenced in function "protected: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z)
IPhysics.lib(CLog.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) referenced in function "public: virtual __thiscall std::basic_ofstream<char,struct std::char_traits<char> >::~basic_ofstream<char,struct std::char_traits<char> >(void)" (??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ)
IPhysics.lib(IPhysicsWorld.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ)
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) referenced in function "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo@std@@QAE@XZ)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z)
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) referenced in function "public: __thiscall std::runtime_error::runtime_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0runtime_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ)
IPhysics.lib(IPhysicsWorld.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ)
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z) referenced in function "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@std@@QAE@PBD@Z)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z)
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol __invalid_parameter_noinfo referenced in function "public: char & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator[](unsigned int)" (??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z) referenced in function "class std::num_put<char,class std::ostreambuf_iterator<char,struct std::char_traits<char> > > const & __cdecl std::use_facet<class std::num_put<char,class std::ostreambuf_iterator<char,struct std::char_traits<char> > > >(class std::locale const &)" (??$use_facet@V?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@@std@@YAABV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@0@ABVlocale@0@@Z)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z)
IPhysics.lib(CPhysics.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UAE@XZ)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UAE@XZ)
IPhysics.lib(CPhysics.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::bad_cast::bad_cast(class std::bad_cast const &)" (??0bad_cast@std@@QAE@ABV01@@Z)
IPhysics.lib(CLog.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::bad_cast::bad_cast(class std::bad_cast const &)" (??0bad_cast@std@@QAE@ABV01@@Z)
IPhysics.lib(CPhysics.obj) : error LNK2019: unresolved external symbol _sprintf_s referenced in function "protected: virtual class std::ostreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_put<char,class std::ostreambuf_iterator<char,struct std::char_traits<char> > >::do_put(class std::ostreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,char,long)const " (?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DJ@Z)
IPhysics.lib(CLog.obj) : error LNK2019: unresolved external symbol "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) referenced in function "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base@std@@UAE@XZ)
IPhysics.lib(CLog.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z) referenced in function "protected: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::init(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z)
..\..\bin\Win32-VisualStudio\HelloWorld.exe : fatal error LNK1120: 21 unresolved externals
Build log was saved at "file://f:\3d softwares\Irrlicht game engine\irrlicht-1.236\irrlicht-1.2\examples\01.HelloWorld\Debug\BuildLog.htm"
HelloWorld - 83 error(s), 3 warning(s)

CPhysics physics;
physics.init(device);
// In other functions where physics as passed as a pointer....
SPhysicsStaticMesh track_physics;
track_physics.mesh = track_mesh;
track_physics.node = track_node;
track_physics.scale = core::vector3df(1, 1, 1);
IPhysicsEntity *track_entity = physics->addEntity(&track_physics);
SPhysicsMesh car_mesh;
car_mesh.mesh = racerMesh->getMesh();
car_mesh.node = racerMesh;
car_mesh.mass = 10.0;
car_mesh.scale = core::vector3df(.5, .5, .5);
car_mesh.bodyType = ENUMERATED_BODY_TYPE::EBT_DYNAMIC;
car_entity = physics->addEntity(&car_mesh);
// Back in main.cpp...
while(device->run()){
// some stuff..
physics.update();
}
physics.close();#include "stdafx.h"
#include "global.h"
void main()
{
// start Irrlicht
IrrlichtDevice* device = createDevice(EDT_DIRECT3D9);
// pointers to driver, scenemanager
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
// create a camera
ICameraSceneNode* camera = smgr->addCameraSceneNode();
// start iphysics
CPhysics physics;
physics.init(device->getTimer());
// create a static cube
SPhysicsCube staticCube;
staticCube.bodyType = EBT_STATIC;
staticCube.size_x = 10.0f;
staticCube.size_y = 10.0f;
staticCube.size_z = 10.0f;
// create the cube node - note that the size matches the sizes in the SPhyiscsCube struct
ISceneNode* staticCubeNode = smgr->addCubeSceneNode(10.0f);
staticCubeNode->setMaterialFlag(EMF_LIGHTING, false);
// set the node in the SPhysicsCube to the newly created scene node
staticCube.node = staticCubeNode;
IPhysicsEntity* staticCubeEntity = physics.addEntity(&staticCube);
staticCubeEntity->setPosition(vector3df(0, 0.0f, 100.0f));
// create a dynamic cube
SPhysicsCube dynamicCube;
dynamicCube.bodyType = EBT_DYNAMIC;
dynamicCube.mass = 10.0f;
dynamicCube.size_x = 10.0f;
dynamicCube.size_y = 10.0f;
dynamicCube.size_z = 10.0f;
// apart from the bodyType being EBT_DYNAMIC, everything else is the same
ISceneNode* dynamicCubeNode = smgr->addCubeSceneNode(10.0f);
dynamicCubeNode->setMaterialFlag(EMF_LIGHTING, false);
dynamicCube.node = dynamicCubeNode;
IPhysicsEntity* dynamicCubeEntity = physics.addEntity(&dynamicCube);
dynamicCubeEntity->setPosition(vector3df(0, 30.0f, 100.0f));
u32 oldTime = 0;
while(device->run())
{
driver->beginScene(true, true, SColor(0,100,100,100));
smgr->drawAll();
driver->endScene();
physics.update();
}
}Return to Project Announcements
Users browsing this forum: Adversus and 0 guests