How to link this library libcurl statically to the exe? i have tried
--disable-share --enable-static that does not help.
I am using MingW32
Is there an easy way to statically link this library so i can have no more .dlls with my app?
How to link this library libcurl statically to the exe? i have tried
--disable-share --enable-static that does not help.
I am using MingW32
Is there an easy way to statically link this library so i can have no more .dlls with my app?
If using codeblocks, right click your project and press properties then on the defines tab, add:
CURL_STATICLIB
if using command line then:
-static -static-libgcc -static-libstdc++ -DCURL_STATICLIB -lcurl -lws2_32 -lwinmm
You need to use -static in linker options
Here is the steps how to do that. but you may get some additional errors. those are need to figure out by yourself. This is Just a guidance.
You should have two project in Visual Studio Solution
Build libcurl as a static lib.(right click libcurl project
in solution explorer -> properties -> configuration properties -> General-> change configuration Type
to Static Library (.lib)
)
Then right click your project go to propertied ->configuration properties ->Linker -> general
In "additional Library directories" add the path to above curl.lib.
additional dependencies
.use of MFC
and use of ATL
to use MFC in static library
and use ATL in static library
accordingly.