Boost logo

Boost Users :

From: Chris Coleman (cqc_at_[hidden])
Date: 2005-01-05 11:20:41


Caleb Epstein wrote:

>On Wed, 05 Jan 2005 11:04:47 +0000, Chris Coleman <cqc_at_[hidden]> wrote:
>
>
>>The result below is repeated many many times about various files:
>>
>>/opt/sfw/gcc-3.2/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_REENTRANT
>>-c -o zz_broker.o `test -f zz_broker.cpp || echo './'`zz_broker.cpp
>>In file included from /opt/sfw/gcc-3.2/include/c++/3.2/utility:66,
>> from
>>/staff/cqc/include/boost/config/select_stdlib_config.hpp:20,
>> from /staff/cqc/include/boost/config.hpp:40,
>> from /staff/cqc/include/boost/smart_ptr.hpp:14,
>> from zz_broker.h:28,
>> from zz_broker.cpp:24:
>>/opt/sfw/gcc-3.2/include/c++/3.2/bits/stl_relops.h:91: template with C
>>linkage
>>
>>
>
>Do you perhaps have extern "C" block still open before you include
><boost/smart_ptr.hpp>? I get identical errors compiling the following
>test program:
>
>extern "C" {
>#include <boost/shared_ptr.hpp>
>}
>
>
>
I have only one extern "C" {} block in the whole code. Its job is to
create a wrapper that allows a member function to be used as a pointer
to the pthread_create() function. I have checked that it is closed
properly. eg:

extern "C" {
    void *ThreadStartup(void *);
}

The top of the file looks like:

#ifndef ZZ_BROKER_H
#define ZZ_BROKER_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <iostream>
#include <pthread.h>
#include <boost/smart_ptr.hpp>

...
...

The code compiles fine under gcc-linux (gentoo, mandrake), mingw,
cygwin, its just Solaris thats causing problems. I'm not sure if this
is due to it being the non-standard install of gcc or not, or whether it
is a problem with the way I build boost etc.

Cheers
Chris

This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net