Date: Tue, 9 Jul 2002 21:25:55 -0700 (PDT) From: Cloudy Zheng <jedizh@sina.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/40399: missing extern "C" in fetch.h Message-ID: <200207100425.g6A4PtD6001790@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 40399
>Category: misc
>Synopsis: missing extern "C" in fetch.h
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 09 21:30:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Cloudy Zheng
>Release: 4.6
>Organization:
>Environment:
FreeBSD beastie.netease.com 4.6-RELEASE FreeBSD 4.6-RELEASE #0: Tue Jun 18 18:30:48 CST 2002 root@beastie.netease.com:/usr/src/sys/compile/BEASTIE i386
>Description:
No extern "C" declare in fetch.h, cannot link against C++ code
>How-To-Repeat:
//foo.cpp
#include <sys/param.h>
#include <stdio.h>
#include <fetch.h>
int main()
{
struct url *p=fetchParseURL("http://somesite/somedoc");
}
$g++ -ofoo foo.cpp -lfetch
..
..:undefined reference to `fetchParseURL(char const *)
>Fix:
fetch.patch:
39a40,43
> #ifdef __cplusplus
> extern "C" {
> #endif
>
141c145,147
<
---
> #ifdef __cplusplus
> }
> #endif
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207100425.g6A4PtD6001790>
