开发者

Setting up cURL library for MSVS

I'm trying to write a simple curl program to retrieve the web page in VC++ 8.0.

 #include <stdio.h>
 #include <curl.h>

 int main(void)
 {
   CURL *curl;
   CURLcode res;

   curl = curl_easy开发者_如何学C_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
     res = curl_easy_perform(curl);
      /* always cleanup */
    curl_easy_cleanup(curl);
   }
   return 0;
 }

I added the include and library paths to cURL include and lib directory. It complies but when I try to enter debug mode, An unhandled non-continuable STATUS_DLL_NOT_FOUND exception was thrown during process load and code exits with -1073741515 (0xc0000135).


if you run it outside of debug mode, does it work as expected? or does the same error occur?

if it doesn't work outside of debug mode, your application was not able to locate the dll.

another question, are you tring to compile libcurl from sources along with your project, or are you using it as an external library?

if you are using the sources, you might need to compile the whole solution so that libcurl is compiled as well.

if you are using the external library, try putting the dll in the working directory of your application (it wasn't able to locate it).


Use dependency walker to figure out which .dll is not being loaded, then copy it somewhere on your path, or on the same folder where your program is located.


SOLVED!! After reading a bunch of forums. The real solution is as described by Ismael. Thanks buddy!

ERROR: ....symbols not found.. blah blah Debugger:: An unhandled non-continuable STATUS_DLL_NOT_FOUND exception was thrown during process load The program '[3936] VTools.exe: Native' has exited with code -1073741515 (0xc0000135).

Explanation:: This happens when one of the dll's is not found by Visual Studio, which obviously is not pointed out by Visual Studio

Solution:: In my case I had cutil32.dll missing so I had to copy it to C:/Windows/system32 folder. Figuring out which dll is missing is really difficult (I hate MSFT for this). Anyways download dependency walker and File->Open the executable file (either Debug or Release). Run it and you will find out what dll's are missing. In my case these files were missing CUTIL32.DLL, MSVCR80.DLL, MSJAVA.DLL. Copying CUTIL32.dll SOLVED the problem to system32 folder. Good Luck!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜