Re: Does this work?

From: Brian Raiter (blr_at_drizzle.com)
Date: 08/30/05


Date: Mon, 29 Aug 2005 23:43:27 +0000 (UTC)


> I then tried to compile test_query.c as follows:
>
> gcc -I/demo/ test_query test_query.o -L/demo/ -ltest.a
>
> I get the following error:
> /usr/bin/ld: cannot find -l/demo/test.a

If you're using the -l switch, then you need to leave off the .a:

  gcc -I/demo/ test_query test_query.o -L/demo/ -ltest

Alternately, you can explicitly name the .a file on the commandline:

  gcc -I/demo/ test_query test_query.o /demo/libtest.a

gcc will figure out from the file type that it's a static library and
do the right thing. Personally, I favor this syntax when linking with
static libraries that aren't installed by the system.

b



Relevant Pages

  • Re: Old Word 2.0 1994 files
    ... If you do use this option, be sure to reset the file type to Word Documents ... Word MVP FAQ site: http://word.mvps.org ... How do I use that /a switch? ...
    (microsoft.public.word.application.errors)
  • Re: File extension at IFileSourceFilter
    ... but in the file selcetion dialog I have to switch to file type to ... > How can I modify the dialog to display only files with the extension ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: I tried reregestering and disabling office plug-in in Norton
    ... I've found the Excel file type can occasionally be a little finicky. ... Try deleting the file type again, restart the computer, then run the ... Note Excel does not support the abbreviated /r switch and you must use ...
    (microsoft.public.office.misc)
  • Re: Cannot link files to open with specific program
    ... extention, and cannot be associated with a program. ... >switch the file type to a different application. ... >Sharon F ...
    (microsoft.public.windowsxp.customize)