c ++ lib curl编译混乱?

时间:2011-11-06 04:58:09

标签: c++ visual-c++-2010

我正在尝试在c ++应用程序中使用libcurl,我需要使用它来从服务器下载文件。我正在使用libcurl。但是在编译和链接它时我遇到了困难。我编译了libcurl并且只获得了libcurl.lib而没有dll文件。

这是错误。

1>------ Build started: Project: 34343, Configuration: Release Win32 ------
1>  34343.cpp
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(96): error C2872: 'IServiceProvider' : ambiguous symbol
1>          could be 'c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(53) : System::IServiceProvider IServiceProvider'
1>          or       'c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(96): error C3699: '*' : cannot use this indirection on type 'IServiceProvider'
1>          compiler replacing '*' with '^' to continue parsing
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(103): error C2371: 'IServiceProvider' : redefinition; different basic types
1>          c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(53) : see declaration of 'IServiceProvider'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(120): error C2872: 'IServiceProvider' : ambiguous symbol
1>          could be 'c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(103) : IServiceProvider'
1>          or       'c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(241): error C2872: 'IServiceProvider' : ambiguous symbol
1>          could be 'c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(103) : IServiceProvider'
1>          or       'c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(251): error C2872: 'IServiceProvider' : ambiguous symbol
1>          could be 'c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(103) : IServiceProvider'
1>          or       'c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\urlmon.h(6459): error C2872: 'IServiceProvider' : ambiguous symbol
1>          could be 'c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(103) : IServiceProvider'
1>          or       'c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\urlmon.h(6461): error C2872: 'IServiceProvider' : ambiguous symbol
1>          could be 'c:\program files (x86)\microsoft sdks\windows\v7.0a\include\servprov.h(103) : IServiceProvider'
1>          or       'c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

1 个答案:

答案 0 :(得分:1)

libcurl\src\中有一个visual studio项目。你在用它吗?它对我很有用。