extremely odd error, i mean maximum extremeness oddness error

This is a discussion on extremely odd error, i mean maximum extremeness oddness error within the Windows Programming forums, part of the Platform Specific Boards category; here is one my .h files: Code: #define IDR_MYMENU 101 #define IDI_MYICON 102 #define ID_FILE_EXIT 103 #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ...

  1. #1
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753

    extremely odd error, i mean maximum extremeness oddness error

    here is one my .h files:
    Code:
    #define IDR_MYMENU 101
    #define IDI_MYICON 102
    #define ID_FILE_EXIT 103
    
    
    #ifdef APSTUDIO_INVOKED
    #ifndef APSTUDIO_READONLY_SYMBOLS
    #define _APS_NEXT_RESOURCE_VALUE        103
    #define _APS_NEXT_COMMAND_VALUE         40004
    #define _APS_NEXT_CONTROL_VALUE         1000
    #define _APS_NEXT_SYMED_VALUE           101
    #endif
    #endif
    I try and run my program, and I get an error that says "Unexpected end of file found" and it pointed to the last line of that header file where is says "#endif".

    I keep trying to run it and get the same error. Now, to fix it I had to first change that file to:
    Code:
    #ifdef APSTUDIO_INVOKED
    #ifndef APSTUDIO_READONLY_SYMBOLS
    #define _APS_NEXT_RESOURCE_VALUE        103
    #define _APS_NEXT_COMMAND_VALUE         40004
    #define _APS_NEXT_CONTROL_VALUE         1000
    #define _APS_NEXT_SYMED_VALUE           101
    #endif
    #endif
    
    #define IDR_MYMENU 101
    #define IDI_MYICON 102
    #define ID_FILE_EXIT 103
    i run it, and get the same error. Now, I change that file to:
    Code:
    #define IDR_MYMENU 101
    #define IDI_MYICON 102
    #define ID_FILE_EXIT 103
    
    #ifdef APSTUDIO_INVOKED
    #ifndef APSTUDIO_READONLY_SYMBOLS
    #define _APS_NEXT_RESOURCE_VALUE        103
    #define _APS_NEXT_COMMAND_VALUE         40004
    #define _APS_NEXT_CONTROL_VALUE         1000
    #define _APS_NEXT_SYMED_VALUE           101
    #endif
    #endif
    Now, this is the same file I had in the beginning, and all of the sudden WOOOOO! It works!

    how the heck does that happen? just from moving a chunk of text to the end, and back to the beginning fixes it?

    could someone please explain this?

  2. #2
    J.J.
    Guest
    I get the same error with my header files sometimes. What I do is to add '{'s around the #defines, which gives other errors, then remove the '{'s and it works fine.
    Must be an error similar to the no floating point library loaded thing, where you have to add a floating point operation you dont need just to get the thing to work.

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    119
    Leeman_s, What compiler are you using?
    If you speak or are learning Spanish, check out this Spanish and English Dictionary, it is a handy online resource.
    What happens is not as important as how you react to what happens. -Thaddeus Golas

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>What compiler are you using?<<

    Code:
    #ifdef APSTUDIO_INVOKED
    #ifndef APSTUDIO_READONLY_SYMBOLS
    #define _APS_NEXT_RESOURCE_VALUE        103
    #define _APS_NEXT_COMMAND_VALUE         40004
    #define _APS_NEXT_CONTROL_VALUE         1000
    #define _APS_NEXT_SYMED_VALUE           101
    #endif
    #endif
    Looks like the unmistakeable junk msvc adds to a resource script.

    Another workaround for such intermittent behaviour is to close project, delete the *.aps file, reopen your project and rebuild.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 10:15 PM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 09:11 AM
  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. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21