Tiff images library

May 4, 2012 at 3:18pm
Hello

Im looking for a library to work with tiff images but i want it to be platform independant.
I have already worked with libtiff but i dont know if there is any way to built it
as platform independant.
Do i have any other options?Does anyone know something?

Thanks
May 4, 2012 at 3:35pm
There is effectively1 no way to build the library and have it be platform independent. A library is built FOR a certain platform - the library is the machine code instructions for that processor. The source code may be platform independent (or at least, ready for more than one platform); the compiled library cannot be.

1. There have occasionally been crazy ideas about binary files that can be used by more than one architecture.
Last edited on May 4, 2012 at 3:42pm
May 4, 2012 at 3:47pm
The thing is that i want to use the library with my own processor which doesnt run any operating system.
I understant that the compiles code is for the machine i built it for.But beside this its still written in standard C .The only reason i think of is that the code might contain calls to the operating system(which i dont have) beside that the code is the same.
May 4, 2012 at 3:55pm
You can compile for processor X using an operating system and tools running on processor Y. This is called cross-compiling; http://en.wikipedia.org/wiki/Cross_compiler . It's a pain, but it can be done. Usually, the supplier of the target processor provides the tools to do it (for example, Analog Devices provide a nice IDE for windows on which to write and compile, and then the user manually blows the compiled executable onto the hardware board).
beside that the code is the same.

The source code is the same. The machine code in the compiled file is different, because different processors literally have different instruction sets. The compiler has to turn the source code into something the target processor will understand, and that will be different for every processor with a different instruction set.
Last edited on May 4, 2012 at 3:55pm
May 4, 2012 at 4:09pm
I built the library with gcc.
I want to use it with avr-gcc.
You are saying that i can take builted library run it through avr-gcc and get the
code i want or that i should built the library from the beggining with avr-gcc?

May 4, 2012 at 4:12pm
Build it from the start with avr-gcc. That will create a library that can be understood by the Atmel AVR RISC-based processor.
Topic archived. No new replies allowed.