LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 06-13-2005, 06:09 PM   #1
Maidros
Member
 
Registered: Jan 2004
Location: Haifa, Israel
Distribution: Debian, FreeBSD, Solaris
Posts: 101

Rep: Reputation: 15
flags for compiling Xlib.h in gcc


In order to compile functions given in Xlib.h, I am having to use the command
gcc -I/usr/X11R6/include -L/usr/X11R6/lib <filename.c>
in FreeBSD 5.4. Is there any way I could set the path/flags so that I do not have to issue the entire command everytime I compile a program?
Any answers/hints would be appreciated.
Regards,
Maidros
 
Old 06-13-2005, 08:17 PM   #2
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Re: flags for compiling Xlib.h in gcc

Quote:
Originally posted by Maidros
In order to compile functions given in Xlib.h, I am having to use the command
gcc -I/usr/X11R6/include -L/usr/X11R6/lib <filename.c>
in FreeBSD 5.4. Is there any way I could set the path/flags so that I do not have to issue the entire command everytime I compile a program?
Any answers/hints would be appreciated.
Regards,
Maidros
Code:
$ cat > Makefile << "EOF"
all: filename.o

filename.o: filename.c
        gcc -I/usr/X11R6/include -L/usr/X11R6/lib filename.c
EOF
$ make
 
Old 06-15-2005, 05:00 AM   #3
Maidros
Member
 
Registered: Jan 2004
Location: Haifa, Israel
Distribution: Debian, FreeBSD, Solaris
Posts: 101

Original Poster
Rep: Reputation: 15
Re: Re: flags for compiling Xlib.h in gcc

Quote:
Originally posted by freegianghu
Code:
$ cat > Makefile << "EOF"
all: filename.o

filename.o: filename.c
        gcc -I/usr/X11R6/include -L/usr/X11R6/lib filename.c
EOF
$ make
Thanks, it works.
Regards,
Maidros
 
  


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
GCC 3.4/3.3 Optimization Flags monohouse Linux - Software 0 10-28-2004 10:48 AM
optimization flags and kernel compiling kpachopoulos Linux - Newbie 2 08-26-2004 07:29 AM
gcc optimization flags: rules of thumb elyk Linux - Software 3 08-04-2004 11:49 PM
gcc Pentium3 flags in menuconfig Kristian2 Slackware - Installation 2 06-11-2004 09:49 AM
mplayer - wrong gcc flags crashmeister Linux - Software 2 11-19-2002 06:25 AM


All times are GMT -5. The time now is 09:07 AM.

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