Find the answer to your Linux question:
Results 1 to 3 of 3
I have two machines, M1 which is RH9, with gcc 3.2.2. M2 is a remote machine with gcc 2.95.2. My program comiles and runs ok on M2. However, I get ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Posts
    21

    Using hash_map,


    I have two machines, M1 which is RH9, with gcc 3.2.2. M2 is a remote machine with gcc 2.95.2. My program comiles and runs ok on M2. However, I get compilation errors on M1. It seems that M1 doesn't have <hash_map> or <functional>... Does anyone know what the problem could be and how I might resolve it? Thanks.

  2. #2
    Just Joined!
    Join Date
    May 2005
    Posts
    1
    In gcc 3.2 the hash_map extension is now included as <ext/hash_map> instead of <hash_map> (which was what it was in 2.95). I don't know about <functional>. If it is an extension (i.e. non-standard STL component) then it is probably the same issue.

    So, change the line to

    #include <ext/hash_map>

  3. #3
    Just Joined!
    Join Date
    Apr 2005
    Posts
    21
    Thanks! I'll try it out.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •