Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7565601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:11:48+00:00 2026-05-30T14:11:48+00:00

After having converted a project from Visual Studio 2005 to Visual Studio 2010, it

  • 0

After having converted a project from Visual Studio 2005 to Visual Studio 2010, it appears the project doesn’t build anymore and spits out tons of C2059 errors like:

`error C2059: syntax error : ‘type’

We’re using Visual Studio 2010 Professional which doesn’t provide static code analysis.

Here is the full log for the compilation of 1 C file for reference:

1>------ Build started: Project: VoHR, Configuration: Debug Win32 ------
1>  AKAsynch.c
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(88): error C2059: syntax error : 'type'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(107): error C2059: syntax error : '}'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(119): error C2059: syntax error : 'type'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(139): error C2059: syntax error : '}'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:11:49+00:00Added an answer on May 30, 2026 at 2:11 pm

    I tracked down the reason of those sudden compiler errors.

    In the great tradition of windows.h it appears that Microsoft introduced tokens that cause name clashes with our codebase.

    In our precise case, we had:
    #define Null (void*)0

    Somewhere in our code, we need to use the offsetof macro and to make it available we #include <stddef.h>

    I tracked down stddef.h in turns includes crtdefs.h which ends up including sal.h where our Null macro seems to clash with source code annotation in MS headers…

    As a workaround, we did:

    #if defined(_MSC_VER) && _MSC_VER >= 1600
    #pragma push_macro("Null")
    #undef Null
    #endif
    #include <stddef.h>
    #if defined(_MSC_VER) && _MSC_VER >= 1600
    #pragma pop_macro("Null")
    #endif
    

    Our use of Null as a macro is arguable, still I would have expected MS to find a way to avoid clashes with existing code bases.

    Hope that helps those facing the same issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I seem to be having two issues with my project after I converted from
I recently converted a website project to a web application project in Visual Studio
After having converted a messed up XML using regex, I now need to change
I'm getting a build error in Visual Studio that's not making any sense: The
I recently converted a project from WPF 3.5 to WPF 4.0. Functionally, everything works,
I'm currently working on a C++ MFC project on visual studio 2003. The aim
After having read that QuickSilver was no longer supported by BlackTree and has since
After having looked at each of these two projects, it seems that both are
After having solved the problem of getting the editor to launch when there's a
After having a search around I could not find exactly what I want, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.