public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Error: symbol `_D' is already defined
@ 2002-12-05 15:42 Tim Beuman
  0 siblings, 0 replies; 3+ messages in thread
From: Tim Beuman @ 2002-12-05 15:42 UTC (permalink / raw)
  To: Cygwin@Cygwin. Com

Hi,

I am getting the following error when compiling a c++ source:

/d/Temp/ccuwCNBi.s: Assembler messages:
/d/Temp/ccuwCNBi.s:11: Error: symbol `_D' is already defined

The relevant portion of code is (preprocessor output):

#define Void_t    void

typedef struct _dtmethod_s  Dtmethod_t;
typedef Void_t*     (*Dtsearch_f)_ARG_((Dt_t*,Void_t*,int));

/* method to manipulate dictionary structure */
struct _dtmethod_s
{ Dtsearch_f  searchf; /* search function */
  int   type; /* type of operation  */
};

extern "C" {
__attribute__((dllimport)) Dtmethod_t* Dtset;
__attribute__((dllimport)) Dtmethod_t* Dtbag;
}

compiler invocation (using libtool):

c++ -DHAVE_CONFIG_H -I. -O2 -Wall -Wno-unknown-pragmas -Wp,-MD,.deps/$1.pp -
c $1.cpp \
 -DDLL_EXPORT -o .libs/$1.o -E

Removing _DDLL_EXPORT doesn't make a difference.

I know someone else has reported this problem also but there were no
follow-ups:

http://www.geocrawler.com/archives/3/6013/2002/8/0/9468006/

Might be a compiler backend problem. I don't know.

The compiler version should be 3.2.3 (I downloaded and installed this
version today again,  although gcc --version reports:

gcc (GCC) 3.2 20020927 (prerelease)
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.

The date of gcc.exe is 11/14/2002.

Tim Beuman


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Error: symbol `_D' is already defined
  2002-12-05 17:14 Danny Smith
@ 2002-12-06 10:03 ` Tim Beuman
  0 siblings, 0 replies; 3+ messages in thread
From: Tim Beuman @ 2002-12-06 10:03 UTC (permalink / raw)
  To: Cygwin@Cygwin. Com

Thanks. Works.

Tim

-----Original Message-----
From: Danny Smith [mailto:danny_r_smith_2001@yahoo.co.nz]
Sent: Thursday, December 05, 2002 04:32 PM
To: cygwin@cygwin.com
Subject: Re: Error: symbol `_D' is already defined


From: "Tim Beuman" <timb at cdvinc dot com>
To: "Cygwin at Cygwin dot Com" <cygwin at cygwin dot com>
Date: Thu, 5 Dec 2002 15:39:30 -0800
Subject: Error: symbol `_D' is already defined

----------------------------------------------------------------------------
----

Hi,

I am getting the following error when compiling a c++ source:

/d/Temp/ccuwCNBi.s: Assembler messages:
/d/Temp/ccuwCNBi.s:11: Error: symbol `_D' is already defined

==snip==

extern "C" {
__attribute__((dllimport)) Dtmethod_t* Dtset;
__attribute__((dllimport)) Dtmethod_t* Dtbag;
}



add explicit extern to  your declarations of extern variables, eg:
extern __attribute__((dllimport)) Dtmethod_t* Dtset;

This is fixed in CVS sources: __attribute__((dllimport)) implicitly adds
extern.

Danny


http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint Dropper
- Avoid getting hideous gifts this Christmas with Yahoo! Hint Dropper!


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Error: symbol `_D' is already defined
@ 2002-12-05 17:14 Danny Smith
  2002-12-06 10:03 ` Tim Beuman
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Smith @ 2002-12-05 17:14 UTC (permalink / raw)
  To: cygwin

From: "Tim Beuman" <timb at cdvinc dot com> 
To: "Cygwin at Cygwin dot Com" <cygwin at cygwin dot com> 
Date: Thu, 5 Dec 2002 15:39:30 -0800 
Subject: Error: symbol `_D' is already defined 

--------------------------------------------------------------------------------

Hi,

I am getting the following error when compiling a c++ source:

/d/Temp/ccuwCNBi.s: Assembler messages:
/d/Temp/ccuwCNBi.s:11: Error: symbol `_D' is already defined

==snip==

extern "C" {
__attribute__((dllimport)) Dtmethod_t* Dtset;
__attribute__((dllimport)) Dtmethod_t* Dtbag;
}



add explicit extern to  your declarations of extern variables, eg:
extern __attribute__((dllimport)) Dtmethod_t* Dtset;

This is fixed in CVS sources: __attribute__((dllimport)) implicitly adds
extern.

Danny


http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint Dropper
- Avoid getting hideous gifts this Christmas with Yahoo! Hint Dropper!

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-12-06 18:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-05 15:42 Error: symbol `_D' is already defined Tim Beuman
2002-12-05 17:14 Danny Smith
2002-12-06 10:03 ` Tim Beuman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).