Okay, I've got it narrowed down to this, and
it seems to hinge on the fact that "MainWindow" is a derived class (nb, that is the recommended method and as mentioned, works fine except for the map!!!):
Code:
#include <gtkmm.h>
#include <map>
#include <vector>
#include <string>
#include <iostream>
using namespace std;
class MainWindow : public Gtk::Window {
//class MainWindow {
public:
vector<string> okay;
map<string,int > testdata;
MainWindow(vector<string> &exc);
};
int main(int argc, char *argv[]) {
map<string,int> testdata;
return 0;
}
The map in main() is fine. If I switch the //comment around so MainWindow is not derived, it's fine. The vector<string> in MainWindow is fine either way. The error is:
copy.cpp:13: error: ISO C++ forbids declaration of ‘map’ with no type
copy.cpp:13: error: expected ‘;’ before ‘<’ token
Again, I've tried placing spaces inside <>, etc. What's going on? This happens on gcc 4.4.1 as well.