Thread: Can't open precompiled header

  1. #1
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    798

    Can't open precompiled header

    I have been working most of the day on debugging a project and finally got it to work earlier, so went and had a break. Then I came back tonight to clean up my code a bit, #define some magic numbers and stuff and now my program won't compile. It gives this error:

    c:\program files\microsoft visual studio\myprojects\project cain\project cain\control centre.cpp(6) : fatal error C1083: Cannot open precompiled header file: 'Debug/Project CAIN.pch': Permission denied

    Anyone know what is going on?

  2. #2
    Veni Vidi Vice
    Join Date
    Aug 2001
    Posts
    343
    Iīm not sure but isnīt precompiled header files just libraries???

  3. #3
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    798
    Ok I fixed it fine. For future reference, if anyone has this problem, go to project->settings (this is MSVC++), click C/C++ tab and change the list box to precompiled headers. Then there will be an option for you to 'not use precompiled headers'. I clicked this option and everything is fine now. It was previously on 'Automatic use of precompiled headers', and as I said before it wouldn't work.....lot of good that is!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. IP header "total length" vs. packet size
    By MK27 in forum Networking/Device Communication
    Replies: 2
    Last Post: 01-04-2009, 07:45 AM
  2. Replies: 7
    Last Post: 09-23-2008, 11:18 AM
  3. precompiled header file
    By George2 in forum C++ Programming
    Replies: 20
    Last Post: 04-07-2008, 08:14 AM
  4. Open Source Licenses
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 10-10-2006, 08:53 PM
  5. Many Header Files
    By matth in forum C++ Programming
    Replies: 3
    Last Post: 03-08-2005, 02:45 PM