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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:23:26+00:00 2026-06-10T08:23:26+00:00

I am trying to statically link to a third party C library in C++.

  • 0

I am trying to statically link to a third party C library in C++.

I managed to do this in Visual Studio just by specifying the .lib file in the linker input options. However, when I do the equivalent in CDT (Project Properties -> Settings -> MinGW C++ Linker -> Libraries) I get endless amounts of “undefined reference to…” errors when I try to build.

Is there anything else that I need to do to achieve static linking in CDT?

Thanks,
Alan

  • 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-10T08:23:28+00:00Added an answer on June 10, 2026 at 8:23 am

    If that third party library is build for Visual C environment and with the Microsoft Visual Studio compiler, you might be unable to link it with the MinGW compilers.

    However, you can configure Eclipse CDT on Windows to compile your code with the Visual Studio command line compiler CL.EXE and then things should work as you expected.

    It heavily depends on which version of Eclipse CDT you are using, because the Microsoft compiler settings plug-in is only part of the newer versions (I think its from Helios on).

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

Sidebar

Related Questions

I am trying to statically initialize the following structure in Visual Studio 2010: struct
I've been trying to statically link against a C++ library called Poco on Windows
I'm trying to statically link to libcrypto.a (from the openssl library) after building it
Using Visual Studio C++ 2008 Express: I am trying to perform the final link
I have a C++ dll project in visual studio 10 that I am trying
I'm trying to create a 'debug' shared library (i.e., .so or .dll file) that
On Linux, I'm trying to strip a statically linked ELF file to the bare
I'm trying to do this: !!! just learned I cant submit images because I'm
I am facing below errors when trying to statically link libDuma, Can you tell
I'm trying to compile libpcap and libssl statically (with -static) and linker get me

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.