delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/01/05:08:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: "Alex Vinokur" <alexvn AT connect DOT to>
Subject: STLport with the Cygwin/MinGW compiler (was :: C++ Compilers : Comparative Performance Testsuite)
Date: Sat, 1 Nov 2003 12:07:59 +0200
Lines: 153
Message-ID: <bo00lr$baj$1@sea.gmane.org>
References: <bnr72n$li9$1 AT sea DOT gmane DOT org> <157-1772867639 DOT 20031030154714 AT familiehaase DOT de> <bntl4h$jci$1 AT sea DOT gmane DOT org> <43-1680745334 DOT 20031031172236 AT familiehaase DOT de> <bnuacn$6iu$1 AT sea DOT gmane DOT org> <118743930094 DOT 20031101014819 AT familiehaase DOT de> <bnvmhe$um1$1 AT sea DOT gmane DOT org>
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2800.1106

"Alex Vinokur" <alexvn AT connect DOT to> wrote in message news:bnvmhe$um1$1 AT sea DOT gmane DOT org...
> Hi Gerrit,
>
> "Gerrit P. Haase" <gp AT familiehaase DOT de> wrote in message news:118743930094 DOT 20031101014819 AT familiehaase DOT de...
> > Hallo Alex,
> >
> > Am Freitag, 31. Oktober 2003 um 19:41 schriebst du:
> >
> >
> > > "Gerrit P. Haase" <freeweb AT nyckelpiga DOT de> wrote
> > > [snip]
> > >>
> > >> I posted a Makefile to build a Cygwin version of STLport with DLL's and
> > >> static archives:  http://www.cygwin.com/ml/cygwin/2003-06/msg00790.html
> > >>
> > >> If it shows up that using STLport instead of libstdc++ templates
> > >> increases the speed of the code running, maybe someone volunteers to
> > >> maintain an STLport package for Cygwin?
> > >>
> > > [snip]
> >
> > > I have done the following things :
> >
> > > $ cd STLport-4.5.3
> > > $ ln -s /usr/include/c++/3.3.1 g++-v3
> > > $ cd src
> > > $ make
> > > [---omitted---]
> > > $ cd ../lib
> > > $ ls -1
> > > libstlport-45.dll
> > > libstlport.a
> > > libstlport.dll.a
> > > libstlport_stldebug-45.dll
> > > libstlport_stldebug.a
> > > libstlport_stldebug.dll.a
> > > obj
> >
> >
> > > Now I would like to compile file foo.cpp _with stlport libraries_
> > > using the Cygwin/MinGW compiler.
> > > How to do that?
> >
> > g++ -c -o foo.o foo.cpp
> > gcc -o foo -lstlport
> >
> > g++ -mno-cygwin -c -o foo.o foo.cpp
> > gcc -mno-cygwin -o foo -lstlport
> >
> >
>
> $ g++ -c -o foo.o foo.cpp
>
> $ gcc -o foo -lstlport
> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld: cannot find -lstlport
> collect2: ld returned 1 exit status
>
>
> Where should one put stlport libraries ?
>
[snip]

There is some advance.

I put the stlport libraries in /lib.

$ g++ -c -o foo.o foo.cpp

$ g++ -o foo_port.exe foo.o -lstlport

$ g++ -o foo_orig.exe foo.o

$ wc foo*.exe
    462    5847  478971 foo_orig.exe
    462    5847  478971 foo_port.exe
    924   11694  957942 total

$ cygcheck foo*.exe
Found: .\foo_orig.exe
foo_orig.exe
  C:\cygwin\bin\cygwin1.dll
    C:\WINNT\System32\KERNEL32.dll
      C:\WINNT\System32\NTDLL.DLL

Found: .\foo_port.exe
foo_port.exe
  C:\cygwin\bin\cygwin1.dll
    C:\WINNT\System32\KERNEL32.dll
      C:\WINNT\System32\NTDLL.DLL


So, neither wc nor cygcheck see any difference between foo_orig.exe and foo_port.exe.

However,
$ cmp -b foo*.exe
foo_orig.exe foo_port.exe differ: byte 137, line 2 is 167 w 146 f

$ cmp -l foo*.exe
   137 167 146
   217  52  31


Is foo_port.exe really STLported?


Appendix. Extra info.
$ g++ -v -o foo_orig foo.o
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
Configured with: /netrel/src/gcc-3.3.1-1/configure --enable-languages=c,c++,f77,
java --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --wi
thout-included-gettext --enable-interpreter --enable-sjlj-exceptions --disable-v
ersion-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-p
c-cygwin --target=i686-pc-cygwin --prefix=/usr --exec-prefix=/usr --sysconfdir=/
etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model: posix
gcc version 3.3.1 (cygming special)
 /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/collect2.exe -Bdynamic --dll-search-prefi
x=cyg -o foo_orig.exe /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../crt0.o /usr
/lib/gcc-lib/i686-pc-cygwin/3.3.1/crtbegin.o -L/usr/lib/gcc-lib/i686-pc-cygwin/3
.3.1 -L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../.. foo.o -lstdc++ -lgcc -lcyg
win -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc /usr/lib/gcc-lib/i686-pc-cygw
in/3.3.1/crtend.o

$ g++ -v -o foo_port foo.o -lstlport
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
Configured with: /netrel/src/gcc-3.3.1-1/configure --enable-languages=c,c++,f77,
java --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --wi
thout-included-gettext --enable-interpreter --enable-sjlj-exceptions --disable-v
ersion-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-p
c-cygwin --target=i686-pc-cygwin --prefix=/usr --exec-prefix=/usr --sysconfdir=/
etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model: posix
gcc version 3.3.1 (cygming special)
 /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/collect2.exe -Bdynamic --dll-search-prefi
x=cyg -o foo_port.exe /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../crt0.o /usr
/lib/gcc-lib/i686-pc-cygwin/3.3.1/crtbegin.o -L/usr/lib/gcc-lib/i686-pc-cygwin/3
.3.1 -L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../.. foo.o -lstlport -lstdc++ -
lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc /usr/lib/gcc-lib/i6
86-pc-cygwin/3.3.1/crtend.o

--
 =====================================
   Alex Vinokur
     mailto:alexvn AT connect DOT to
     http://mathforum.org/library/view/10978.html
     news://news.gmane.org/gmane.comp.lang.c++.perfometer
   =====================================







--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019