Blue Impulse 3DG SDK - How to build?
- How to build libraries/How to compile your programs.
This document explains
- How to build libraries
- How to compile your own programs
for UNIX,GLX and Windows environment.
I cannot follow what's going on CodeWarrior (Macintosh) because it
changes the environment very often. Maybe you can find by reading
manual of CodeWarrior.
And I believe that if you are using FM-TOWNS and you are familiar
with High-C compiler, you should be powerful enough to find out
how to build libraries and how to compile your program. (I hope :-)
For UNIX:
+ Build libraries
- Build libimpulse.a using makefile@impulse/src/xwin/.
- Copy libimpulse.a to the librarh path.
- Copy impulse.h (@impulse/src/) to the include path.
- Build libskyhawk.a using makefile.unx@skyhawk/src/.
- Copy libskyhawk.a to the librarh path.
- Copy skyhawk.h to the include path.
- Modify include path in makefile@hotas/src/emulate/ (CFLAGS=-I____)
- Build libhotas.a using makefile@hotas/src/emulate.
- Copy libhotas.a to the librarh path.
- Copy hotas.h to the include path.
- Modify include path in makefile.unx@aurora/src/ (CFLAGS=-I____)
- Build libaurora.a using makefile.unx@aurora/src/makefile.unx
- Copy libaurora.a to the librarh path.
- Copy aurora.h to the include path.
- Modify include path in makefile.x@impulse/impulse2g/.
- Build libimpulse2g.a using makefile.x@impulse/impulse2g/.
- Copy libimpulse2g.a to the librarh path.
- Copy impulse2g.h to the include path.
(I assume gcc is installed to your system. But, if not, modify
makefile or makefile.unx or makefile.x so that proper
compiler is used).
+ Compile your programs
(1)If you copied all libraries and headers to your compiler's library/include
directory.
gcc (your source) -laurora -lskyhawk -limpulse -lhotas -limpulse2g -X11 -lm
(2)If you don't have root password (and your system administrator is not
helpful... :-)
gcc (your source) -I(your include path) -L(your library path) -laurora -lskyhawk -limpulse -lhotas -limpulse2g -X11 -lm
(You may get an error says some functions are missing. In case, exchange
the order of library files. I don't understand why it happens.)
For GLX:
+ Build libraries
- Build libimpulse.a using makefile@impulse/src/glx/.
- Copy libimpulseglx.a to the librarh path.
- Copy impulse.h (@impulse/src/) to the include path.
Step 4 through 11 are the same as For UNIX.
+Compile your program
(1)If you copied all libraries and headers to your compiler's library/include
directory.
gcc (your source) -laurora -lskyhawk -limpulseglx -limpulse2g -lhotas -lX11 -lXext -lGL -lGLU -lm
(2)If you don't have root password (and your system administrator is not
helpful... :-)
gcc (your source) -L(your library path) -I(your include path) -laurora -lskyhawk -limpulseglx -limpulse2g -lhotas -lX11 -lXext -lGL -lGLU -lm
(You may get an error says some functions are missing. In case, exchange
the order of library files. I don't understand why it happens.)
For Windows:
+Build libraries
Binary files are provided in my Web page. Please use that :-P
All .lib files should be copied to VC++'s standard librarh path.
All .h files should be copied to VC++'s standard include path.
(For VC++5 with standard installation,
Library -> "C:\Program Files\DevStudio\VC\lib"
Include -> "C:\Program Files\DevStudio\VC\include"
+Compiling your program
From MS-DOS prompt (make sure environment variables are set).
cl /D "WIN32" /D "_WINDOWS" (your source) impls32d.lib impulse2g.lib hotas32.lib aurora32.lib shawk32.lib kernel32.lib user32.lib gdi32.lib
From Developer Studio
- Copy hotasrc.rc and hotasrc.ico to your project directory.
- Create a new project (Console Application or Windows Application).
- Add your source files and hotasrc.rc to your project.
- Add following libraries in link setting
impls32d.lib impulse2g.lib hotas32.lib aurora32.lib shawk32.lib
- Build it.
(* For OpenGL implementation, impls32d.lib should read impls32o.lib.
Also opengl32.lib and glu32.lib should be added).