Thread: MSVC++ 6.0 Error

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    288

    MSVC++ 6.0 Error

    When i try to compile my Static Library, i keep getting this error:

    fatal error C1010: unexpected end of file while looking for precompiled header directive

    The source file is including the right header file but I dont understand why its not working

    Source File:
    Code:
    #include "BX.h"
    
    void SetBXData(char *Caption, HWND Parent, int Id)
    {
    	...
    }
    
    LRESULT APIENTRY BXProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
    {
    	...
    }
    Header File:
    Code:
    #ifndef _BX_H_
    #define _BX_H_
    
    #define BX_MIN WM_USER + 1
    
    enum {BX_SETTEXTCOLOR = BX_MIN, BX_GETTEXTCOLOR};
    
    void SetBXData(char *Caption, HWND Parent, int Id);
    LRESULT APIENTRY BXProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
    
    #endif _BX_H_
    Is there anything wrong with it?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Disable pre-compiled headers in your project settings.

    For VC++ 6.0:
    Project -> Settings... -> (All Configurations) -> C/C++ tab -> Category: "Precompiled Headers" -> "Not using precompiled headers"

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  4. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 08:11 AM
  5. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM