Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: cant get debug to work  (Read 5502 times)

0 Members and 2 Guests are viewing this topic.

bucknasty189

  • Newbie
  • *
  • Posts: 23
    • View Profile
cant get debug to work
« on: May 23, 2011, 06:57:37 am »
I've been coding in release mode just fine. How do I setup debug mode? I'm getting errors no matter what I do.

I get two of these errors
fatal error C1033: cannot open program database 'c:\blahblah\debug\vc90.pdb'
Knowledge Speaks,
Wisdom Listens
                       -JH

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
cant get debug to work
« Reply #1 on: May 23, 2011, 07:39:36 am »
Click "Rebuild all".
Laurent Gomila - SFML developer

bucknasty189

  • Newbie
  • *
  • Posts: 23
    • View Profile
cant get debug to work
« Reply #2 on: May 23, 2011, 08:07:44 am »
Thanks, but now tons of linker errors.

unresolved external symbol for various sf::somethings
all have __declsspec(dllimport)
Knowledge Speaks,
Wisdom Listens
                       -JH

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
cant get debug to work
« Reply #3 on: May 23, 2011, 08:08:41 am »
You must link to the same libraries that you link in release mode.
Laurent Gomila - SFML developer

bucknasty189

  • Newbie
  • *
  • Posts: 23
    • View Profile
cant get debug to work
« Reply #4 on: May 23, 2011, 08:16:07 am »
First I got the the program database errors again.
Then after a clean and another build I got those unresolved errors again.
By rebuild all you mean batch build correct?

I'm in 1.6 btw sorry
Knowledge Speaks,
Wisdom Listens
                       -JH

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
cant get debug to work
« Reply #5 on: May 23, 2011, 08:41:11 am »
Quote
By rebuild all you mean batch build correct?

No, I really mean "rebuild all". Which is just a shortcut for "Clean" + "Build all".

And if you want more detailed help, please provide more details about your errors ;)
Laurent Gomila - SFML developer

bucknasty189

  • Newbie
  • *
  • Posts: 23
    • View Profile
cant get debug to work
« Reply #6 on: May 23, 2011, 05:41:48 pm »
Ok, heres the error list.


Error   4   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   shotgun.obj
Error   9   error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseX(void)const " (__imp_?GetMouseX@Input@sf@@QBEHXZ) referenced in function "public: class std::_Iterator_base & __thiscall std::_Iterator_base::operator=(class std::_Iterator_base const &)" (??4_Iterator_base@std@@QAEAAV01@ABV01@@Z)   shotgun.obj
Error   14   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseY(void)const " (__imp_?GetMouseY@Input@sf@@QBEHXZ)   shotgun.obj
Error   29   error LNK2001: unresolved external symbol "__declspec(dllimport) public: float __thiscall sf::Window::GetFrameTime(void)const " (__imp_?GetFrameTime@Window@sf@@QBEMXZ)   projectile.obj
Error   3   error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ) referenced in function "public: void __thiscall DE::PlayerEntity::Update(class DE::cGameEngine *,class sf::Sprite *)" (?Update@PlayerEntity@DE@@QAEXPAVcGameEngine@2@PAVSprite@sf@@@Z)   PlayerEntity.obj
Error   26   error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Input::IsMouseButtonDown(enum sf::Mouse::Button)const " (__imp_?IsMouseButtonDown@Input@sf@@QBE_NW4Button@Mouse@2@@Z) referenced in function "public: void __thiscall DE::PlayerEntity::Update(class DE::cGameEngine *,class sf::Sprite *)" (?Update@PlayerEntity@DE@@QAEXPAVcGameEngine@2@PAVSprite@sf@@@Z)   PlayerEntity.obj
Error   27   error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Input::IsKeyDown(enum sf::Key::Code)const " (__imp_?IsKeyDown@Input@sf@@QBE_NW4Code@Key@2@@Z) referenced in function "public: void __thiscall DE::PlayerEntity::Update(class DE::cGameEngine *,class sf::Sprite *)" (?Update@PlayerEntity@DE@@QAEXPAVcGameEngine@2@PAVSprite@sf@@@Z)   PlayerEntity.obj
Error   28   error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall sf::Window::GetFrameTime(void)const " (__imp_?GetFrameTime@Window@sf@@QBEMXZ) referenced in function "public: void __thiscall DE::PlayerEntity::Update(class DE::cGameEngine *,class sf::Sprite *)" (?Update@PlayerEntity@DE@@QAEXPAVcGameEngine@2@PAVSprite@sf@@@Z)   PlayerEntity.obj
Error   8   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   OptionsState.obj
Error   12   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseX(void)const " (__imp_?GetMouseX@Input@sf@@QBEHXZ)   OptionsState.obj
Error   17   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseY(void)const " (__imp_?GetMouseY@Input@sf@@QBEHXZ)   OptionsState.obj
Error   7   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   MenuState.obj
Error   11   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseX(void)const " (__imp_?GetMouseX@Input@sf@@QBEHXZ)   MenuState.obj
Error   16   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseY(void)const " (__imp_?GetMouseY@Input@sf@@QBEHXZ)   MenuState.obj
Error   6   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   MapState.obj
Error   10   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseX(void)const " (__imp_?GetMouseX@Input@sf@@QBEHXZ)   MapState.obj
Error   15   error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseY(void)const " (__imp_?GetMouseY@Input@sf@@QBEHXZ) referenced in function "public: virtual void __thiscall DE::MapState::HandleEvents(class sf::Event &)" (?HandleEvents@MapState@DE@@UAEXAAVEvent@sf@@@Z)   MapState.obj
Error   1   error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::ShowMouseCursor(bool)" (__imp_?ShowMouseCursor@Window@sf@@QAEX_N@Z) referenced in function "public: __thiscall DE::LevelState::LevelState(class DE::cGameEngine *)" (??0LevelState@DE@@QAE@PAVcGameEngine@1@@Z)   LevelState.obj
Error   5   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   LevelState.obj
Error   30   fatal error LNK1120: 14 unresolved externals   C:\Users\JT\Dropbox\$MyLocalRepo\DefianceEngine\Debug\CivilDefiance.exe
Error   2   error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (__imp_?GetInput@Window@sf@@QBEABVInput@2@XZ)   cGameEngine.obj
Error   13   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseX(void)const " (__imp_?GetMouseX@Input@sf@@QBEHXZ)   cGameEngine.obj
Error   18   error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall sf::Input::GetMouseY(void)const " (__imp_?GetMouseY@Input@sf@@QBEHXZ)   cGameEngine.obj
Error   19   error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function "public: __thiscall DE::cGameEngine::cGameEngine(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0cGameEngine@DE@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)   cGameEngine.obj
Error   20   error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::UseVerticalSync(bool)" (__imp_?UseVerticalSync@Window@sf@@QAEX_N@Z) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Init(void)" (?Init@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj
Error   21   error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Create(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (__imp_?Create@Window@sf@@QAEXVVideoMode@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@2@@Z) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Init(void)" (?Init@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj
Error   22   error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Loop(void)" (?Loop@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj
Error   23   error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (__imp_?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Loop(void)" (?Loop@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj
Error   24   error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::IsOpened(void)const " (__imp_?IsOpened@Window@sf@@QBE_NXZ) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Loop(void)" (?Loop@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj
Error   25   error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Close(void)" (__imp_?Close@Window@sf@@QAEXXZ) referenced in function "protected: virtual void __thiscall DE::cGameEngine::Cleanup(void)" (?Cleanup@cGameEngine@DE@@MAEXXZ)   cGameEngine.obj

Overall unresolved externals is my problem. You still need SFML_DYNAMIC when debugging correct? I don't see an actual Rebuild All (using vs9), but get the same errors when cleaning and then rebuilding the solution.
Knowledge Speaks,
Wisdom Listens
                       -JH

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
cant get debug to work
« Reply #7 on: May 23, 2011, 05:43:15 pm »
Do you link to sfml-window?
Laurent Gomila - SFML developer

bucknasty189

  • Newbie
  • *
  • Posts: 23
    • View Profile
cant get debug to work
« Reply #8 on: May 23, 2011, 06:08:02 pm »
:shock: :oops:
Thank you. Sorry for my stupidity :lol:
Knowledge Speaks,
Wisdom Listens
                       -JH

bucknasty189

  • Newbie
  • *
  • Posts: 23
    • View Profile
cant get debug to work
« Reply #9 on: May 23, 2011, 06:43:08 pm »
I'm having a lot of problems in debug mode now that I haven't had in release. Should I be using the debug libraries?
Knowledge Speaks,
Wisdom Listens
                       -JH

bucknasty189

  • Newbie
  • *
  • Posts: 23
    • View Profile
cant get debug to work
« Reply #10 on: May 23, 2011, 07:30:14 pm »
Guessing so cause its working great with them.
Knowledge Speaks,
Wisdom Listens
                       -JH

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
cant get debug to work
« Reply #11 on: May 23, 2011, 10:54:13 pm »
Debug and release are not compatible with each other with VC++.
Laurent Gomila - SFML developer

bucknasty189

  • Newbie
  • *
  • Posts: 23
    • View Profile
cant get debug to work
« Reply #12 on: June 11, 2011, 01:05:00 am »
Debug and release are working fine now. I was working on something unrelated in class today and I got those pdb errors. My professor told me that having two instances of visual studio open can cause problems with debugging. I think this was the problem I was having.
Knowledge Speaks,
Wisdom Listens
                       -JH

 

anything