C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 02-15-2009, 02:19 PM   #1
subminimalist
 
MK27's Avatar
 
Join Date: Jul 2008
Location: NYC
Posts: 3,944
specify linker switch in code

Is there a way to include (eg) "-lm" in source code so that when it's compiled, this switch will be used without having to put it on the command-line?
__________________

Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS
MK27 is offline   Reply With Quote
Old 02-15-2009, 03:51 PM   #2
Wheres the lesbians?
 
mike_g's Avatar
 
Join Date: Oct 2006
Location: UK
Posts: 1,219
Not AFAIK, but why not use a makefile for that stuff?
__________________
Senior highbrow doctor of authority.
mike_g is offline   Reply With Quote
Old 02-15-2009, 04:04 PM   #3
Registered User
 
Join Date: Oct 2008
Location: TX
Posts: 1,262
Looks like you need a makefile
itCbitC is offline   Reply With Quote
Old 02-15-2009, 04:06 PM   #4
subminimalist
 
MK27's Avatar
 
Join Date: Jul 2008
Location: NYC
Posts: 3,944
Actually it's okay -- I can't use a makefile, it was for a prime number thing at "sphere" and I thought it would be a little silly if you had to write your own sqrt(). But it seems like using #include <math.h> was enough, perhaps they add the switch.

And after spending all afternoon there, I decided to give up on "sphere"...
__________________

Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS
MK27 is offline   Reply With Quote
Reply

Tags
gcc

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Structure Eror prominababy C Programming 3 01-06-2009 09:35 AM
Finding object code kidburla C Programming 3 11-29-2005 01:09 PM
Problem : Threads WILL NOT DIE!! hanhao C++ Programming 2 04-16-2004 01:37 PM
Seems like correct code, but results are not right... OmniMirror C Programming 4 02-13-2003 01:33 PM
Interface Question smog890 C Programming 11 06-03-2002 05:06 PM


All times are GMT -6. The time now is 02:50 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22