Guide to compile SVN ogreNewt Demos W/O CMake

marc_antoine

14-11-2009 06:36:25

Ok, this would be like the second thing to do after the first guide I wrote “Guide To compile OgreNewt 2” (http://www.ogre3d.org/addonforums/viewtopic.php?f=4&t=11510) where westPointer helped a lot pointing some issues he got and posting his solutions.. ..
This guide is focused to compile the Demos without CMake so you have a more real grasp of how to setup your projects which already have a lot of code in it.
Note: everything I’ve done is based in the following specs:

* Ogre SDK 1.62
* Newton SDK 2.10
* OgreNewt 2 SVN version
* VC++ Express 2008


And prior to even start with this guide please make sure you have successfully compiled the ogreNewt libs and dll’s ok now let’s get started.

1.-Creating an empty project
2.-Adding the SVN demos
3.-creating the project for each demo
4.-configuring VC++ Express
5.-Configuring the project


1.-Creating an empty project
Because VC++ express 2008 doesn’t allow you to create an empty solution, we have to create an empty project, shame on you Microsoft!..lol, ok first create an empty win32 project, i created mine in "c:\" with the name "ogreNewtonDemos” and checked the option "create Directory for solution" then hit "ok"

now you'll be presented to choose the type of project and some additional options, please select "windows application" and "Empty Project", then hit the "Finish Botton"

In the Solution Explorer you will have a project named “ogreNewtonDemos” right click it and from the popup menu, select “Remove”, from the confirmation dialogue select “OK” and then click in the “Save All” icon of the toolbar.

Now go to the solution Directory and inside you'll find another folder with the name of project e have just removed fromt he solution, please delete it.

2.-Adding the SVN demos
From the ogreNewt SVN folder you checked out look for the demos folder, inside you will find folders for each demo, a folder named “media” and a folder named “tinyxml” in total you should copy 10 folders into the solution Directory.

3.-creating the project for each demo

I know this seems like too much work to do, but I think it is the most didactical way of doing it hehe at least without CMake… .. ok now.
In the solution Explorer "right click" the solution name and choose "add new Project" and give it the exact name that has the folder for the Demo, I.E Demo #1 has the name “Demo01_TheBasics”, name like this the project and hit “OK”, then hit “Next” to set it as a windows application and as an empty project finally click on finish.

In the solution explorer toggle the "show all files" option, and you will see the source code for the demo.. select all the files except for “CMakeLists.txt” and then right click over the selected files, choose the option “include in the project” and toggle off the option to show all files.

4.-configuring VC++ Express
I like to do this in the IDE options, because if you are creating test projects or something with ogre newt, instead of setting them in the project everytime you set them once in the IDE so this is up to you.. for this guide I’m going to set them in the IDE properties so go to:
Tools-->Options-->Project Solutions-->VC++ Directories
You’ll be displayed with some settings at your right hand, in the upper right corner there is a label with the title “Show Directories For” and a comboBox, we are interested in 3 options from there:
Include files
Library files
Source files


For each option add the path to the corresponding files here is my configuration:
Include paths:
C:\Newton_Physics\ogreNewt20\inc
C:\Newton_Physics\newton210\sdk
C:\Newton_Physics\boost_1_40_0\boost_1_40_0
c:\OgreSDK\samples\include
c:\OgreSDK\include
Lib Paths:
C:\Newton_Physics\ogreNewt20Build\Release or C:\Newton_Physics\ogreNewt20Build\Debug, depending on your configuration.
C:\Newton_Physics\newton210\sdk\x32\dll_vs9
C:\Newton_Physics\ogreNewt20\src
c:\OgreSDK\lib

Source Paths
C:\Newton_Physics\ogreNewt20\src


5.-Configuring the project

Finally to configure the project, we only hav to add the libs we are going to use in the project, for this we need to go to "project properties"-->"Configuration Properties"-->"Linker"-->"input" -->"Additional Dependencies" and add the following lib´s: OgreMain.lib OIS.lib OgreNewt.lib newton.lib

Now compile the solution or the project, and that’s it.. ..
1>Linking...
1>Generating code
1>Finished generating code
1>Embedding manifest...
1>Build log was saved at "file://c:\ogreNewtonDemos\Demo01_TheBasics\Release\BuildLog.htm"
1>Demo01_TheBasics - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Remember to copy the newton and ogrenewt dll’s, to point the resources.cfg to the media directory we copied from the SVN and to copy the files from the Release or Debug (depending of the kind of compilation you are doing) of the OGRE SDK, since wee need those dll's and stuff... basically by this point you should know how to setup the resources the app needs.....


to add the next demo to our solution we repeat steps 3 and 5, and that's it..for some demos you should add some other libraries i.E CEGUI, hope this gives you a general idea of how or where to add the libraries and stuff needed by newton and ogreNewt.... suggestions and ideas to add into the guide are welcome.

cheers.!!

here is a screenshot of the Demo in action.
[attachment=0]Demo01_The Basics.jpg[/attachment]

prchakal

14-11-2009 14:05:49

Hi marc_antoine,

I follow this tutorial but when linking i get the error:

1>------ Rebuild All started: Project: demo01, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'demo01', configuration 'Debug|Win32'
1>Compiling...
1>demo01.cpp
1>OgreNewtonApplication.cpp
1>OgreNewtonFrameListener.cpp
1>Generating Code...
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) already defined in OgreNewt.lib(OgreNewt_World.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in OgreNewt.lib(OgreNewt_World.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "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> >::operator=(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) already defined in OgreNewt.lib(OgreNewt_Tools.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z) already defined in OgreNewt.lib(OgreNewt_Tools.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in OgreNewt.lib(OgreNewt_World.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::`vbase destructor'(void)" (??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ) already defined in OgreNewt.lib(OgreNewt_Debugger.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(void)const " (?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ) already defined in OgreNewt.lib(OgreNewt_Debugger.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(int)" (??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z) already defined in OgreNewt.lib(OgreNewt_Debugger.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in OgreNewt.lib(OgreNewt_World.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z) already defined in OgreNewt.lib(OgreNewt_Tools.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "protected: char * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Myptr(void)" (?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEPADXZ) already defined in OgreNewt.lib(OgreNewt_World.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(int)" (?width@ios_base@std@@QAEHH@Z) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) already defined in OgreNewt.lib(OgreNewt_Debugger.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static bool __cdecl std::char_traits<char>::eq_int_type(int const &,int const &)" (?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static int __cdecl std::char_traits<char>::eof(void)" (?eof@?$char_traits@D@std@@SAHXZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@QBEHXZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static unsigned int __cdecl std::char_traits<char>::length(char const *)" (?length@?$char_traits@D@std@@SAIPBD@Z) already defined in OgreNewt.lib(OgreNewt_World.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::tie(void)const " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" (?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" (?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in OgreNewt.lib(OgreNewt_Body.obj)
1>libcpmt.lib(locale0.obj) : error LNK2005: "void __cdecl _AtModuleExit(void (__cdecl*)(void))" (?_AtModuleExit@@YAXP6AXXZ@Z) already defined in msvcprtd.lib(locale0_implib.obj)
1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: __Fac_tidy already defined in msvcprtd.lib(locale0_implib.obj)
1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static void __cdecl std::locale::facet::facet_Register(class std::locale::facet *)" (?facet_Register@facet@locale@std@@CAXPAV123@@Z) already defined in msvcprtd.lib(locale0_implib.obj)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "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> >::operator=(char const *)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(ios.obj) : error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(ios.obj) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP90D.dll)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>D:\Downloads\Cpp\ogre\newt\ogrenewt\demos\Demo01_TheBasics\demo01\Debug\demo01.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://d:\Downloads\Cpp\ogre\newt\ogrenewt\demos\Demo01_TheBasics\demo01\demo01\Debug\BuildLog.htm"
1>demo01 - 63 error(s), 2 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========



Do you have a DLL and LIB compiled on windows and visual studio 2008 to send me? :(

marc_antoine

14-11-2009 14:46:55

so i must understand you never got to cimpile the ogreNewt dll and lib ??... well here i post you the Debug and Release dll's and Libs. hope this help you as you already know they are compiled with:

ogre 1.62
vc++ Express edition 2008
ongreNewton SVN version
newton SDK 2.10

Debug
http://www.mediafire.com/?aev2izggmuj

Release
http://www.mediafire.com/?m2tgivetzmw

prchakal

14-11-2009 14:54:21

Man,

I have now compiled my project on RELEASE version and it compile NORMAL without the bug, but when i change to DEBUG i get that error :(

What can be it?

marc_antoine

14-11-2009 15:02:51

looks you have extra settings for the Debug configuration , can you upload your VS solution?, maybe i could check it out if you want..

prchakal

14-11-2009 15:30:54

Sure, you can download at:

http://www.prsolucoes.com/downloads/zombieIsland_newton.zip

The problem in only on debug version, im looking if i have setted anything different but i think no...dont see anything different, but you look please too see what i can have done incorrect on debug :(

marc_antoine

14-11-2009 17:17:59

actually you are doing things right , lol, this seems to be a problem related to the creation of the Debug lib and dll files of ogreNewt, i tested the demo01, and a got this errors:


1>------ Build started: Project: Demo01_TheBasics, Configuration: Debug Win32 ------
1>Linking...
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>OgreNewtonApplication.obj : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: char const & __thiscall std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> >::operator*(void)const " (??D?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDXZ)
1>OgreNewtonFrameListener.obj : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __malloc_dbg
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __free_dbg
1>libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol __calloc_dbg referenced in function __Getctype


as i said before i have the feeling there is something wrong in the creation of the ogrenewt dll and lib for debug..and yes in Release mode it does compile and lik just fine!!!.... i'll try to investigate about this in some free time i got from work to see if i can figure it out. :S.. a but if someone knows a solution to this please post it !!!..

marc_antoine

15-11-2009 18:56:25

prchakal,
i created a new guide to compile the dll and lib for release and Debug, and tested them compiling yor project and got it to compile :) check it out
http://www.ogre3d.org/addonforums/viewtopic.php?f=4&t=11510&start=0

but i have also uploaded a rar, that contains the compiled libs and dll's , release and debug versions :), tell if that helped you, the only change is that you have to set your project to be compiled as:

in Release: multithreaded Dll (/MD)
in Debug:multithreade Debug Dll (/MDd)

link: http://www.filefactory.com/file/a19db88/n/ogreNewt2_lib_dll.rar

cheers!