Thread: Help with an error

  1. #1
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Help with an error

    Does anyone know what the errors Constant is long and Cannot create pre-compiled header: code in header means?
    Actually, they are not really errors, only warnings. But I would still like to eliminate them .
    Since my code is pretty long, I'm not posting it here...
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  2. #2
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    .
    Last edited by Troll_King; 12-01-2001 at 10:13 AM.

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    79
    "Cannot create pre-compiled header: code in header" means exactly what it says: you have put all the code in a .h-file instead of making a header with all the function and class declarations and a .cpp-file with the definitions. There is nothing wrong with this, but Borland (it is Borland, right? At least Borlande produces exactly that kind of warning) cannot create a precompiled version of the .cpp-file for faster compile next time because the .cpp-file doesn't exist.

  4. #4
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Arghh

    I always forget to say which compiler I use. It's Borland, yes. (Think I'm gonna put it into my signature ).

    Actually, I only have .cpp files, no .h files. So the compiler thinks it's one big header file??? Weird.
    Well, guess I'll have to split up the code into header and cpp files .

    And what about constant is long? I get that warning at about a million places... Exactly what does it mean? Here are some examples of where the warning occurs:

    Vga=(unsigned char*)0xA0000000; Well, this adress is kind of long...

    WAVFile=fopen(FileName, "rb"); ?????

    LinearAddress=(LinearAddress<<4)+FP_OFF(TempBuf); ?????

    Thanks for your help!
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM