Jump to content
  • Advertisement

donjonson

Member
  • Content Count

    307
  • Joined

  • Last visited

Community Reputation

271 Neutral

About donjonson

  • Rank
    Member
  1. could you explain to me the difference between C++ and C++.net? does the .net have some libraries for networking or something? thanks.
  2. donjonson

    Writing a new RPG game

    Hey fdominek I pm'd you.
  3. donjonson

    I need help creating a static lib

    actually I have done none of those things. The only functions I had in there were named add, sub, mult, div. It had something to do with using debug libs for a release build. I had to ignore the problem libs in the linker options and that fixed it.
  4. thanks that helped me alot!! prettymuch I ignored every lib that was causing a linker error. That allowed it to compile and it runs ok but will that always be the case if I just ignore every "squeaky" lib?
  5. I tried making my own simple test lib and it comlies fine. but when I try to use it I get a bunch of linker errors. I believe it has to do with libraries conflcting with other libs. for example MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj) MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj) LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library why is this happening and how do i fix it? [Edited by - Run_The_Shadows on March 28, 2006 10:17:05 PM]
  6. donjonson

    I need help creating a static lib

    nobody has any clue?
  7. I am going thought this tutorial http://msdn2.microsoft.com/en-us/library/ms235627.aspx I am using VC++ 2005 express I get to the point where I try to build the whole solution and I get the following linker errors. [SOURCE]mathfuncslib.lib(MathFuncsLib.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification msvcprtd.lib(MSVCP80D.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 MyExecRefsLib.obj msvcprtd.lib(MSVCP80D.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 MyExecRefsLib.obj msvcprtd.lib(MSVCP80D.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 MyExecRefsLib.obj msvcprtd.lib(MSVCP80D.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 MyExecRefsLib.obj MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in LIBCMT.lib(stdexcpt.obj) MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) already defined in LIBCMT.lib(stdexcpt.obj) MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj) MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj) LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library[/SOURCE] any Ideas what I have done wrong?
  8. donjonson

    Info

    How exactly have you tried to learn? I suggest getting a good C++ book and just go through it. That is a good way to learn. You will definetly get some C++ training wherever you go for game developement so I wouldn't worrie
  9. Quote:Original post by Dave Hey bud, At first guess i would say that it is because you have a char array of length 256 but are only setting the first element, upon initialisation. Dave actually the following does initialize every element in the array to 0 or whatever you put in the perens. just FYI. :) long chCount[256]= {0};
  10. Thaks for all your help. and yes I am trying to count the characters in the file. and it works perfectly. The error doesn't come until the program reaches literally the end. In debug it breaks after the closing perenthasis of main(). I think you were right when you said that I am trying to put a non char into the chbuf. I changed the section in question to the following and it fixed it. while(!infile.eof()) { chbuf = infile.get(); if(unsigned char(chbuf) <256) chCount[unsigned char(chbuf)]++; } and instead of saying "this is a perfect example of how not to do something. why dont you give the right example. This is the for beginners message board after all. why post here if you not a beginner or not someone who would like to help beginners?
  11. the runtime error I get is Run-Time Check Failure #2 - Stack around the variable 'chChount' was corrupted. I cant see anything wrong with what I am doing here can you? here is my code #include <iostream> #include <string> #include <fstream> using namespace std; int main() { ifstream infile; string buffer; char chbuf; long chCount[256]= {0}; //memset(chCount, 0, 256 * sizeof(int)); cout<<"please entere a filename to analyze: "; getline(cin, buffer); infile.open(buffer.c_str(), ios::in); if(infile.is_open()) { while(!infile.eof()) { chbuf = infile.get(); chCount[chbuf]++; } for(int i =0;i<256;i++) { if(chCount != 0) { cout<<char(i)<<": "<<chCount<<endl; } } infile.close(); } return 0; } [Edited by - donjonson on March 25, 2006 2:02:39 PM]
  12. donjonson

    iomanip setbase(2) question

    is there something in the iomanip library that does do binary?
  13. I am trying to show numbers in binary by using the iomanip::setbase() function in the stream. But its not working. here is what I do. cout<<setbase(2)<<5<<endl; the output is: 5 it should be 101 what am i doing wrong?
  14. donjonson

    building a computer better than buying one?

    I have always built my own rigs because of the advantage in quality of components and price. But homebuilt custom rigs are getting more and more common which is leading the manufacturers to increase the retail price of individual components. 3 years ago there were no $500 graphics cards. I remember when the TI4600 was the best card out and it cost only $300. I believe that soon it will not be any cheaper to build your own rig. The quality factor will still be present though.
  • 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!