delorie.com/archives/browse.cgi | search |
"Gerrit P. Haase" <gp AT familiehaase DOT de> wrote in message news:75783230946 DOT 20031101124319 AT familiehaase DOT de... [snip] > There are some useful switches for the compiler / linker. You can specify > the include directory to be used during compilation with: > > -I/path/to/stlport-headers > > and the path to the libraries you want to link with: > > -L/usr/lib/stlport > > Usually there is no need to move the libraries around. > [snip] The program with STLport has been compiled. However running the program causes some problem. Here are details. ======================================= Windows 2000 Professional CYGWIN_NT-5.0 1.5.4(0.94/3/2) GNU gcc version 3.3.1 (cygming special) ======================================= ====== 1. Relevant Environment : BEGIN ====== $ cd /STLport-4.5.3/stlport $ ls -l total 205 drwxr-xr-x 4 Administ None 0 Nov 1 15:01 BC50 -rw-r--r-- 1 Administ None 1374 Jan 26 2001 algorithm -rw-r--r-- 1 Administ None 2024 Jan 26 2001 bitset -rw-r--r-- 1 Administ None 1057 Jan 10 2002 cassert -rw-r--r-- 1 Administ None 1922 Jan 26 2001 cctype -rw-r--r-- 1 Administ None 1273 Jan 10 2002 cerrno -rw-r--r-- 1 Administ None 1149 Jan 26 2001 cfloat -rw-r--r-- 1 Administ None 1207 Jan 26 2001 climits -rw-r--r-- 1 Administ None 1356 Jan 10 2002 clocale -rw-r--r-- 1 Administ None 2460 Sep 17 2001 cmath -rw-r--r-- 1 Administ None 1534 Feb 5 2001 complex drwxr-xr-x 3 Administ None 0 Nov 1 15:01 config -rw-r--r-- 1 Administ None 1386 Jan 26 2001 csetjmp -rw-r--r-- 1 Administ None 1328 Jan 26 2001 csignal -rw-r--r-- 1 Administ None 1170 Jan 26 2001 cstdarg -rw-r--r-- 1 Administ None 1528 Jan 10 2002 cstddef -rw-r--r-- 1 Administ None 3515 Jan 10 2002 cstdio -rw-r--r-- 1 Administ None 3258 Aug 23 2001 cstdlib -rw-r--r-- 1 Administ None 1162 Jan 26 2001 cstring -rw-r--r-- 1 Administ None 1663 Jan 10 2002 ctime -rw-r--r-- 1 Administ None 1048 Jan 26 2001 ctype.h -rw-r--r-- 1 Administ None 8536 Jan 10 2002 cwchar -rw-r--r-- 1 Administ None 2314 Feb 2 2002 cwctype -rw-r--r-- 1 Administ None 1205 Jul 31 2001 deque -rw-r--r-- 1 Administ None 5706 Jul 5 2001 exception -rw-r--r-- 1 Administ None 1279 Aug 31 2001 exception.h -rw-r--r-- 1 Administ None 876 Sep 17 2001 export -rw-r--r-- 1 Administ None 821 Sep 17 2001 export.sun -rw-r--r-- 1 Administ None 1506 Feb 5 2001 fstream -rw-r--r-- 1 Administ None 1386 Aug 24 2001 fstream.h -rw-r--r-- 1 Administ None 1120 Jan 26 2001 functional -rw-r--r-- 1 Administ None 982 Jan 26 2001 hash_map -rw-r--r-- 1 Administ None 982 Jan 26 2001 hash_set -rw-r--r-- 1 Administ None 4981 May 15 2001 iomanip -rw-r--r-- 1 Administ None 1676 Oct 9 2001 iomanip.h -rw-r--r-- 1 Administ None 1072 Jan 26 2001 ios -rw-r--r-- 1 Administ None 1341 Aug 24 2001 ios.h -rw-r--r-- 1 Administ None 1305 Feb 5 2001 iosfwd -rw-r--r-- 1 Administ None 2517 Feb 28 2001 iostream -rw-r--r-- 1 Administ None 2701 Aug 24 2001 iostream.h -rw-r--r-- 1 Administ None 1189 Feb 5 2001 istream -rw-r--r-- 1 Administ None 1610 Mar 18 2001 istream.h -rw-r--r-- 1 Administ None 1327 May 25 2001 iterator -rw-r--r-- 1 Administ None 999 Jan 26 2001 limits -rw-r--r-- 1 Administ None 1199 Jul 31 2001 list -rw-r--r-- 1 Administ None 4198 Jan 26 2001 locale -rw-r--r-- 1 Administ None 1048 Jan 26 2001 locale.h -rw-r--r-- 1 Administ None 1156 Jul 31 2001 map -rw-r--r-- 1 Administ None 1365 Jul 25 2001 math.h -rw-r--r-- 1 Administ None 1303 Jan 26 2001 mem.h -rw-r--r-- 1 Administ None 1512 Jan 26 2001 memory -rw-r--r-- 1 Administ None 22 Dec 7 2000 mmemory.h -rw-r--r-- 1 Administ None 3230 Jan 10 2002 new -rw-r--r-- 1 Administ None 1275 Aug 31 2001 new.h -rw-r--r-- 1 Administ None 1099 Jan 26 2001 numeric drwxr-xr-x 2 Administ None 0 Nov 1 15:01 old_hp -rw-r--r-- 1 Administ None 1092 Feb 5 2001 ostream -rw-r--r-- 1 Administ None 1351 Aug 24 2001 ostream.h -rw-r--r-- 1 Administ None 1146 Feb 2 2002 pthread.h -rw-r--r-- 1 Administ None 1117 Jan 26 2001 pthread_alloc -rw-r--r-- 1 Administ None 1188 Jan 26 2001 queue -rw-r--r-- 1 Administ None 301 May 21 2001 rlocks.h -rw-r--r-- 1 Administ None 907 Jan 26 2001 rope -rw-r--r-- 1 Administ None 1156 Jul 31 2001 set -rw-r--r-- 1 Administ None 1074 Jan 26 2001 setjmp.h -rw-r--r-- 1 Administ None 1048 Jan 26 2001 signal.h -rw-r--r-- 1 Administ None 1034 Jul 31 2001 slist -rw-r--r-- 1 Administ None 1312 Feb 5 2001 sstream -rw-r--r-- 1 Administ None 1204 Jul 31 2001 stack -rw-r--r-- 1 Administ None 1048 Jan 26 2001 stdarg.h -rw-r--r-- 1 Administ None 973 Jan 26 2001 stddef.h -rw-r--r-- 1 Administ None 4350 May 21 2001 stdexcept -rw-r--r-- 1 Administ None 1205 Jan 26 2001 stdio.h -rw-r--r-- 1 Administ None 3842 Jan 10 2002 stdio_streambuf -rw-r--r-- 1 Administ None 320 May 21 2001 stdiostream.h -rw-r--r-- 1 Administ None 1046 Jan 26 2001 stdlib.h drwxr-xr-x 4 Administ None 0 Nov 1 15:01 stl -rw-r--r-- 1 Administ None 7536 Nov 29 2001 stl_user_config.h -rw-r--r-- 1 Administ None 1101 Feb 5 2001 streambuf -rw-r--r-- 1 Administ None 1490 Aug 24 2001 streambuf.h -rw-r--r-- 1 Administ None 1390 Mar 21 2001 string -rw-r--r-- 1 Administ None 1052 Sep 29 2001 string.h -rw-r--r-- 1 Administ None 1433 Jan 26 2001 strstream -rw-r--r-- 1 Administ None 1650 Aug 24 2001 strstream.h -rw-r--r-- 1 Administ None 1079 Jan 10 2002 time.h -rw-r--r-- 1 Administ None 2108 Jan 10 2002 typeinfo -rw-r--r-- 1 Administ None 1587 May 18 2001 typeinfo.h drwxr-xr-x 3 Administ None 0 Nov 1 15:01 using -rw-r--r-- 1 Administ None 1465 Jan 26 2001 utility -rw-r--r-- 1 Administ None 1060 Jul 31 2001 valarray -rw-r--r-- 1 Administ None 1264 Jan 26 2001 vector -rw-r--r-- 1 Administ None 1436 Sep 29 2001 wchar.h -rw-r--r-- 1 Administ None 1048 Jan 26 2001 wctype.h drwxr-xr-x 3 Administ None 0 Nov 1 15:01 wrap_std $ cd /bin $ ls -l *stl* -rwxr-xr-x 1 Administ None 1242370 Oct 31 20:15 libstlport-45.dll -rwxr-xr-x 1 Administ None 7431381 Oct 31 20:23 libstlport_stldebug-45.dll // Note. I put those DLLs in /bin ====== 1. Relevant Environment : END ======== ######################################## # File foo.cpp can be seen in attachment ######################################## ====== 2. File foo.cpp -> Ordinary Compilation : BEGIN ====== $ g++ -o foo_orig.exe foo.cpp $ wc foo_orig.exe 462 5847 478971 foo_orig.exe $ cygcheck foo_orig.exe Found: .\foo_orig.exe foo_orig.exe C:\cygwin\bin\cygwin1.dll C:\WINNT\System32\KERNEL32.dll C:\WINNT\System32\NTDLL.DLL ====== 2. File foo.cpp -> Ordinary Compilation : END ======== ====== 3. File foo.cpp -> Compilation with STLport : BEGIN ====== $ g++ -o foo_port.exe foo.cpp -I/STLport-4.5.3/stlport -L/STLport-4.5.3/lib -lstlport Info: resolving _STL::cout by linking to __imp___ZN4_STL4coutE (auto-import) Info: resolving _STL::cerr by linking to __imp___ZN4_STL4cerrE (auto-import) Info: resolving _STL::ios_base::goodbit by linking to __imp___ZN4_STL8ios_base7goodbitE (auto-import) Info: resolving _STL::ios_base::badbit by linking to __imp___ZN4_STL8ios_base6badbitE (auto-import) Info: resolving _STL::ctype<char>::id by linking to __imp___ZN4_STL5ctypeIcE2idE (auto-import) Info: resolving _STL::numpunct<char>::id by linking to __imp___ZN4_STL8numpunctIcE2idE (auto-import) Info: resolving vtable for _STL::basic_streambuf<char, _STL::char_traits<char> >by linking to __imp___ZTVN4_STL15basic_streambufIcNS_11char_traitsIcEEEE (auto-import) $ wc foo_port.exe 97 1595 136981 foo_port.exe $ cygcheck foo_port.exe Found: .\foo_port.exe foo_port.exe C:\cygwin\bin\libstlport-45.dll C:\cygwin\bin\cygwin1.dll C:\WINNT\System32\KERNEL32.dll C:\WINNT\System32\NTDLL.DLL ====== 3. File foo.cpp -> Compilation with STLport : END ======== ====== 4. File foo.cpp -> Run : BEGIN ====== $ foo_orig USAGE : foo_orig all <N> ---> Fibonacci [0 - N] foo_orig th <N> ---> Fibonacci [N] foo_orig some <N1> [<N2> ...] ---> Fibonacci [N1], Fibonacci [N2], ... foo_orig rand <K> [<M>] ---> K random Fibonacci numbers ( < M; Default = 25000 ) $ foo_orig th 5000 Fib [5000] = 3878968454388325633701916308325905312082127714646245106160597214895 55013904403709701082291646221066947929345285888297381348310200895498294036143015 69114789383642165639441069102145056341337065586562382546567007125259299038549338 13928836378347518908762970712033337052923107693008518093849801803847813996748881 76555465378829164426891298038461377896902150229308247566634622492307188332480328 03750391303529033045058427011476352422702109346376991040067141748832984228914912 73104054328753298044273676822977244987749874555691907703880637046832794811358973 73999311010621930814901857081539785437919530561751076105307568878376603366735544 52588448862416192105534574936758978490279882343510235998446639348532564119522218 59563060475364645470760330902420806382584929156452876291575759142343809142302917 49108898415520985443248659407979357131684169286803954530954538869811466508206686 28974206393234384884652409887423958738019769938203171742089322654688793640026307 97780058759129671389634214252579116872755600360311370547754724604639987588046985 178408674382863125 CPU time used : 0.16 sec $ foo_port USAGE : foo_port all <N> ---> Fibonacci [0 - N] foo_port th <N> ---> Fibonacci [N] foo_port some <N1> [<N2> ...] ---> Fibonacci [N1], Fibonacci [N2], ... foo_port rand <K> [<M>] ---> K random Fibonacci numbers ( < M; Default = $ foo_port th 5000 CPU time used : Fib [ ====== 4. File foo.cpp -> Run : END ======== Here is another (very simple) program. ######### File bar.cpp ###### #include <iostream> using namespace std; #define PARAM1 "ABCD" #define PARAM2 12345 #define PARAM3 "XYZ" int main () { cout << "PARAM1 = (" << PARAM1 << ")" << endl; cout << "PARAM2 = (" << PARAM2 << ")" << endl; cout << "PARAM3 = (" << PARAM3 << ")" << endl; return 0; } ############################# ====== 5. File bar.cpp -> Ordinary Compilation : BEGIN ====== $ g++ -o bar_orig.exe bar.cpp $ wc bar_orig.exe 357 5098 400591 bar_orig.exe $ cygcheck bar_orig.exe Found: .\bar_orig.exe bar_orig.exe C:\cygwin\bin\cygwin1.dll C:\WINNT\System32\KERNEL32.dll C:\WINNT\System32\NTDLL.DLL ====== 5. File bar.cpp -> Ordinary Compilation : END ======== ====== 6. File bar.cpp -> Compilation with STLport : BEGIN ====== $ g++ -o bar_port.exe bar.cpp -I/STLport-4.5.3/stlport -L/STLport-4.5.3/lib -lstlport Info: resolving _STL::cout by linking to __imp___ZN4_STL4coutE (auto-import) $ wc bar_port.exe 34 611 48287 bar_port.exe $ cygcheck bar_port.exe Found: .\bar_port.exe bar_port.exe C:\cygwin\bin\libstlport-45.dll C:\cygwin\bin\cygwin1.dll C:\WINNT\System32\KERNEL32.dll C:\WINNT\System32\NTDLL.DLL ====== 6. File bar.cpp -> Compilation with STLport : END ======== ====== 7. File bar.cpp -> Run : BEGIN ====== $ bar_orig PARAM1 = (ABCD) PARAM2 = (12345) PARAM3 = (XYZ) $ bar_port PARAM1 = (ABCD) PARAM2 = ( ====== 7. File bar.cpp -> Run : END ======== -- ===================================== 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |