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

  • Home
  • SEARCH
  • 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 9172567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:22:45+00:00 2026-06-17T16:22:45+00:00

I have a trivial driver, like so: #include <ntddk.h> NTSTATUS DriverEntry(__in DRIVER_OBJECT* a, __in

  • 0

I have a trivial driver, like so:

#include <ntddk.h>

NTSTATUS DriverEntry(__in DRIVER_OBJECT* a, __in UNICODE_STRING* b)
{
    UNREFERENCED_PARAMETER(a);
    UNREFERENCED_PARAMETER(b);

    int c; // this fails the build

    return 0;
}

A trivial makefile

TARGETNAME=main
TARGETTYPE=DRIVER
MSC_WARNING_LEVEL=/W4 /WX
SOURCES=main.c

With a non trival build output

C:\Test>pushd %cd%

C:\Test>C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1 fre x64 wnet
WARNING: x64 Native compiling isn't supported. Using cross compilers.
Launching OACR monitor

C:\WinDDK\7600.16385.1>popd

C:\Test>build

BUILD: Compile and Link for AMD64
BUILD: Loading c:\winddk\7600.16385.1\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Start time: Thu Jan 17 10:57:58 2013
BUILD: Examining c:\test directory for files to compile.
BUILD: Saving c:\winddk\7600.16385.1\build.dat...
BUILD: Compiling and Linking c:\test directory
Configuring OACR for 'root:amd64fre' - <OACR on>
_NT_TARGET_VERSION SET TO WS03
Compiling - main.c
1>errors in directory c:\test
1>c:\test\main.c(9) : error C2143: syntax error : missing ';' before 'type'
Linking Executable - objfre_wnet_amd64\amd64\main.sys
1>link : error LNK1181: cannot open input file 'c:\test\objfre_wnet_amd64\amd64\main.obj'
BUILD: Finish time: Thu Jan 17 10:57:58 2013
BUILD: Done

    3 files compiled - 1 Error
    1 executable built - 1 Error

How on Earth can this result in a error C2143: syntax error : missing ';' before 'type'?

Not all declerations fail, I seem to be able to declare globals but not local variables.

  • 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-17T16:22:46+00:00Added an answer on June 17, 2026 at 4:22 pm

    The problem is that Microsoft C compilers only support C89 standard, which does not permit the intermingling of declarations and code. Change to:

    {
        int c;
    
        UNREFERENCED_PARAMETER(a);
        UNREFERENCED_PARAMETER(b);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Probably a very trivial problem. I have an object that looks like this: @PersistenceCapable
I have some trivial code that looks like this: SortedDictionary<String, long> d = new
I understand that this question might have a trivial answer. I would like to
I have trivial window: this.window = Ext.widget('window', { title: 'Find', closeAction: 'hide', width: 300,
This is just a trivial question of what convention you suggest. Recently, I have
I have a horizontal menu. The markup looks like this: <ul class=menu> <li>Item 1</li>
I have made some trivial modifications to a Linux USB Wi-Fi card driver to
I have this trivial code: from sys import argv script, input_file = argv def
I have some trivial markup that looks like the following: <li class=someclass> <=% t'model.attr'
I have a trivial program to test for availability of python development files: #include<Python.h>

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.