Could I get rid of libcurl.dll and compile a stand-lone application with Curl?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Could I get rid of libcurl.dll and compile a stand-lone application with Curl?
Hello everyone,
I am compiling a program that is using Curl library under Windows XP.
My compiler is Visual Studio 2005, the only thing bothers is that the executable does require libcurl.dll and some other related-dlls to be under /windows/system32.
I am not sure whether there is someway to combine those dlls together into an stand-alone executable or it is impossible because of licience.
I am good with both but do need some reference to prove it.
I am compiling a program that is using Curl library under Windows XP.
My compiler is Visual Studio 2005, the only thing bothers is that the executable does require libcurl.dll and some other related-dlls to be under /windows/system32.
I am not sure whether there is someway to combine those dlls together into an stand-alone executable or it is impossible because of licience.
I am good with both but do need some reference to prove it.
Thanks for any help,
-Kun
The license is BSD, isn't it ? I.e. all you are required to do is "pay tribute", i.e. to mention that your app uses CURL, but you do not have to distribute the source.
thanks. Could you give me some more details ? I did compile the library myself and got .lib and .dll file. I linked the lib in Visual Studio 2005, but it require the .dll file be under system folder. Is that dynamic dll ? Or how could I compile a static one ?
I don't know for Visual Studio, but I successfully compiled a static library under Mingw32 with a basic feature set. Just in case, here are the needed steps (also for someone new to Mingw):
[Mingw / MSYS]
- download Mingw package and install/unzip
- add the Mingw bin directory path to the PATH variable
- download MSYS (from Mingw's sourceforge repository)
[Build]
- run MSYS
- type cd <your_curl_directory> (replace accordingly)
- type ./configure --enable-shared=no --without-ssl --without-zlib --without-libidn
--enable-http --enable-ftp --enable-ipv6 (script will run for a while, so grab a cup of coffee)
- type make
- now you should find the libcurl.a static library in the .lib directory
- copy it somewhere
- type make distclean (will clean up the temporary files left from the build)
I finally have to get rid of MinGW and libcurl since I have to use some other things like PCRE and Tidy, which could be compiled under VC easily.
Right now I used WinInet to replace libcurl in my app.
Sure this post helps future comers.
-Kun
Quote:
Originally Posted by fantas
I don't know for Visual Studio, but I successfully compiled a static library under Mingw32 with a basic feature set. Just in case, here are the needed steps (also for someone new to Mingw):
[Mingw / MSYS]
- download Mingw package and install/unzip
- add the Mingw bin directory path to the PATH variable
- download MSYS (from Mingw's sourceforge repository)
[Build]
- run MSYS
- type cd <your_curl_directory> (replace accordingly)
- type ./configure --enable-shared=no --without-ssl --without-zlib --without-libidn
--enable-http --enable-ftp --enable-ipv6 (script will run for a while, so grab a cup of coffee)
- type make
- now you should find the libcurl.a static library in the .lib directory
- copy it somewhere
- type make distclean (will clean up the temporary files left from the build)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.