Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5970509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:23:02+00:00 2026-05-22T20:23:02+00:00

From http://www.adp-gmbh.ch/cpp/gcc/create_lib.html : Note: the library must start with the three letters lib and

  • 0

From http://www.adp-gmbh.ch/cpp/gcc/create_lib.html:

Note: the library must start with the three letters lib and have the suffix .a.

Is this an operating system convention, or a gcc/ar quirk? Xcode seems to be able to create libraries without the prefix. What’s it doing differently?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:23:03+00:00Added an answer on May 22, 2026 at 8:23 pm

    You can name a library whatever you want, but if you want gcc’s -l flag to find the right one, you need to name it the way that link describes. For example:

    gcc -o myapp myapp.c -lm
    

    Will compile myapp.c, link the resulting object with libm.a, and output an executable called myapp. These days, there might be a more complicated search path involving dynamic library names, etc., but you should get the basic idea from this example.

    From the gcc man page:

    -l library …

    … surrounds library with lib and .a and searches several directories.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From http://www.jibbering.com/faq/faq_notes/closures.html : Note: ECMAScript defines an internal [[prototype]] property of the internal Object
From http://www.faqs.org/rfcs/rfc2822.html : CR and LF MUST only occur together as CRLF; they MUST
Here is an example of polymorphism from http://www.cplusplus.com/doc/tutorial/polymorphism.html (edited for readability): // abstract base
From http://www.boost.org/community/implementation_variations.html ... coding differences such as changing a class from virtual to non-virtual
this is copied from http://www.zenspider.com/ZSS/Products/RubyInline/Readme.html , the home of rubyinline, adding/moding as indicated in
I used the code from http://www.rgagnon.com/javadetails/java-0580.html to get Motherboard Id, but the result is
I have downloaded PSCP from: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html and added it to the PATH in windows
I'm using the .NET TWAIN code from http://www.codeproject.com/KB/dotnet/twaindotnet.aspx?msg=1007385#xx1007385xx in my application. When I try
Trying to get this example working from http://www.munna.shatkotha.com/blog/post/2008/10/26/Light-box-effect-with-WPF.aspx However, I can't seem to get
I have learned so much from http://www.summerofnhibernate.com/ nhibernate screen casts that i wonder why

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.