LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-16-2007, 04:20 AM   #1
kskkumar
Member
 
Registered: Aug 2005
Posts: 40

Rep: Reputation: 15
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?
 
Old 03-16-2007, 01:48 PM   #2
asgeirss
Member
 
Registered: Aug 2003
Location: Vancouver, Canada
Distribution: RH, SL
Posts: 37

Rep: Reputation: 15
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
 
Old 03-20-2007, 12:09 AM   #3
kskkumar
Member
 
Registered: Aug 2005
Posts: 40

Original Poster
Rep: Reputation: 15
can you please suggest me the link from where i can get the change notice of gcc from version to version?
 
Old 03-20-2007, 12:35 PM   #4
asgeirss
Member
 
Registered: Aug 2003
Location: Vancouver, Canada
Distribution: RH, SL
Posts: 37

Rep: Reputation: 15
Hi,

You can start with the documentation here: http://gcc.gnu.org/onlinedocs/

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: http://www.gnu.org/manual/manual.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LINUX - linking archive (static library) with shared (dynamic) library gurkama Programming 5 03-04-2007 11:11 PM
Cross-Compiling DLLs with Mingw32- Linking a Static Library KrayZier Programming 1 01-24-2007 05:52 PM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM
cross compilation Kocil Slackware 6 12-18-2003 01:53 PM
Static Bind Applications to Kernel; cross compilation Alybyzrp Linux - Newbie 0 11-25-2003 01:38 PM


All times are GMT -5. The time now is 06:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration