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

  • SEARCH
  • Home
  • 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 7641829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:01:30+00:00 2026-05-31T09:01:30+00:00

I have a simple project that uses a single library in order to run.

  • 0

I have a simple project that uses a single library in order to run.

For example, my program is called “myApp”, and I have a library that I have have built and coded myself called libspoonybard. The makefile for libspoonybard is set up so that both a shared object (.so) and a static library (.a) file is generated for this library.

-myApp
--libspoonybard

What would I specify at build time (either via command-line flags or a makefile) so that I can build “myApp” both as a “static” version (ie: forced to use libspoonybard.a) and a “dynamic” version (forced to use libspoonybard.so at run time).

I have already attempted several searches for a similar topic on StackOverflow, but all the results seem to be focused on how to create a static vs dynamic library as opposed to how to specify which one to link against. Sorry if this is a repost.

Thank you all in advance for your assistance.

  • 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-31T09:01:32+00:00Added an answer on May 31, 2026 at 9:01 am

    “-static” vs “-shared” can be used under GCC:

    http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options

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

Sidebar

Related Questions

We have a simple project that uses JsonValueProviderFactory which we have working on a
I have a fairly simple desktop application that uses a .NET setup project (.msi
I have a simple WCF project that uses the Entity Framework to access the
I have a PHP project (Symfony2) that uses RabbitMQ. I use its as simple
I have a project in PHP that uses multiple tabs on a single page,
I have a simple Android application that uses a JAR I have built. When
I have a simple Scala project that runs without any problems inside Eclipse, however,
I have a very simple Setup project that copies three dlls into the GAC.
I have a really simple ASP.NET web application and a web setup project that
Im sure this will be a simple one but have a project that started

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.