cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curlpp mailing list Archives

[cURLpp] readData() function and data variable in examples 2 and 21 "already defined" linker error

From: Piotr Dobrogost <curlpp_at_2008.autoera.pl>
Date: Sat, 01 Nov 2008 19:11:41 +0100

Hi

I put all 22 examples into one project changing functions names to
mainN just to check if all compile.
In example 2 and 21 there are used the same variable (data) and
function (readData) and when both of them are in the same project
one gets linker error "already defined..." which in VS2008 looks
like this:

example21.obj : error LNK2005:
"unsigned int __cdecl readData(char *,unsigned int,unsigned int)"
(?readData@@YAIPADII_at_Z)
already defined in example02.obj

Maybe that would be better to put these variable and function in
examples 2 and 21 in unnamed namespace?
That makes linker happy.

Regards
Piotr Dobrogost
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2008-11-01

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET