Hi all,
I'm new to cURLpp and I'm trying to compile and run cURLpp examples in
Visual Studio 2005. But I'm a kind of stuck at example 2.
There is an access violation at the following line:
request.setOpt(new HttpHeader(headers));
The violation happens in "OptionContainer.inl" at the following method.
template< class OptionType >
cURLpp::OptionContainer< OptionType >::OptionContainer(typename
cURLpp::OptionContainer< OptionType >::ParamType value)
: mValue(value)
{}
I noticed that the mList in mValue is not initialized. But I'm not
sure whether this is the root cause.
The wired thing is that when I build the example through command line
using Makefile.msvc, example 2 runs without any problem. Visual Studio
2005 is using including paths and libs as same as those for
Makefile.msvc.
I guess I must have done something stupid in setting up Visual studio
2005's compiler parameters.
For Makefile.msvc, I used
cl.exe /MD /O2 /DNDEBUG /GR /Y- /I ../ /I "c:\libs\curl/include" /DCURL
PP_STATICLIB /nologo /W3 /GX /DWIN32 /YX /FD /c /Fo"example02.o" example02.cpp
link.exe /INCREMENTAL:NO /OPT:NOREF /nologo /LIBPATH:"c:\libs\curl/lib"
libcurlpp.lib libcurl_imp.lib /out:example02.exe example02.o
For Visual Studio 2005, I used
/Od /I "C:\libs\curl\include" /I "C:\libs\curlpp" /D "WIN32" /D
"_DEBUG" /D "_CONSOLE" /D "CURLPP_STATICLIB" /D "_UNICODE" /D
"UNICODE" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3
/nologo /c /Wp64 /ZI /TP /errorReport:prompt
and
/OUT:"C:\workspace\curlpp-test\Debug\curlpp-test.exe" /INCREMENTAL
/NOLOGO /MANIFEST
/MANIFESTFILE:"Debug\curlpp-test.exe.intermediate.manifest" /DEBUG
/PDB:"c:\workspace\curlpp-test\debug\curlpp-test.pdb"
/SUBSYSTEM:CONSOLE /MACHINE:X86 /ERRORREPORT:PROMPT
c:\libs\curl\lib\libcurl_imp.lib
C:\libs\curlpp\curlpp\release\libcurlpp.lib kernel32.lib user32.lib
gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
Can anybody shed some light here?
Thanks a lot,
Pengfei
_______________________________________________
cURLpp mailing list
[email protected]
http://www.rrette.com/mailman/listinfo/curlpp