The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to configure DHCP to Static IP lee30320 IP Networking 5 01-27-2009 03:56 AM
Assigning a static IP to NICs sunfan SUN Solaris 10 01-03-2008 01:28 AM
HP-UX 10.xx Changing from static IP to DHCP Steelysteel HP-UX 1 08-27-2007 04:55 PM
static route ? chaandana IP Networking 3 07-05-2005 02:05 AM
Static IP google IP Networking 7 05-18-2003 07:33 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-22-2005
wojtyla wojtyla is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 40
Static

What does this command exactly do

cc -static example.c
  #2 (permalink)  
Old 02-23-2005
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,710
It depends on the compiler.

I believe in this case you will get a statically linked file - all of the external library routines will be copied into the exe file, instead of being loaded at runtime.
  #3 (permalink)  
Old 02-23-2005
wojtyla wojtyla is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 40
req

So WHat do i do to make the compliation more dynamic.
How can i Compress an exe fie
  #4 (permalink)  
Old 02-23-2005
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,710
If you tell us what you are trying to do, we can give a better answer.
By default most compilers link dynamically.
  #5 (permalink)  
Old 02-24-2005
wojtyla wojtyla is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 40
re

I want to compress my exe files.
Is there a way to do this
  #6 (permalink)  
Old 02-24-2005
bhargav's Avatar
bhargav bhargav is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2004
Location: USA
Posts: 511
After binary is formed you can compress by using

Code:
srtip 'binary'

but , i think the thread discussion started with different purpose
and it is going in different direction.
  #7 (permalink)  
Old 02-25-2005
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,710
Hmm. If you compile static images ( -static) the resulting file is huge compared to compiling the default way - dynamically linked.

The only time you would want to compile statically is the case where the libraries your code needs will not exist on the machine the code needs to run on. Static linking 'parks' the library modules in your exe. Making it very large.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0