External Program and cygwin

Hello,
lot of problems these days… need help again. I had a simple class to build jet and was properly working with root 4.02/00 both on SLC and cygwin. Then I upgrade root to 4.04/02 and the shared library was no more produced on cygwin (still ok on SLC).

To get the shared library I use:

g++ -O1 -g -ansi -I${ROOTSYS}/include -c -o JetFinderICA.o JetFinderICA.cxx (to get the object file)

and

g++ -o libJetFinderICA.dll JetFinderICA.o -shared -L/usr/local/lib -L/cygdrive/c/Programmi/root/lib -lRint -lCint -lCore -lTree -lNew -lGraf -lGraf3d -lHist -lHtml -lMatrix -lMinuit -lGpad -lGui -lPhysics (to get the library)

As I said with the previous root version the 2 commands were working both on SLC and cygwin. With the new version is still ok on SLC but on cygwin I get a huge list of error:

/cygdrive/c/Programmi/root/lib/libRint.dll.a(.text+0x0):streambuf-inst.cc: multiple definition of ___do_sjlj_init' /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtbegin.o(.text+0x0):crtstuff.c: first defined here /cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x1ed8):crtstuff.c: multiple definition of__imp__Gl_tab_hook’
/cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x1ed8):crtstuff.c: first defined here
/cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x21c8):crtstuff.c: multiple definition of __imp___ZTV7TQClass' /cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x21c8):crtstuff.c: first defined here /cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x21a0):crtstuff.c: multiple definition of__imp___ZTV10TObjString’
/cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x21a0):crtstuff.c: first defined here
/cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x1ed4):crtstuff.c: multiple definition of __imp__Gl_in_key' /cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x1ed4):crtstuff.c: first defined here /cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x2208):crtstuff.c: multiple definition of__imp__gDebug’
/cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x2208):crtstuff.c: first defined here
/cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x220c):crtstuff.c: multiple definition of __imp__gEnv' /cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x220c):crtstuff.c: first defined here /cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x21a4):crtstuff.c: multiple definition of__imp___ZTV10TStopwatch’
/cygdrive/c/Programmi/root/lib/libRint.dll.a(.idata+0x21a4):crtstuff.c: first defined here

and so on…
I also attach the header and source file of the class but I’d like also add that I get the same problem with other more complex class and library…

Seems to me there is something wrong with cygwin… but I’m not an expert and I’d like to hear what you guys think!

Thanks.

Attilio
JetFinderICA.cxx (10.2 KB)
JetFinderICA.h (2.78 KB)

I do not have any problems with my cygwingcc to execute your command.
Is the trace back really produced by this command?
Which version of cygwin and gcc?
In my case I have

[code]$ uname -a
CYGWIN_NT-5.1 PCBRUN3 1.5.11(0.116/4/2) 2004-09-04 23:17 i686 unknown unknown Cygwin

brun@PCBRUN3 ~/rootcmz
$ g++ -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs
Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc,pascal --enable-nls --without-included-gettext --enable-libgcj --with-system-zlib --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable-sjlj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry
Thread model: posix
gcc version 3.3.3 (cygwin special)[/code]

Rene

This is what I get:

$ uname -a
CYGWIN_NT-5.1 MY-PC 1.5.16(0.128/4/2) 2005-04-25 20:26 i686 unknown unknown Cygwin

$ g++ -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs
Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc,pascal --enable-nls --without-included-gettext --enable-libgcj --with-system-zlib --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable-sjlj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry
Thread model: posix
gcc version 3.3.3 (cygwin special)

So gcc it’s the same bue cygwin it’s the last one…

Cheers

Attilio

Hi,
I cannot reproduce it either - it works for me (with cygwin 1.5.18s snapshot from May 28). You might want to try to (re)build root from source.
Axel.