English 中文(简体)
采用LibCURL C++
原标题:Using LibCURL C++
  • 时间:2012-01-16 06:39:25
  •  标签:
  • c++
  • libcurl

现在,我曾试图在C++使用LibCURL两小时,这实际上是在我手上。 我感觉到有人像以前一样有问题,但我发现一些职位给我解决办法。

这是我所做的事:

Since the libCurl download page is so confusing, I am posting exactly what I ve done. First, I downloaded the file at the top (curl-7.23.1.zip), and then opened it in winRAR. I then went into the include folder, and then extracted the curl folder out of there.

“entergraph

然后,我创建了一个新项目,其编号为:Blocks,然后将曲线夹移到与我的项目相同的夹中。

enter image description here

然后,在我的档案顶点上加上“保证/保证”号,然后尝试并初步形成一部简单的《欧洲反弹道导弹条约》。 我接着犯了一个错误,说:

...main.cpp|22|undefined reference to `_imp__curl_easy_init |

Here is a picture of the actual code/error: enter image description here

Honestly, I think it is something very very stupid that I am doing, but I just don t know what to do.

最佳回答

最后,它需要一些帮助。

这里我是这样做的:

  1. Download the Win32 Generic libcurl package. (7.24.0)
  2. In Code::Blocks, right click your project and open the build options.
  3. Go to Linker Settings and add curldll into the Link Libraries listbox. (image)
  4. Go to Search Directories and under Compiler link it to the path of your curl-7.24.0-devel-mingw32include folder.
  5. Go to the Linker tab under Search Directories , and add the path of your curl-7.24.0-devel-mingw32lib directory.
  6. Move all DLLs from your curl-7.24.0-devel-mingw32in folder into your projects bin folder.
  7. Build and enjoy

用盖特语进行校准,会比较容易。

  1. 将所有必要的档案/文件/图书馆翻译成你的剪辑。 确保你包括曲线夹。

  2. Go to your .pro file, and add the location of the libcurldll.a file. For example(mine):

    LIBS += C:libcurl7.24.0libcurldll.a

  3. Enjoy.

Thanks R. Martinho Fernandes!

问题回答

页: 1 页: 1 这些档案是图书馆本身,与你的节目链接的双程<>。

If you link the library dynamically, you ll need to put the *.dll in your project directory, in C:Windows or in C:MinGWin (if C:MinGW is the compiler path).

“首先,我下载了文件顶端(curl-7.23.1.zip),然后以“胜利”开启。 接着,我去了这 include子,然后从那里提取了曲线。

它像你那样,汇编了治疗源代码。 网页上的所有下载都只是来源。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?