Re: OSX Porting Problems

"Morgan Howe" <[email protected]> Tue, 13 Mar 2007 16:02:07 -0700
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <[email protected]>
On 3/13/07, Morgan Howe <[email protected]> wrote:

> The second error I'm getting is this:
>
> headers/private/kernel/util/DoublyLinkedList.h:17: error: template with C
> linkage
>
> This occurs in several places in DoublyLinkedList.h, as well as a number
> of other header files (if run without the -q switch).  Apparently what this
> means is that an `extern "C" {' block did not get closed prior to the
> compiler running into C++ code.  I've pulled the build command for the very
> first file built ( Volume.o), and am manually running it to try and
> debug.  I used the gcc switch -E so that only the preprocessor gets run and
> I can skim through and try to find the missing closing bracket.  This is a
> pretty time consuming and painful process, but hopefully it will turn up
> some results.  If I'm lucky it will be one header file that gets included
> frequently and a single fix will take care of the problem throughout Haiku.
>


Well after looking at the preprocessor output, I noticed the flags:
# 11 "headers/private/kernel/util/DoublyLinkedList.h" 2 3 4
with them meaning:
3: System Header
4: Requires extern "C" protection

This appears to be because any include found in a directory specified to g++
with -idirafter is assumed to be a system header, and any system header is
implicitly enclosed in an extern "C" block.  Changing -idirafter to -I on
line 245 of HelperRules seems to solve this problem, though I am still
running into problems each time code attempts to override the new operator.

Morgan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Open-beos-kernel-devel mailing list
Open-beos-kernel-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/open-beos-kernel-devel