2.4 在LINUX C++(www.cppentry.com)中运行第一个程序(6)
设置好上述3项内容后,按常规方式在项目中创建cxx、hpp、c++、h等文件,并编写有关代码。这时,在Eclipse各个透视图中能够非常方便地查看项目资源、问题、任务、控制台、大纲等关联内容,并集成进行调试和发布,如图2.14所示。
|
| (点击查看大图)图2.14 采用ECLIPSE HELIOS开发LINUX游戏 |
编写HelloPanda3D.cxx的代码,在集成环境中构建整个项目,控制台运行输出如下:- **** Build of configuration Debug for project HelloPanda3D ****
-
- make all
- Building file: ../HelloPanda3D.cxx
- Invoking: GCC C++(www.cppentry.com) Compiler
- g++ -I/usr/include/python2.6 -I/usr/include/panda3d -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"HelloPanda3D.d" -MT"HelloPanda3D.d" -o"HelloPanda3D.o"
- "../HelloPanda3D.cxx"
- Finished building: ../HelloPanda3D.cxx
-
- Building target: HelloPanda3D
- Invoking: GCC C++(www.cppentry.com) Linker
- g++ -L/usr/lib -L/usr/lib/panda3d -o"HelloPanda3D" ./HelloPanda3D.o -lp3framework
- -lpanda -lpandafx -lpandaexpress -lp3dtoolconfig -lp3dtool -lp3pystub -lp3direct
- Finished building target: HelloPanda3D
在集成环境中运行HelloPanda3D,运行结果与图2.7类似,Linux下动画视频与配书光盘的Ch2目录Python子目录中的HelloPanda3D-05.mp4类似。