Hi...
I have a static library, libxbgi.a. When I want to properly link a program with this library I have to write: gcc prog.c -o prog -lm -L /usr/X11R6/lib -lX11 -L. -lxbgi
It is cumbersome to write such a long command line. Is it possible to pre-link the libX11.a and libm.a with libxbgi.a, so that the command line will read: gcc prog.c -o prog -L. -lxbgi.a
vicky_dev
12
Junior Poster in Training
Recommended Answers
Jump to PostYou're getting into the realm of needing a makefile. Ask man about the make utility.
Jump to PostHeard of Unix aliases ?!
If you don't wanna do that, you can also say x="that whole command"
and then
$x
All 7 Replies
Narue
5,707
Bad Cop
Team Colleague
thekashyap
193
Practically a Posting Shark
vicky_dev
12
Junior Poster in Training
Narue
5,707
Bad Cop
Team Colleague
thekashyap
193
Practically a Posting Shark
vicky_dev
12
Junior Poster in Training
Narue
5,707
Bad Cop
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.