From: vennerbc AT mindspring DOT com (Bradley Venner) Subject: [mingw32] Help with STL 6 Mar 1998 02:38:21 -0800 Message-ID: <34f5ad10.1429066.cygnus.gnu-win32@mail.cphl.mindspring.com> Reply-To: vennerbc AT mindspring DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit To: gnu-win32 AT cygnus DOT com I would like to use the Template Numerical Toolkit from NIST as part of a project. However, I have had trouble with the STL library with both the gcc2.8.0 and egcs distributions. For example, using some example code from an STL tutorial (below), I get the following errors using the egcs compiler In file included from F:\\egcs\\include\\g++/vector.h:32, from stl_example.cc:3: F:\\egcs\\include\\g++/stl_vector.h:40: parse error before `>' F:\\egcs\\include\\g++/stl_vector.h:44: syntax error before `*' F:\\egcs\\include\\g++/stl_vector.h:45: syntax error before `*' F:\\egcs\\include\\g++/stl_vector.h:46: syntax error before `*' F:\\egcs\\include\\g++/stl_vector.h:47: syntax error before `*' F:\\egcs\\include\\g++/stl_vector.h:48: syntax error before `&' F:\\egcs\\include\\g++/stl_vect and then an illegal operation notice from windows. The compiler seems to work on non-template code (i.e. egcs compiled Lapack) and other non-template C++ code (i.e. the FADBAD automatic differentiation package). I would eventually like to link with S-plus or Matlab, for which I only can afford Windows licences, so I would like to stay in the Windows environment if possible. Any help or advice would be appreciated. ----------------------------------- #include #include #include #include main (int argc, char *argv[]) { int n = atoi (argv[1]); // argument checking removed for clarity vector v; for (int i = 0; i < n; i++) // append integers 0 to n-1 to v v.push_back (i); random_shuffle (v.begin(), v.end()); // shuffle copy (v.begin(), v.end(), ostream_iterator (cout, "\n")); //print } Bradley Venner Department of Biometry and Epidemiology Medical University of South Carolina - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".