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 8281387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:01:04+00:00 2026-06-08T10:01:04+00:00

Moved from gcc 4.5 to gcc 4.6, and now it does not link against

  • 0

Moved from gcc 4.5 to gcc 4.6, and now it does not link against libraries that are not used at compile time (i.e. if no symbols are imported from them).

However the purpose of those libraries is that they execute static constructors and thus make themselves available to the app at runtime (register their symbols).

Is there a way to force gcc to link with all libraries listed via -l?

  • 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-06-08T10:01:05+00:00Added an answer on June 8, 2026 at 10:01 am

    It looks like you need either -Wl,--no-as-needed to totally disable it. Or, --no-as-needed -lfoo --as-needed to disable “as-needed” just for libfoo.

    Source: https://lists.ubuntu.com/archives/ubuntu-devel/2010-November/031991.html

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

Sidebar

Related Questions

I moved from SubSonic 2.x to 3.0 and noticed that all my classes are
Requirements I want a constexpr value (i.e. a compile-time constant) computed from a constexpr
I moved from Windows to Mac and now I'm experiencing a problem with the
I have the following function from some legacy code that I am maintaining. long
I have started initially with VC++ 2008 Express. I've noticed that GCC becomes kind
gcc 4.4.4 c89 I am reading in from a text file and the text
I can't seem to get g++ to compile c++11 code that uses a move
Recently moved from svn to git, pardon my newbie question. In our release process,
Just moved from VS2010 Professional to Premium. When I hit a failing Assert using
GCC 4.4.3 generated the following x86_64 assembly. The part that confuses me is the

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.