|
Packit |
4a5d52 |
Using libIDL for Win32
|
|
Packit |
4a5d52 |
~~~~~~~~~~~~~~~~~~~~~~
|
|
Packit |
4a5d52 |
|
|
Packit |
4a5d52 |
Win32 libIDL support is mostly here, but currently requires the use of
|
|
Packit |
4a5d52 |
IDL_parse_filename_with_input, since there is no C preprocessor
|
|
Packit |
4a5d52 |
generally available under Windows. To compile this, you will also need
|
|
Packit |
4a5d52 |
to obtain GLib and pkg-config for Windows, which you should be able to
|
|
Packit |
4a5d52 |
obtain from http://www.gtk.org/download-windows.html
|
|
Packit |
4a5d52 |
|
|
Packit |
4a5d52 |
Building
|
|
Packit |
4a5d52 |
~~~~~~~~
|
|
Packit |
4a5d52 |
|
|
Packit |
4a5d52 |
You can build either with the GNU toolchain (mingw) or one of
|
|
Packit |
4a5d52 |
Microsoft's compiler (any recent version should work). With mingw you
|
|
Packit |
4a5d52 |
use the normal configure script and make. pkg-config is used in the
|
|
Packit |
4a5d52 |
normal way to find out the compiler command-line options.
|
|
Packit |
4a5d52 |
|
|
Packit |
4a5d52 |
With Microsoft's compiler you run nmake -f Makefile.msc. Also the
|
|
Packit |
4a5d52 |
Makefile.msc uses pkg-config to find out the compiler flags. The
|
|
Packit |
4a5d52 |
commands to use pkg-config output in the Makefile.msc are somewhat
|
|
Packit |
4a5d52 |
convoluted, but nothing simpler seems to work, given the lack of
|
|
Packit |
4a5d52 |
backticks in cmd.exe or something similar in nmake. If you use an
|
|
Packit |
4a5d52 |
older Microsoft compiler you will have to edit out the
|
|
Packit |
4a5d52 |
manifest-related commands from Makefile.msc.
|
|
Packit |
4a5d52 |
|
|
Packit |
4a5d52 |
When built with gcc libIDL will also use gcc as a preprocessor (it
|
|
Packit |
4a5d52 |
will run "gcc -E -P"), and when built with Microsoft's compiler it
|
|
Packit |
4a5d52 |
will correspondingly use the Microsoft compiler as preprocessort (it
|
|
Packit |
4a5d52 |
will run "cl -EP"). Thus users of libIDL, especially users of the
|
|
Packit |
4a5d52 |
ORBit2 IDL compiler orbit-idl-2, need to make sure that they have the
|
|
Packit |
4a5d52 |
necessary folders in PATH so that gcc or cl are found when orbit-idl-2
|
|
Packit |
4a5d52 |
is run.
|
|
Packit |
4a5d52 |
|
|
Packit |
4a5d52 |
Using the Library
|
|
Packit |
4a5d52 |
~~~~~~~~~~~~~~~~~
|
|
Packit |
4a5d52 |
|
|
Packit |
4a5d52 |
After building, all you need are the files IDL.h and the DLL and
|
|
Packit |
4a5d52 |
related import library. Place the header in a place where it can be
|
|
Packit |
4a5d52 |
found with libIDL/IDL.h, the DLL somewhere in PATH, and the import
|
|
Packit |
4a5d52 |
library somewhere where your compiler will find it.
|
|
Packit |
4a5d52 |
|
|
Packit |
4a5d52 |
--
|
|
Packit |
4a5d52 |
Andrew T. Veliath <andrewtv@usa.net>
|
|
Packit |
4a5d52 |
Tor Lillqvist <tml@iki.fi>
|