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 8075879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:08:25+00:00 2026-06-05T15:08:25+00:00

I am using VC2010, trying to compile some library written in C99 for Linux.

  • 0

I am using VC2010, trying to compile some library written in C99 for Linux. The following line gives error C2275: ‘uint8_t’ : illegal use of this type as an expression

uint8_t * G = (uint8_t*)calloc(N ,sizeof(uint8_t));

subhint: stdint.h(21) : see declaration of ‘uint8_t’, and that line is:

typedef unsigned char uint8_t;

and then come the accumulated problems: error C2065: ‘G’ : undeclared identifier etc. What is illegal here?

  • 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-06-05T15:08:29+00:00Added an answer on June 5, 2026 at 3:08 pm

    A similar question was already answered:
    error C2275 : illegal use of this type as an expression

    Answer:
    When you name your source files *.c, MSVC assumes it’s compiling C, which means C89. All function-local variables need to be declared at the beginning of your functions.

    Workarounds include:
    – declaring/initializing all local variables at the beginning of your
    function
    – rename the source files to *.cpp or equivalent and compile
    as C++.

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

Sidebar

Related Questions

I have come across a weird compiler error (using VC2010) while trying to compile
I was trying to compile our project in Visual Studio 2010 using the 2005
I am using C#, WinForms, In VS2010 Pro and trying to run one line
I am trying to compile some code that was given to me that I'm
I'm trying to develop a custom PDF viewer using PDFLibNet library. I downloaded compiled
Using AutoFac 2.3.2, I am trying to do the following: var builder = new
I'm trying to compile a web project solution using MSBuild which has other web-projects
Using VS2010's find dialog, I'm using the following regex: (?'outer'^div\#.+) input$ . I'm trying
While trying to compile a Silverlight project for Windows Phone using Visual Studio 2010
I am trying to implement the eigenface algorithm using OpenCV in VS2010. I am

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.