A quick programming question...

I was just reading about Stager13’s tree generator thing and someone tried to compile it under linux but it didn’t work; they were trying to use wxWidgets or something.

How would this work?

Am I right in thinking:

All they have to do is link the platform-independent source code with a GUI widget set that works on their platform and presto, it’s compiled?

I.e., could I take the platform independent sources of say Cinellerra, compile them and link them against a cross-platform GUI widget(wxWidgets, so it can run on Windows)?

Am I understanding this correctly?

Thanks

LC

It wolud all depend.

Say for example you create a program that uses X libraries. But someone wants to use your program with Y libraries this wont work because your program was designed to use X libraries.

So the guy knows he cant use Y libraries so he decieds to use Yx libraries that has features of X libraries. Now in theory it should work. But the Yx libraries dont support all the features X libraries support so something could go wrong in the compile, that Yx libraries dont have support for.

It could also be that Yx does have a feature the X has but Yx does it differently. Causing problems.

It’s a bit complicating but thats one of the problems with it. And thats why its always a good idea to use libraries cross-platform.

Like wxWidgets?

Yes, like wxWidgets.

Typically, software that is designed to be cross-platform contains the conditional-compile sections within the code, and the Makefile / AutoConfig logic, that will generate a correct executable for each environment that is supported.

The resulting executable will expect the co-requisite software to have been previously, and correctly, installed on the target machine.

Typically, the co-requisite software is expected to be in a dynamic library (i.e. loaded at runtime), but also the source-code typically requires access to the appropriate include-files (from the co-requisite package(s)) at compile-time. The include files must match the installed libraries exactly.

Ahem… “unpredictable results” … may occur otherwise.

P.S. On a Linux/Unix environment, you can have more than one version of a library installed at the same time. On a Windows environment, you cannot.