tcpdump mailing list archives
Compilation Error - C2894: templates cannot be declared to have 'C' linkage
From: "Varuna De Silva" <varunax () gmail com>
Date: Thu, 20 Sep 2007 12:19:39 +0530
Hi all, I tried to compile a program which includes pcap-int.h, in Visual Studio 2005. and then I get this above error message. As was proposed in a program. This happens because #ifdef __cplusplus extern "*C*" { #endif ... #include <pcap.h> ... #ifdef __cplusplus } #endif I tried moving the #include <pcap.h> outside of the extern "*C*" and the compilation was successful. Would this be alright Rgrds Xavier - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Compilation Error - C2894: templates cannot be declared to have 'C' linkage Varuna De Silva (Sep 19)
- Re: Compilation Error - C2894: templates cannot be declared to have 'C' linkage Guy Harris (Sep 20)
- <Possible follow-ups>
- Re: Compilation Error - C2894: templates cannot be declared to have 'C' linkage Varuna De Silva (Sep 24)
- Re: Compilation Error - C2894: templates cannot be declared to have 'C' linkage Guy Harris (Sep 24)