Nice TWiki > Sandbox > NativeHowto (r1.1) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Sandbox . { Changes | Index | Search | Go }

How to build a native compiled program that depends on gnu-crypto,swt(,poi) and/or nice?

You need to keep several issues in mind if you want to do so, even more, if you want to do so with an crossed environment.

Licence issue

Quite a few libraries you depend on, are licenced under the LGPL. Up to a few weeks, I just thought, that a normal LGPL would allow me to use such an library and link against it. That is true, but only for dynamic linking. With a normal LPGL you are not allowed to link your program statically. Some copyright holders still allow you to do so, but you need to read the LICENCEs carefully.

So I assume, that we now use dynamic libraries and we are going to build some.

Different versions

Well, nearly all libraries have interfaces, that change from time to time. So, you cannot plug together two libraries, that interfaces doesn't match.

If you've got quite a few libraries you need to find the best match for all. For me that was to use gcj in version 3.3.1 (mingw-special-version for the crossed version), nice in its latest development version, poi in version 2.0pre3 and swt in version 2.1.1.

Crossed environment

For me windows is the target platform, because many of our customers use that OS, but I'm a linux user, so I wanted to use an cross-compiler. That was not as easy as I first thought, because in the main-trunk of the fsf-gcc sources some patches are not allowed to be applied due to some licence issues. Without some of these patches it is not possible to get Exception Handling working over exe/dll boundaries. So, if only compiling to static binaries, you would be fine with the latest gcc sources, but to get dynamic libraries working properly, you will need the mingw special version (as I used mingw32 as target and windows host emulation; for cygwin something similar might hold). To get proper libraries at all, you will also need a recent binutils package that must be also a special version in a crossed environment (at the moment the linker produces quite huge dll's, but this is only a bug and will be removed in a future version; besides that it works).

-- ChristianS - 03 Oct 2003

Topic NativeHowto . { Edit | Attach | Ref-By | Printable | Diffs | r1.2 | > | r1.1 | More }
Revision r1.1 - 03 Oct 2003 - 14:41 GMT - TWikiGuest
Parents: WebHome
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.