2011-11-06 170 views
0

我想在一个C++应用程序中使用libcurl,我需要使用它从服务器下载文件。我为此使用libcurl。但编译和链接时遇到了困难。我编译了libcurl,只有libcurl.lib和没有dll文件。c库lib curl编译混淆?

这是错误。

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

libcurl\src\有一个视觉工作室项目。你在使用它吗?这对我很有效。