Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C linkage error with Netxx and other libs



Dear Group,

I'm having strage issues here. They lead to the question: 'Is the place of includes special?'

What is this question like, you are asking? Well, what happened? I would like to use Netxx for a little tool I'm writing. But if I use includes from /usr/include I get:
--Output--
g++ -g -Wall -fPIC main.cpp -o linkagetest
In file included from /usr/include/gcc/darwin/3.3/c++/vector:66,
from /usr/include/Netxx/Address.h:46,
from main.cpp:3:
/usr/include/gcc/darwin/3.3/c++/bits/functexcept.h:40: error: previous
declaration of `void std::__throw_bad_exception()' with C++ linkage
/usr/include/gcc/darwin/3.3/c++/bits/functexcept.h:40: error: conflicts with
new declaration with C linkage
--Output--

If I use /usr/local/include, /Users/.../somthing, ./ (or anything else, different from /usr/include) anything works fine. Btw.: only headers are needed IMHO to reproduce this behavior.

Does anybody know how this could happen? Where ist the bug/feature that helps me handle this generally?

So far, thanks for your attention.
Mark

PS: I put some code together, so if you want to verify I'd like to hear from you.

May help:
gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.