Strange mmsystem error

This is a discussion on Strange mmsystem error within the Game Programming forums, part of the General Programming Boards category; Hi, I'm currently working off a tutorial, but I can't get past the 3rd line of code This is my ...

  1. #1
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879

    Strange mmsystem error

    Hi, I'm currently working off a tutorial, but I can't get past the 3rd line of code This is my code so far:
    Code:
    #pragma comment (lib, "dsound.lib")
    #pragma comment (lib, "winmm.lib")
    
    #include <mmsystem.h>  //<----------
    #include <dsound.h>
    When I try to compile, I keep getting this error:
    Code:
    (...)/mmsystem.h(113) : error C2146: syntax error : missing ';' before identifier 'MMVERSION'
    (...)/mmsystem.h(113) : fatal error C1004: unexpected end of file found
    I'm pretty sure all the proper libs are linked, at least all the ones mentioned in the tutorial, unless the #pragma comment isn't the correct way to do it (?). The program compiles fine if I comment out the "#include <mmsystem.h>". Does anybody know what I'm doing wrong, or should I reinstall my compiler/sdk?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  2. #2
    pops
    Guest
    Looks like it's hanging on the UINT. Try including <windows.h> before <mmsystem.h>.

  3. #3
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Ok, thanks. I'll try it when I get home, I think it should work.

    **EDIT**
    You da man!
    Last edited by Hunter2; 06-06-2003 at 06:52 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 09:39 AM
  2. Why wont my function exit correctly?
    By LightsOut06 in forum C Programming
    Replies: 2
    Last Post: 10-09-2005, 10:23 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  4. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 11:52 PM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 09:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21