This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

STLport with the Cygwin/MinGW compiler (was :: C++ Compilers : Comparative Performance Testsuite)


"Alex Vinokur" <alexvn@connect.to> wrote in message bnvmhe$um1$1@sea.gmane.org">news:bnvmhe$um1$1@sea.gmane.org...
> Hi Gerrit,
>
> "Gerrit P. Haase" <gp@familiehaase.de> wrote in message 118743930094.20031101014819@familiehaase.de">news:118743930094.20031101014819@familiehaase.de...
> > Hallo Alex,
> >
> > Am Freitag, 31. Oktober 2003 um 19:41 schriebst du:
> >
> >
> > > "Gerrit P. Haase" <freeweb@nyckelpiga.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@connect.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]