Advertisement Jump to content
  • Advertisement

Tera_Dragon

Member
  • Content Count

    745
  • Joined

  • Last visited

Community Reputation

260 Neutral

About Tera_Dragon

  • Rank
    Advanced Member
  1. Tera_Dragon

    Noob in Distress!

    The second problem shouldn't be an error, but a warning. You can either ignore it or cast the return of time() to unsigned int: srand( (unsigned int)time(0) ); Also counter += 1; can be replaced by counter++; [smile]
  2. Tera_Dragon

    NeHe lessons 1-10

    I thought the same thing when I first read those tutorials. Though keep at it and it and you will understand in the end.
  3. Tera_Dragon

    Continue

    oops, sorry. My mistake.
  4. Tera_Dragon

    Continue

    I just tried it and it first prints 1, then repeatedly prints 234234... It never reaches 5 because the continue statement causes the loop to move onto the next loop early. It continuously loops because putchar('2') must be returning a non-null int.
  5. Tera_Dragon

    std::string errors in release mode

    I was including a .lib file built in debug mode. The lib had included <string> and it looks like that was causing the error. I built a release version of the lib and it solved the problem. Is there a way to declare a class that is in a different namespace so that you don't have to include the header?
  6. Tera_Dragon

    std::string errors in release mode

    I just realized that I'm including <string> in a debug version of a lib, I'll check now to see if that's the reason.
  7. When building in release mode I get the run time error: "Microsoft Visual Studio C Runtime Library has detected a fatal error in Blank.exe." for the code std::string str = "string"; What's going on here?
  8. Tera_Dragon

    char* to string conversion

    Can't you just use std::string str(pCharArray); or std::string str = pCharArray;
  9. Tera_Dragon

    c++ virtual function question

    Sounds to me as though that would be just as slow (maybe more so) than just calling a virtual method.
  10. I think that error means that you are trying to call an object's method with a pointer, but the pointer does not point to an object. You'll need to use the debugger to find out where and why this is happening. If it's not meant to be pointing to anything sometimes, then you can check easily: if ( pointer ) pointer->method();
  11. That shouldn't effect the building of the project. You could just disable that warning message.
  12. Tera_Dragon

    libcmtd.lib linker errors

    Multi-threaded Debug DLL
  13. Tera_Dragon

    libcmtd.lib linker errors

    I set /NODEFAULTLIB as it said to in the warning: MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library But now I'm getting a couple of hundred linkers errors, that as far as I can see shouldn't be there, such as: TextureManager.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) TextureManager.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) Error 105 error LNK2001: unresolved external symbol "__declspec(dllimport) 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)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) TextureManager.obj I'm including <string>. What does /NODEFAULTLIB do?
  14. My project was building perfectly, but after I changed a numeric value (just player velocity) I started getting linker errors. These errors seem to have started for absolutely no reason. Linking... libcmtd.lib(fpinit.obj) : error LNK2005: __fltused already defined in a previous module libcmtd.lib(fpinit.obj) : error LNK2005: __ldused already defined in a previous module libcmtd.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj) libcmtd.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj) libcmtd.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj) libcmtd.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj) libcmtd.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(vsprintf.obj) : error LNK2005: _vsprintf already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR80D.dll) libcmtd.lib(ismbbyte.obj) : error LNK2005: __ismbblead already defined in MSVCRTD.lib(MSVCR80D.dll) LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library libcmtd.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup I think this has happened in the past, but they seemed completely random and I gave up in the end.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!