Thread: loading libraries

  1. #1
    Unredg
    Guest

    loading libraries

    i have implemented music in one of my programs using the windows multimedia library winmm.lib, but to get my program to run on a different machine i have to go to properties..links and add winmm.lib before my code will compile...is there any way i can hard code it into my program?

  2. #2
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    under includes, no semi on the end:

    #pragma comment(lib, "winmm.lib")

  3. #3
    Unredg
    Guest
    cool beans man

  4. #4
    Unredg
    Guest
    what does the name comment have to do w/anything, or is it just like a variable name

    i want to do winmm.lib and fmodvc.lib so would it look like this...

    #pragma comment1(lib, "winmm.lib")
    #pragma comment2(lib, "fmodvc.lib")

  5. #5
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    I think it would still just be #pragma comment( lib, "whatever.lib" ) for both, but I'm not sure.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  6. #6
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    just comment, heres right outt one of my programs

    #pragma comment(lib, "opengl32.lib")
    #pragma comment(lib, "glu32.lib")
    #pragma comment(lib, "glaux.lib")

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cargo loading system
    By kyle rull in forum C Programming
    Replies: 1
    Last Post: 04-20-2009, 12:16 PM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. MinGW thread-safe runtime libraries
    By Mario F. in forum C++ Programming
    Replies: 3
    Last Post: 08-21-2006, 08:15 AM
  4. Loading a bitmap (Without using glaux)
    By Shamino in forum Game Programming
    Replies: 7
    Last Post: 03-16-2006, 09:43 AM
  5. Loading Screen
    By pinkcheese in forum Windows Programming
    Replies: 2
    Last Post: 04-06-2002, 11:48 PM