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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:33:10+00:00 2026-05-20T03:33:10+00:00

What options set, to statically linked the library curl ? Library should be integrated

  • 0

What options set, to statically linked the library curl ?

Library should be integrated to executable file.

tried different: added options g++ -DCURL_STATICLIB -lcurl … added #define CURL_STATICLIB to the code …, in the IDE NetBeans added libcurl.a, libcurldll.a … etc.,

Compile is successful and all works great. But still require external libcurl.dll! (Size of executable file also increases!)

What’s wrong ? might have something add to the IDE (also used NetBeans, Eclipse)

Please show a correct example as you would make

Executable file should be without calling an external dll library

it my first question 🙂


Fix.

Example compile for library curl with OpenSSL + zlib + libidn + libssh2 + librtmp:

g++ -static main.cpp -lcurl -lidn -lwldap32 -lssh2 -lz -lrtmp -lssl -lssl32 -lcrypto -lgdi32 -lws2_32 -lwinmm -o test.exe

note: here shouldn’t be specified -lcurldll. This will lead to that: compile is successful, but still require external libcurl.dll

  • 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-20T03:33:11+00:00Added an answer on May 20, 2026 at 3:33 am

    you need to specify -static in the linker options

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

Sidebar

Related Questions

I have a file in cvs that has Sticky Options set to -kk .
I would like to set some vim options in one file in the comments
I want to set several transform options for my html object but with different
How can I access options that I set in a jQuery Datepicker? $(#testDatePicker).datepicker({ minDate:
I have a set of options, some orthogonal (can be combined in any combination),
can you set SO_RCVTIMEO and SO_SNDTIMEO socket options in boost asio? If so how?
I am evaluating options for efficient data storage in Java. The data set is
I've created a view with a set filters exposed (to show filtering options in
I'm trying to find about ALL the possible options that I can set in
What is the best way to read and/or set Internet Explorer options from a

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.