GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Jun-2006, 06:22
angel188 angel188 is offline
New Member
 
Join Date: Jun 2006
Posts: 3
angel188 is on a distinguished road

getting following errors in vc++


Hi

I have one opensource of vc++. While executing this code it is giving the following errors.

1)error C2433: 'HWND' : 'inline' not permitted on data declarations

2)error C2143: syntax error : missing ';' before '{'

3)error C2447: '{' : missing function header (old-style formal list?)

4)error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

5)error C2086: 'int CALLBACK' : redefinition

If any one got these errors and knew the solution please let me know.

Thank You
angle
  #2  
Old 09-Jun-2006, 13:22
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 4,791
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: getting following errors in vc++


Quote:
Originally Posted by angel188
Hi

I have one opensource of vc++. While executing this code it is giving the following errors.
.
.
.
If any one got these errors and knew the solution please let me know.

There are many (tens, hundreds, ...) ways to get errors. Please post your code. Then someone may be able to help tell how your code (or your development environment, or whatever...) caused the errors.

Post the exact error messages (including line numbers). Paste the messages directly in your post (don't paraphrase or abbreviate).

In addition to showing us the code, tell us what compiler you are using. Sometimes it makes a difference to people trying to help.

Regards,

Dave
  #3  
Old 12-Jun-2006, 05:07
angel188 angel188 is offline
New Member
 
Join Date: Jun 2006
Posts: 3
angel188 is on a distinguished road

Re: getting following errors in vc++


Thanks for ur reply.

Here I am posting the errors and the code where i am getting these errors with line no.

1) Error 1 error C2146: syntax error : missing ';' before identifier 'HwndMSWheel' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141


2)Error 2 error C2433: 'HWND' : 'inline' not permitted on data declarations c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141


3)Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141


4)Error 4 error C2065: 'PUINT' : undeclared identifier c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 142


5)Error 5 error C2146: syntax error : missing ')' before identifier 'puiMsh_MsgMouseWheel' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 142


6)Error 6 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 142


7)Error 7 error C2059: syntax error : ')' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 146


Error 8 error C2143: syntax error : missing ';' before '{' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 148


9)Error 9 error C2447: '{' : missing function header (old-style formal list?) c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 148



The code is:

Line.No

__inline HWND HwndMSWheel( (141)

PUINT puiMsh_MsgMouseWheel, (142)

PUINT puiMsh_Msg3DSupport,

PUINT puiMsh_MsgScrollLines,

PBOOL pf3DSupport,

PINT piScrollLines) (146)

{ (14

HWND hdlMsWheel;

hdlMsWheel = FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE);

*puiMsh_MsgMouseWheel = RegisterWindowMessage(MSH_MOUSEWHEEL);

*puiMsh_Msg3DSupport = RegisterWindowMessage(MSH_WHEELSUPPORT);

*puiMsh_MsgScrollLines = RegisterWindowMessage(MSH_SCROLL_LINES);

if (*puiMsh_Msg3DSupport)

*pf3DSupport = (BOOL)SendMessage(hdlMsWheel, *puiMsh_Msg3DSupport, 0, 0);

else

*pf3DSupport = FALSE; // default to FALSE

if (*puiMsh_MsgScrollLines)

*piScrollLines = (int)SendMessage(hdlMsWheel, *puiMsh_MsgScrollLines, 0, 0);

else

*piScrollLines = 3; // default

return(hdlMsWheel);

}

I think this will be helpful in giving suggestions and modifications.



Thanku
  #4  
Old 13-Jun-2006, 04:38
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough

Re: getting following errors in vc++


Did you try to remove the inline word?
  #5  
Old 13-Jun-2006, 15:10
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 4,791
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: getting following errors in vc++


Quote:
Originally Posted by angel188
Thanks for ur reply.

Here I am posting the errors and the code where i am getting these errors with line no.

1) Error 1 error C2146: syntax error : missing ';' before identifier 'HwndMSWheel' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141


2)Error 2 error C2433: 'HWND' : 'inline' not permitted on data declarations c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141


3)Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141
.
.
.
<windows.h> must be #included before <zmouse.h>

CPP / C++ / C Code:
#include <stdio.h>
/*#include <windows.h> */
#include <zmouse.h>

int main()
{
    printf("Hello\n");
    return 0;
}

errors:

c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\zmouse.h(141) : error C2146: syntax error : m
issing ';' before identifier 'HwndMSWheel'
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\zmouse.h(141) : error C2433: 'HWND' : 'inline
' not permitted on data declarations
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\zmouse.h(141) : error C4430: missing type spe
cifier - int assumed. Note: C++ does not support default-int
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\zmouse.h(142) : error C2065: 'PUINT' : undecl
ared identifier
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\zmouse.h(142) : error C2146: syntax error : m
issing ')' before identifier 'puiMsh_MsgMouseWheel'
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\zmouse.h(142) : error C4430: missing type spe
cifier - int assumed. Note: C++ does not support default-int
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\zmouse.h(147) : error C2059: syntax error : '
)'
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\zmouse.h(148) : error C2143: syntax error : m
issing ';' before '{'
c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\zmouse.h(148) : error C2447: '{' : missing fu
nction header (old-style formal list?)


Looks familiar.

Now:

CPP / C++ / C Code:
#include <stdio.h>
#include <windows.h>
#include <zmouse.h>

int main()
{
    printf("Hello\n");
    return 0;
}

Compiles with no messages. Output:
Code:
Hello


Regards,

Dave
 
 

Recent GIDBlogStupid Management Policies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
syntax errors in document coder MS Visual C++ / MFC Forum 0 11-Mar-2006 05:12
Compiler errors vital_101 C Programming Language 4 12-Jan-2006 14:53
Help with compiler errors Krandygrl00 C++ Forum 3 01-Jun-2005 08:45
Linker errors with multiple file progam nkhambal C Programming Language 2 24-Apr-2005 03:37
help to debug complier errors nkhambal C Programming Language 3 04-Oct-2004 09:26

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 17:26.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.