Thread: odd errors from msvc std library files

  1. #1
    Registered User blight2c's Avatar
    Join Date
    Mar 2002
    Posts
    266

    odd errors from msvc std library files

    hey all, something happened and i have no clue as to how. all of the sudden these errors came from files i've never heard of or touched. the errors are only in the one workspace. here's a few, there's 102 in all:

    c:\program files\microsoft visual studio\vc98\include\winperf.h(61) : error C2146: syntax error : missing ';' before identifier 'NumObjectTypes'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(61) : error C2501: 'DWORD' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(61) : error C2501: 'NumObjectTypes' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(63) : error C2146: syntax error : missing ';' before identifier 'DefaultObject'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(63) : error C2501: 'LONG' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(63) : error C2501: 'DefaultObject' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(68) : error C2146: syntax error : missing ';' before identifier 'SystemTime'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(68) : error C2501: 'SYSTEMTIME' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(68) : error C2501: 'SystemTime' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(70) : error C2146: syntax error : missing ';' before identifier 'PerfTime'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(70) : error C2501: 'LARGE_INTEGER' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(70) : error C2501: 'PerfTime' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(72) : error C2146: syntax error : missing ';' before identifier 'PerfFreq'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(72) : error C2501: 'LARGE_INTEGER' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(72) : error C2501: 'PerfFreq' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(74) : error C2146: syntax error : missing ';' before identifier 'PerfTime100nSec'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(74) : error C2501: 'LARGE_INTEGER' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(74) : error C2501: 'PerfTime100nSec' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(76) : error C2146: syntax error : missing ';' before identifier 'SystemNameLength'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(76) : error C2501: 'DWORD' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(76) : error C2501: 'SystemNameLength' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(77) : error C2146: syntax error : missing ';' before identifier 'SystemNameOffset'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(77) : error C2501: 'DWORD' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(77) : error C2501: 'SystemNameOffset' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(91) : error C2146: syntax error : missing ';' before identifier 'TotalByteLength'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(91) : error C2501: 'DWORD' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(91) : error C2501: 'TotalByteLength' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(99) : error C2146: syntax error : missing ';' before identifier 'DefinitionLength'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(99) : error C2501: 'DWORD' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(99) : error C2501: 'DefinitionLength' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(107) : error C2146: syntax error : missing ';' before identifier 'HeaderLength'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(107) : error C2501: 'DWORD' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(107) : error C2501: 'HeaderLength' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(111) : error C2146: syntax error : missing ';' before identifier 'ObjectNameTitleIndex'
    c:\program files\microsoft visual studio\vc98\include\winperf.h(111) : error C2501: 'DWORD' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\winperf.h(111) : fatal error C1003: error count exceeds 100; stopping compilation
    Error executing cl.exe.


    the only other thing to note is msvc created a new folder in my workspace called "external dependencies" which contains "basetsd.h". this happened right after i created a bunch of pointers, but it compiled the same as before. i could use any help you can offer
    Last edited by blight2c; 04-28-2002 at 11:05 PM.

  2. #2
    Registered User blight2c's Avatar
    Join Date
    Mar 2002
    Posts
    266
    by not include windows.h i got rid of most the errors, so if someone doesn't mind and post thier windows.h they'd save me the trouble of searching for it tomarrow .

    nighty night all
    Last edited by blight2c; 04-29-2002 at 12:14 AM.

  3. #3
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    what are the includes/code above this header?

    >
    the only other thing to note is msvc created a new folder in my workspace called "external dependencies" which contains "basetsd.h".
    <

    i does this all the time its normal, although the reason for it escapes me at the moment i did know... at least i think i did!
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  4. #4
    Registered User blight2c's Avatar
    Join Date
    Mar 2002
    Posts
    266
    hey no-one thanks for helping, game.h is going through stages of revisions

    Code:
    #include <iostream>
    #include <iomanip>
    #include "openingMenu.h"
    #include "player.h"
    #include "Game.h"
    -----------------player.h---------------------------
    ---//player.h 
    //member functions are defined in player.cpp
    
    #ifndef player_h
    #define player_h
    
    class Player
    {
    public:
    	Player(int fv_num, int fv_bat_str, int fv_bat_aim, int fv_ptch_spd, int fv_ptch_aim, 
    			int fv_fldng, int fv_bs_run, int fv_lck, char *fv_name, int fv_position);
    	void mf_playerStats_display();
    
    private:
    	int num,
    		bat_str,
    		bat_aim,
    		ptch_spd,
    		ptch_aim,
    		fldng,
    		bs_run,
    		lck,
    //1-1st, 2-2nd, 3-3rd, 4-Catcher, 5-Pitcher, 6-sStop, 7-LField, 8-CFeild, 9-LFeild, 10-Bench
    
    		position;
    	char name[20];
    				 
    	void Player::mf_playerStats_set(int fv_num, int fv_bat_str, int fv_bat_aim, int fv_ptch_spd, 
    								int fv_ptch_aim, int fv_fldng, int fv_bs_run, int fv_lck,
    								char *fv_name, int fv_position);
    };
    
    #endif
    
    ---------------------------------game.h----------------------------------
    //Game.h
    //functions in game.cpp
    
    #ifndef Game_h
    #define Game_h
    
    #include "player.h"
    
    class Game
    {
    public:
    	Game();
    	void mf_game_lineup(Player *p_h1);
    
    private:
    	
    	
    
    
    #endif
    
    --------------------------opening_menu.h------------------------------
    //declaration of openingMenu class
    //member functions are define in openingMenu1.cpp
    
    #ifndef openingMenu_h
    #define openingMenu_h
    
    class OpeningMenu 
    {
    public:
    	OpeningMenu();
    	int mf_openingMenu_switch();
    
    
    private:
    	char mf_openingMenu_display();
    	char openingMenu_choice;
    };
    
    #endif

  5. #5
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    General debugging tip:
    The first error is always right (so start there).
    The rest may or may not be a result of that one and go away once it's fixed.

    My guess is that in your game.h header you forgot the }; at the end of the file which will mess up the compiler (it will parse everything wrong). Typically that many errors and having them in files that aren't yours usually means you forgot a semi-colon or you have mismatching {} or () something like that.
    If a tree falls in the forest, and no one is around to see it, do the other trees make fun of it?

  6. #6
    Registered User blight2c's Avatar
    Join Date
    Mar 2002
    Posts
    266
    thanks tgm, you hit the nail on the head. i got flustered and overlooked the obvious. it helps to put a little sleep betwix you and the problem

  7. #7
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    Originally posted by blight2c
    i got flustered and overlooked the obvious. it helps to put a little sleep betwix you and the problem
    That and using an objective observer. It's always easier to find errors in somebody else's code. That's why it's a good idea to have someone else look at your code if you're having problems.
    If a tree falls in the forest, and no one is around to see it, do the other trees make fun of it?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-01-2009, 04:53 PM
  2. odd MSVC link.exe behavior
    By skorman00 in forum Tech Board
    Replies: 2
    Last Post: 09-11-2006, 12:25 PM
  3. c++ compiling errors... very odd!
    By renderstream in forum C++ Programming
    Replies: 9
    Last Post: 03-07-2004, 05:39 PM
  4. ODD error(s);
    By RoD in forum C++ Programming
    Replies: 6
    Last Post: 12-09-2002, 05:35 AM
  5. Linker errors with simple static library
    By Dang in forum Windows Programming
    Replies: 5
    Last Post: 09-08-2001, 09:38 AM