IrrWizard?
I'm in the army now (getting pro in programming) so I'm taking a break from it now but when I finish my course I'll have time to work on it again.
P.S
P.S
MasterGod wrote:...Currently (since last week) I'm serving in IDF (Israel Defense Forces) and I'm going through a very intensive programming course (6 days a week, 5 of them from 7:30 AM to 10:00 PM), which will last for 3 months. After that I'm going to serve for another 5.5 years doing programming stuff for my country. I love what I'm doing and it makes me feel good....
Wow, quite a bump, but it's not as if this doesn't deserve a little more spotlight. I have a question that should be easy to solve, but hard to pose.
I quickly discovered that defining classes in one file and everything else in main() created some serious restrictions. A bit of searching brought me to IrrWizard, and it has got to be the most beautiful example of program structure I've seen (not that I've seen too many ). So I went about deconstructing the structure and building it up from scratch to understand it. I hit some serious walls, but using the output of IrrWizard as something of a cheat sheet, I've got it pretty much straightened out.
It's an incredibly bare-bones version, and probably won't even display anything when it runs, but I'm just trying to get all my files in order and compiling first. The thing is they compile happily (a minor miracle in itself) , but I hit just a couple of linker errors. They're your basic 2019s and 2001s, but I'm pretty sure I've included everything I can and have a suspicion it's something specifically to do with all the #including and calling between sources that's giving me trouble.
So here's my linker output:
They're all problems with methods of CGameManager, but I've gone through many times and my version is basically identical to area51's, minus a bunch of features like gui, input, sound, enemies, items, fx... y'know, the minor things
The files I've got are the .h's and .cpp's of CGame, CGameManager, CGameState, CGamePlayState, and CGamePlayStateDefault (the equivalent of Level01), and a main.cpp. Basically everything relevant that appears in their IrrWizard equivalents (no C in filenames) is present, with everything referring to other files removed.
I figure, as with seemingly all linker errors, the first reaction would be to include missing .lib's, but I've got a #pragma comment(lib, "Irrlicht.lib") in main.cpp (as per IW), and the full path to Irrlicht.lib in my linker's additional dependencies, as well as the Irrlicht include directory as an include dependency. Something else to note is that the getDevice() and getDriver() methods that seem to be sources of problems when called from elsewhere are marked as inline, which I have only a passing understanding of and have read has to do with linkers in some situations.
EDIT: Basically, the getDevice() and getDriver() methods of CGameManager are throwing linking errors 2001 or 2019 when called from other classes, HOWEVER this can be resolved by merging the definition and declaration into the header, rather than defining said accessors in the .cpp. However the getSceneManager method works fine, and it's basically identical to getDriver, in that it does the same thing and the scene manager pointer was created the same way as the driver pointer.
[/EDIT]
SO! Long-winded introduction to a (hopefully) pretty simple error. Linkers always confuse the hell out of me, possibly in part because simply factoring code in C++ forces me to think pretty hard . Any idea what to include? Or fix? Need more information?
As a last word, I gotta say again this a beautiful framework, and its taught me more about game structure programming than whatever Google turned up. I can't wait to pick learn JP's IrrPhysx and try and plug that in as a physics manager!
I quickly discovered that defining classes in one file and everything else in main() created some serious restrictions. A bit of searching brought me to IrrWizard, and it has got to be the most beautiful example of program structure I've seen (not that I've seen too many ). So I went about deconstructing the structure and building it up from scratch to understand it. I hit some serious walls, but using the output of IrrWizard as something of a cheat sheet, I've got it pretty much straightened out.
It's an incredibly bare-bones version, and probably won't even display anything when it runs, but I'm just trying to get all my files in order and compiling first. The thing is they compile happily (a minor miracle in itself) , but I hit just a couple of linker errors. They're your basic 2019s and 2001s, but I'm pretty sure I've included everything I can and have a suspicion it's something specifically to do with all the #including and calling between sources that's giving me trouble.
So here's my linker output:
Code: Select all
1>Linking...
1>CGame.obj : error LNK2019: unresolved external symbol "public: class irr::IrrlichtDevice * __thiscall CGameManager::getDevice(void)" (?getDevice@CGameManager@@QAEPAVIrrlichtDevice@irr@@XZ) referenced in function "public: bool __thiscall CGame::Run(void)" (?Run@CGame@@QAE_NXZ)
1>CGamePlayStateDefault.obj : error LNK2001: unresolved external symbol "public: class irr::IrrlichtDevice * __thiscall CGameManager::getDevice(void)" (?getDevice@CGameManager@@QAEPAVIrrlichtDevice@irr@@XZ)
1>CGamePlayStateDefault.obj : error LNK2019: unresolved external symbol "public: class irr::video::IVideoDriver * __thiscall CGameManager::getDriver(void)" (?getDriver@CGameManager@@QAEPAVIVideoDriver@video@irr@@XZ) referenced in function "public: virtual void __thiscall CGamePlayState::Init(class CGameManager *)" (?Init@CGamePlayState@@UAEXPAVCGameManager@@@Z)
1>C:\Users\Oliver\Documents\Visual Studio 2008\Projects\Tango3D\Debug\Tango3D.exe : fatal error LNK1120: 2 unresolved externals
The files I've got are the .h's and .cpp's of CGame, CGameManager, CGameState, CGamePlayState, and CGamePlayStateDefault (the equivalent of Level01), and a main.cpp. Basically everything relevant that appears in their IrrWizard equivalents (no C in filenames) is present, with everything referring to other files removed.
I figure, as with seemingly all linker errors, the first reaction would be to include missing .lib's, but I've got a #pragma comment(lib, "Irrlicht.lib") in main.cpp (as per IW), and the full path to Irrlicht.lib in my linker's additional dependencies, as well as the Irrlicht include directory as an include dependency. Something else to note is that the getDevice() and getDriver() methods that seem to be sources of problems when called from elsewhere are marked as inline, which I have only a passing understanding of and have read has to do with linkers in some situations.
EDIT: Basically, the getDevice() and getDriver() methods of CGameManager are throwing linking errors 2001 or 2019 when called from other classes, HOWEVER this can be resolved by merging the definition and declaration into the header, rather than defining said accessors in the .cpp. However the getSceneManager method works fine, and it's basically identical to getDriver, in that it does the same thing and the scene manager pointer was created the same way as the driver pointer.
[/EDIT]
SO! Long-winded introduction to a (hopefully) pretty simple error. Linkers always confuse the hell out of me, possibly in part because simply factoring code in C++ forces me to think pretty hard . Any idea what to include? Or fix? Need more information?
As a last word, I gotta say again this a beautiful framework, and its taught me more about game structure programming than whatever Google turned up. I can't wait to pick learn JP's IrrPhysx and try and plug that in as a physics manager!
Yes, it is without a doubt one of the best framework to mess around with. I've been tinkering with it a bit myself. If you do make a physics manager, please share with other irrWizard users. It's too bad area never got around to putting in the scripting manager. That would be sweat. I'm working on an FMOD sound manager. I'll share it when I'm done but it's pretty simple.Pie21 wrote:Wow, quite a bump, but it's not as if this doesn't deserve a little more spotlight. I have a question that should be easy to solve, but hard to pose.
...
As a last word, I gotta say again this a beautiful framework, and its taught me more about game structure programming than whatever Google turned up. I can't wait to pick learn JP's IrrPhysx and try and plug that in as a physics manager!
Release the project to use Irrlicht 1.5 ?
Hey guys... you want to generate a release of the project to use Irrlicht 1.5 ?
Re: Release the project to use Irrlicht 1.5 ?
i agree with this man.stash wrote:Hey guys... you want to generate a release of the project to use Irrlicht 1.5 ?
Re: Release the project to use Irrlicht 1.5 ?
- I agree too, I'm working on it, will post any progress I make.outkast wrote:i agree with this man.stash wrote:Hey guys... you want to generate a release of the project to use Irrlicht 1.5 ?
I've just downloaded irrWizard 1.2 and when I want to debug it I have this output:
I'm using visual C++ 2008 and irrlicht 1.5,if that could help
I don't know what's wrong here------ Build started: Project: Testing, Configuration: Debug Win32 ------
Compiling...
GameStateLevel01.cpp
GameState.cpp
c:\irrwizard\myproject\game.h(25) : error C2259: 'CGameManager' : cannot instantiate abstract class
due to following members:
'bool irr::IEventReceiver::OnEvent(const irr::SEvent &)' : is abstract
c:\documents and settings\aryo pandu subagio\my documents\irrlicht-1.5\include\ieventreceiver.h(351) : see declaration of 'irr::IEventReceiver::OnEvent'
GamePlayState.cpp
GameManager.cpp
GameIntroState.cpp
GameCreditsState.cpp
Game.cpp
c:\irrwizard\myproject\game.h(25) : error C2259: 'CGameManager' : cannot instantiate abstract class
due to following members:
'bool irr::IEventReceiver::OnEvent(const irr::SEvent &)' : is abstract
c:\documents and settings\aryo pandu subagio\my documents\irrlicht-1.5\include\ieventreceiver.h(351) : see declaration of 'irr::IEventReceiver::OnEvent'
Generating Code...
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 9.00.30729
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '.\Debug\main.sbr': No such file or directory
Build log was saved at "file://c:\IrrWizard\myProject\Debug\BuildLog.htm"
Testing - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I'm using visual C++ 2008 and irrlicht 1.5,if that could help
error C2259: 'CGameManager' : cannot instantiate abstract class
-> Means that the CGameManager is abstract (there is AT LEAST one pure virtual methode). You can't instantiate an object wich isn't completly defined.
'bool irr::IEventReceiver::OnEvent(const irr::SEvent &)' : is abstract
-> Here is the function wich cause the trouble. Go to see the definition of the CGameManager and you'll probably see an OnEvent(irr::SEvent) methode. Just look at the prototype... Something is wrong. Just add 'const' and the reference '&' in both .h and .cpp and it will be running.
When you have this kind of trouble don't forget to compare the prototype of the implemented interfaces.
-> Means that the CGameManager is abstract (there is AT LEAST one pure virtual methode). You can't instantiate an object wich isn't completly defined.
'bool irr::IEventReceiver::OnEvent(const irr::SEvent &)' : is abstract
-> Here is the function wich cause the trouble. Go to see the definition of the CGameManager and you'll probably see an OnEvent(irr::SEvent) methode. Just look at the prototype... Something is wrong. Just add 'const' and the reference '&' in both .h and .cpp and it will be running.
When you have this kind of trouble don't forget to compare the prototype of the implemented interfaces.
It's only theory. I have the same error as Daggio but i have Code::Blocks so my error log looks that:
Can anybody solve this error
Code: Select all
||=== IrrWizard, default ===|
D:\Maciek\Prace\Programowanie\C++\myProject\source\game\Game.h|25|error: cannot declare field 'CGame::m_GameManager' to be of abstract type 'CGameManager'|
D:\Maciek\Prace\Programowanie\C++\myProject\source\game\..\core\GameManager.h|49|note: because the following virtual functions are pure within 'CGameManager':|
D:\Maciek\Prace\Programowanie\C++\Irrlicht\include\IEventReceiver.h|351|note: virtual bool irr::IEventReceiver::OnEvent(const irr::SEvent&)|
||=== Build finished: 1 errors, 0 warnings ===|
hmm, I was trying to solve this error by editing
Game.h
Game.cpp
...but...
I'm sorry that it's in Polish but it means that it isn't working (app crash)
Maybe it's fault of something else (for example Vista) so I uploaded my full project: http://files.filefront.com/irrWizard15+ ... einfo.html
Game.h
Code: Select all
CGameManager* m_GameManager;
Code: Select all
while(m_GameManager->getDevice()->run())
{
if (m_GameManager->getDevice()->isWindowActive())
{
m_GameManager->getConsole()->Draw();
m_GameManager->Update();
}
}
m_GameManager->getDevice()->drop();
I'm sorry that it's in Polish but it means that it isn't working (app crash)
Maybe it's fault of something else (for example Vista) so I uploaded my full project: http://files.filefront.com/irrWizard15+ ... einfo.html
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
-
- Posts: 42
- Joined: Wed Feb 18, 2009 5:26 am
Hi irrlicht community.
Recently I used Irrwizard framework to make a basic FPS and I discovered some bugs and I implemented some functions that doesn't exist.
(1) Bug:
Free resources and memory problem.
(2)Implementation:
CGameWeaponManager::getTargetsPosition(CGameManager* pManager).
(3) Bug:
When I change weapon and the animation isn't finished if I press ESC I go to menu screen, If I enter again in the level the weapon can't move.
(4) Some others things that I don't remember now.
How can I contribute to IrrWizard??? Is an active community??
Thanks!
Recently I used Irrwizard framework to make a basic FPS and I discovered some bugs and I implemented some functions that doesn't exist.
(1) Bug:
Free resources and memory problem.
(2)Implementation:
CGameWeaponManager::getTargetsPosition(CGameManager* pManager).
(3) Bug:
When I change weapon and the animation isn't finished if I press ESC I go to menu screen, If I enter again in the level the weapon can't move.
(4) Some others things that I don't remember now.
How can I contribute to IrrWizard??? Is an active community??
Thanks!