LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-11-2012, 12:05 AM   #1
Ravenshade
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
gcc/g++ newb query. Linking Libraries.


Quite frankly, I'm getting really annoyed with typing.

g++ (file) -o -Other Compiler options (file to output) -libraryn+1 -libraryn+2 libraryn*n

There has to be a better way surely for instance defining a program to automatically do this? Maybe? I was hoping there was a really quick way to do this.

If not, can anyone point me to a tutorial that will teach me how to write a script that I can click to compile a file in a directory with the custom options?

Thanks ^_^
 
Old 08-11-2012, 12:15 AM   #2
firstfire
Member
 
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 709

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
Hi.

This work is usually done using so called makefiles. Check out this tutorial.
EDIT: In this post I tried to explain when makefiles are especially useful.

Last edited by firstfire; 08-11-2012 at 04:23 AM.
 
  


Reply



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
newb: static linking with mcrypt emailbuilder88 Programming 7 07-29-2009 03:54 PM
Linking libraries. Gamma_User Linux - Newbie 1 01-19-2009 05:24 PM
Linking old libraries to new one? winterhunter Linux - Software 7 10-24-2005 04:37 AM
Problem with linking libraries using gcc shortyzms Linux - Software 1 03-29-2004 08:13 PM
Finding and Linking Static Libraries with gcc neorich Programming 15 08-10-2003 04:03 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:07 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration