Re: gcc -l without source files invokes linker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 26, 2014 at 7:48 AM, Jeff Epler <jepler@xxxxxxxxxxxxxx> wrote:
> It's possible, though probably atypical, to list only libraries on a
> linker commandline.
>
> For example this sequence creates a program, despite the fact that it
> listed only libraries on the commandline:
>     $ echo 'int main(){return 0;}' > main.c
>     $ gcc -c main.c
>     $ ar cur libmain.a main.o
>     $ gcc -L. -lmain
>     $ ./a.out
Indeed. Thanks for pointing it out.

Regards,
Prathamesh
>
> Jeff




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux