HighTechTalks DotNet Forums  

MFC error C2059: syntax error : ')'

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss MFC error C2059: syntax error : ')' in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jon K
 
Posts: n/a

Default MFC error C2059: syntax error : ')' - 09-19-2004 , 02:36 AM






Hi

I am new to C++, using VS NET 2003


I used the wizard to create a simple MFC Application project and did not
add or change anything.

When I try to compile there are many errors, the first is really strange:


error C2059: syntax error : ')'

in the afxdlgs.h line:

void CFontDialog(LPLOGFONT lplfInitial = NULL, DWORD dwFlags =
CF_EFFECTS | CF_SCREENFONTS, CDC* pdcPrinter = NULL, CWnd* pParentWnd =
NULL)


Do I need new libraries?
If yes, how?


Thanks in advance

JK


Reply With Quote
  #2  
Old   
Peter van der Goes
 
Posts: n/a

Default Re: MFC error C2059: syntax error : ')' - 09-19-2004 , 09:06 AM







"Jon K" <NoSpam (AT) NoSpam (DOT) Net> wrote

Quote:
Hi

I am new to C++, using VS NET 2003


I used the wizard to create a simple MFC Application project and did not
add or change anything.

When I try to compile there are many errors, the first is really strange:


error C2059: syntax error : ')'

in the afxdlgs.h line:

void CFontDialog(LPLOGFONT lplfInitial = NULL, DWORD dwFlags =
CF_EFFECTS | CF_SCREENFONTS, CDC* pdcPrinter = NULL, CWnd* pParentWnd =
NULL)


Do I need new libraries?
If yes, how?


Thanks in advance

JK

You made no selections within the Application Wizard at all, correct?
What happens if you select other templates and attempt to create a project,
like plain Win 32 or Win 32, then select Console Application?
As I was unable to replicate your difficulties here by creating an MFC
project in VS .NET 2003, then clicking Finish (the project compiles and runs
fine), my initial impression is that your installation of Visual Studio is
flawed. I'd be considering a complete uninstall/reinstall, pending further
details on your situation.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.




Reply With Quote
  #3  
Old   
Jon K
 
Posts: n/a

Default Re: MFC error C2059: syntax error : ')' - 09-19-2004 , 11:54 AM



Peter van der Goes wrote:
Quote:
"Jon K" <NoSpam (AT) NoSpam (DOT) Net> wrote in message
news:eebhQqhnEHA.3352 (AT) TK2MSFTNGP15 (DOT) phx.gbl...

error C2059: syntax error : ')'

in the afxdlgs.h line:

void CFontDialog(LPLOGFONT lplfInitial = NULL, DWORD dwFlags =
CF_EFFECTS | CF_SCREENFONTS, CDC* pdcPrinter = NULL, CWnd* pParentWnd =
NULL)


You made no selections within the Application Wizard at all, correct?
Yes

Quote:
What happens if you select other templates and attempt to create a project,
like plain Win 32 or Win 32, then select Console Application?
Win 32 is ok, VB, C# also ok.

Quote:
As I was unable to replicate your difficulties here by creating an MFC
project in VS .NET 2003, then clicking Finish (the project compiles and runs
fine), my initial impression is that your installation of Visual Studio is
flawed. I'd be considering a complete uninstall/reinstall, pending further
details on your situation.

Did you install the SP1 or other libraries?

Thanks for repplying

JK



Reply With Quote
  #4  
Old   
Peter van der Goes
 
Posts: n/a

Default Re: MFC error C2059: syntax error : ')' - 09-19-2004 , 03:42 PM




"Jon K" <NoSpam (AT) NoSpam (DOT) Net> wrote

Quote:
Did you install the SP1 or other libraries?

Thanks for repplying

JK

You made no mention of the .NET Framework v1.1 SP1 in your original post.
I do not have SP1 installed here as it is not installed in the classrooms
and labs of my college and I must remain compatible when correcting
assignments.
If you did install SP1, uninstall it and see if that changes anything. If
you did not install SP1, there is a problem on your PC.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.




Reply With Quote
  #5  
Old   
Jon K
 
Posts: n/a

Default Re: MFC error C2059: syntax error : ')' - 09-20-2004 , 10:25 AM





Peter van der Goes wrote:
Quote:
"Jon K" <NoSpam (AT) NoSpam (DOT) Net> wrote in message
news:%23vWeKimnEHA.592 (AT) TK2MSFTNGP11 (DOT) phx.gbl...

Did you install the SP1 or other libraries?

Thanks for repplying

JK


You made no mention of the .NET Framework v1.1 SP1 in your original post.
I do not have SP1 installed here as it is not installed in the classrooms
and labs of my college and I must remain compatible when correcting
assignments.
If you did install SP1, uninstall it and see if that changes anything. If
you did not install SP1, there is a problem on your PC.

Sorry not to be clear, I did not install SP1. I was trying to know if
your environment is the same as mine, that's all

I did not change any configuration for MFC.

If the only solution is to reinstall everything, I will not use MFC.


Thanks for your answer

JK



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.