Modified GCC3 Source code

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Modified GCC3 Source code

      I had some trouble trying to get the code to work and someone from gamedev.net helped me out and got it working with some modifications to the source code. It isn't perfect but I am able to run Teapotwars. Only the editor won't build due to these errors:

      Error 1 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) C:\Users\David\Desktop\New folder (2)\gamecode3\Source\Editor\libboost_thread-vc90-mt-s-1_37.lib(thread.obj) Editor
      Error 2 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) C:\Users\David\Desktop\New folder (2)\gamecode3\Source\Editor\libboost_thread-vc90-mt-s-1_37.lib(thread.obj) Editor
      Error 3 error LNK1120: 2 unresolved externals C:\Users\David\Desktop\New folder (2)\gamecode3\Bin\Editor.dll 1 1 Editor

      I checked and that file is in the libs folder in boost so not sure as to how fix those errors. Also I will get a popup when closing TeapotWars which says:

      The Direct3D device has a non-zero reference count, meaning some objects were not released.

      I'm guessing that is a memory leak, correct? (Sorry, still somewhat new).

      Anyways, here is a link to the modified source code if anyone would like to take a look at that and possibly find a fix for those two issues.

      dl.dropbox.com/u/6991288/gamecode3.zip
    • Hi,

      which version of Visual Studio are you using? Probably there's version mismatch between the version of the Boost library and the version of the C++ runtime library on your system (if that's the case you have to re-build the affected Boost libraries - but version 1.37 is pretty old and I don't know if you can build it on newer VS versions).
      I do know that GCC3 compiles on VS05 and VS08 and you'll find some fixes in the testing branch on our Google Code page and pre-built library for both VS versions.

      Also check the old threads in this forum they cover some bugs (and fixes or at least why the bug occurs) that were not yet fixed in the testing branch (or the trunk). Unfortunately none of us has currently the time to do so, but if anybody posts some patches here I'll gladly check them in :)


      Yes there are some non-released references, but afaik there's not yet a fix available for that.



      Turing.

      The post was edited 1 time, last by Turing ().

    • It takes forever but you can always recompile boost - that will work 100%.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Same problem here..
      I just downloaded the modified source for VS2010 and off course works better than the unmodified edition.BUT:

      When i try to Build Editor i get this output:

      1>------ Build started: Project: Editor, Configuration: Release Win32 ------
      1>Build started 6/7/2010 6:35:15 ¼¼.
      1>InitializeBuildStatus:
      1> Touching "..\..\Obj\Release\Editor\Editor.unsuccessfulbuild".
      1>ClCompile:
      1> All outputs are up-to-date.
      1>ResourceCompile:
      1> All outputs are up-to-date.
      1>Link:
      1> Creating library ..\..\Bin\Editor.lib and object ..\..\Bin\Editor.exp
      1>libboost_thread-vc90-mt-s-1_37.lib(thread.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)
      1>libboost_thread-vc90-mt-s-1_37.lib(thread.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)
      1>..\..\Bin\Editor.dll : fatal error LNK1120: 2 unresolved externals
      1>
      1>Build FAILED.
      1>
      1>Time Elapsed 00:00:00.46
      ========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========




      And when i try to Build EditorApp i get this:


      1>------ Build started: Project: Editor, Configuration: Release Win32 ------
      1>Build started 6/7/2010 6:37:27 ¼¼.
      1>InitializeBuildStatus:
      1> Touching "..\..\Obj\Release\Editor\Editor.unsuccessfulbuild".
      1>ClCompile:
      1> All outputs are up-to-date.
      1>ResourceCompile:
      1> All outputs are up-to-date.
      1>Link:
      1> Creating library ..\..\Bin\Editor.lib and object ..\..\Bin\Editor.exp
      1>libboost_thread-vc90-mt-s-1_37.lib(thread.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)
      1>libboost_thread-vc90-mt-s-1_37.lib(thread.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)
      1>..\..\Bin\Editor.dll : fatal error LNK1120: 2 unresolved externals
      1>
      1>Build FAILED.
      1>
      1>Time Elapsed 00:00:00.41
      2>------ Build started: Project: EditorApp, Configuration: Release Any CPU ------
      2>Build started 6/7/2010 6:37:28 ¼¼.
      2>CoreResGen:
      2> All outputs are up-to-date.
      2>_CopyAppConfigFile:
      2>Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
      2>CopyFilesToOutputDirectory:
      2> EditorApp -> D:\John\graphics\gamecode3_modified\bin\EditorApp.exe
      2>
      2>Build succeeded.
      2>
      2>Time Elapsed 00:00:00.02
      ========== Build: 1 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========


      In addition when i try to start debugging i get this windowed message:

      Unable to start program
      path\...\Source\..\Libs\GameCode3.lib
      The specified file is an unrecognized or unsupported binary format.


      please give some help..
      We have the hole book and we can't work on the source code..!We can't learn without compiling the code!It is difficult to learn only from the book!Release a new edition of the source code or give us some support
    • RE: Modified GCC3 Source code

      Originally posted by Striker
      I had some trouble trying to get the code to work and someone from gamedev.net helped me out and got it working with some modifications to the source code. It isn't perfect but I am able to run Teapotwars. Only the editor won't build due to these errors:

      Error 1 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) C:\Users\David\Desktop\New folder (2)\gamecode3\Source\Editor\libboost_thread-vc90-mt-s-1_37.lib(thread.obj) Editor
      Error 2 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) C:\Users\David\Desktop\New folder (2)\gamecode3\Source\Editor\libboost_thread-vc90-mt-s-1_37.lib(thread.obj) Editor
      Error 3 error LNK1120: 2 unresolved externals C:\Users\David\Desktop\New folder (2)\gamecode3\Bin\Editor.dll 1 1 Editor

      I checked and that file is in the libs folder in boost so not sure as to how fix those errors. Also I will get a popup when closing TeapotWars which says:

      The Direct3D device has a non-zero reference count, meaning some objects were not released.

      I'm guessing that is a memory leak, correct? (Sorry, still somewhat new).

      Anyways, here is a link to the modified source code if anyone would like to take a look at that and possibly find a fix for those two issues.

      dl.dropbox.com/u/6991288/gamecode3.zip


      If you check out the output instead of the errors tab, you'll notice this:

      "4>libboost_thread-vc90-mt-s-1_37.lib(thread.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)
      "

      Honestly, i'm new to C++, Boost, etc. But im guessing our error (i downloaded the modded code for vs 2010 too) is due to a difference in Boost libs. They seem to be compiled for (and by) vs 2008 (90 or 9.0).

      I could not find a link to 2010 compiled Boost on the page provided by @Turing, so i will try the "compile yourself" approach.

      I'll let you know when i'm done, i'm at work right now.

      Cheers,

      Alex.
    • Compiling Boost

      You can get the boost c++ source code at boost.org and use the command line interface to compile it, it is surprisingly easy to compile, it just takes a bit of time. I am using boost 1.46.1, which is the latest version. Use the MS VS compiler-ready version of the source if you use VS 2010, and it will automatically use the correct compiler. Good luck with your compiling.