So, we need to setup an IDE for the following game dev. Here is the setup guide. We base on Eclipse IDE for C/C++.
1. Using mingw32 gcc compilier.
- Download the installer at (http://sourceforge.net/projects/mingw/) and install it.
- Set the environment variable "PATH" with "C:\MinGW\bin\;" and "C:\MinGW\libexec\gcc\mingw32\3.4.5\. The version number for the latter path should be the most update one, for e.g. if you download 4.2.3, the path should be C:\MinGW\libexec\gcc\mingw32\4.2.3.
2. Download and install Eclipse C/C++ developers IDE. http://www.eclipse.org/downloads/
3. Download Irrlicht SDK and extract whereever you want locally. The latest release is 1.7.2 : http://downloads.sourceforge.net/irrlicht/irrlicht-1.7.2.zip.
4. Build a 3D demo
To create an irrlicht-ready project in eclipse:
- create a new C++ project and name it: File > New > C++ Project (to have it setup folders and a source file for you choose: Executable > Hello World C++ Project)
- go to: Project > Properties > C/C++ Build > Settings > GCC C++ Compiler > Directories
- add the irrlicht inlude path: C:\irrlicht\irrlicht-1.4\include
- go to: Project > Properties > C/C++ Build > Settings > MinGW C++ Linker > Libraries
- add "C:\irrlicht\irrlicht-1.4\lib\Win32-gcc" to the Library search paths
- add "Irrlicht" to the Libraries (this will point to the gcc library file "libIrrlicht.a")
- copy Irrlicht.dll from C:\irrlicht\irrlicht-1.4\bin\Win32-gcc\ to same dir as your project exe (e.g. ...\workspace\project\debug\)
5. Paste in some irrlicht sample code "main.c" (e.g. ..\irrlicht-1.7.2\examples\01.HelloWorld) but comment out the #pragma comment(lib, "Irrlicht.lib") line. GCC doesn't like it for some reason and the irrlicht library is already set to be linked.
6. Select Project > Build Project.
7. Finally, select Run > Run.
- create a new C++ project and name it: File > New > C++ Project (to have it setup folders and a source file for you choose: Executable > Hello World C++ Project)
- go to: Project > Properties > C/C++ Build > Settings > GCC C++ Compiler > Directories
- add the irrlicht inlude path: C:\irrlicht\irrlicht-1.4\include
- go to: Project > Properties > C/C++ Build > Settings > MinGW C++ Linker > Libraries
- add "C:\irrlicht\irrlicht-1.4\lib\Win32-gcc" to the Library search paths
- add "Irrlicht" to the Libraries (this will point to the gcc library file "libIrrlicht.a")
- copy Irrlicht.dll from C:\irrlicht\irrlicht-1.4\bin\Win32-gcc\ to same dir as your project exe (e.g. ...\workspace\project\debug\)
5. Paste in some irrlicht sample code "main.c" (e.g. ..\irrlicht-1.7.2\examples\01.HelloWorld) but comment out the #pragma comment(lib, "Irrlicht.lib") line. GCC doesn't like it for some reason and the irrlicht library is already set to be linked.
6. Select Project > Build Project.
7. Finally, select Run > Run.
The snapshot shown below is the first helloWorld demo from Irrlicht SDK's example package.
2 則留言:
有興趣有時間就玩埋呢個la
http://www.andengine.org/forums/
Hey, Ivan, how's you recently? Still working in the chip design company?
Thanks for your info, I would take a look on that~~~ Did you try it anyway or doing somethings interesting iphone or android stuffs? See ya~
發佈留言