Thread: Includes

  1. #1
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138

    Includes

    Does anyone know where I can download only a library because the winreg.h that came with my compiler does not work(when I compile, 31 errors are pointed towards it.) By the way, I use Bloodshed.

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    You could try to reinstall the compiler... or read the FAQ

  3. #3
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339
    Or do a google search:

    http://www.google.co.uk/search?q=%22...22&hl=en&meta=


    Thanks
    TNT
    TNT
    You Can Stop Me, But You Cant Stop Us All

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Bloodshed's DevC++ comes with MinGW version 295.2 The latest version of the mingw compiler is 295.3(stable) and is available as a single mingw1.1 release. Go to:

    http://www.mingw.org for details

    (I think there's a link to a SourceForge proj).

    Note that the directory structure of DevC++ and Mingw are different so install it to a different directory and just copy the headers, libs etc to their repective DevC++ directories. Or you may wish to leave the original dev distribution intact and install the latest mingw into a different directory and compile from the cmd line.

    This still may fail as the latest mingw release still has many incomplete windows (and a few other) headers.

    I didn't know about winreg.h, though. If, after getting the latest mingw headers you still get errors, would you mind re-posting? Maybe we could work out a fix...?

  5. #5
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    here's the code


    Code:
    #include <iostream.h>
    #include <winreg.h>
    
    int main()
    {
      TCHAR myregval[]="Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explor    er\\NoActiveDesktopChanges"; 
     LONG checker=RegDeleteValue(HKEY_CURRENT_USER,myregval)
    
      if (!checker) cout<<"Delete of "<<myregval<<" successful";
      return 0;}

  6. #6
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    sorry about bad indention. The copy and paste method doesn't work to great on this board.

  7. #7
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    I just checked the headers (both the DevC and mingw 295.3) and both seem to be fine.

    I think that perhaps you should:

    #include <windows.h>

    In this case you probably won't have to #include winreg.h at all as it will probably #include it somewhere along the line.

    If that fails simply #include winreg.h after #include <windows.h> and recompile.

    I suspect one or the other will work ok.

    I hope that helps.

  8. #8
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    Thanks, all I had to do was include windows.h and not winreg.h. I never thought of doing that. Boy do I feel stupid.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Makefile and includes
    By Lang in forum C Programming
    Replies: 4
    Last Post: 03-18-2008, 03:29 AM
  2. Avoiding multiple includes
    By plan7 in forum C Programming
    Replies: 5
    Last Post: 11-25-2007, 06:13 AM
  3. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  4. Circular includes
    By ventolin in forum C++ Programming
    Replies: 2
    Last Post: 05-23-2004, 05:43 PM
  5. #includes
    By RedLenses in forum C++ Programming
    Replies: 3
    Last Post: 01-02-2002, 03:59 PM