-   Programming (
-   -   static library cross compilation (

kskkumar 03-16-2007 04:20 AM

static library cross compilation
What will happen if i compile my static library in gcc 4.1 and if the application using the library is in gcc 2.9 will that give some error or it will work?

asgeirss 03-16-2007 01:48 PM

I guess it is likely that it will not work, if your code is moderately large and/or complicated. The C++ std libraries have changed over that length of time, so what compiles without complaint in gcc 4 may not compile at all in gcc 2.9, so that means the interfaces and typedefs might be different.

On the other hand, if your code is very simple, and very clean, and not using many c++ standard libs, and you compile your library with the same architecture, and no optimization, then it MIGHT work...

Good luck.
- Dave

kskkumar 03-20-2007 12:09 AM

can you please suggest me the link from where i can get the change notice of gcc from version to version?

asgeirss 03-20-2007 12:35 PM


You can start with the documentation here:

You may also notice strange dependencies on different versions of glibc. I don't think you can change the libraries without changing kernels though I am not an expert.

You might also find useful docs here:

All times are GMT -5. The time now is 11:53 AM.