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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:44:17+00:00 2026-06-13T04:44:17+00:00

I created an empty C++ project in Visual Studio 2012 Express (for Desktop of

  • 0

I created an empty C++ project in Visual Studio 2012 Express (for Desktop of course), and added some random basic code:

#include <cstdio>
#include <cstdlib>

typedef struct examplestruct
{
    unsigned char num1;
    unsigned short num2;
    unsigned long num3;
    unsigned long long num4;
} EXAMPLESTRUCT;

void examplefunction(unsigned long *num, int num2)
{
    *num += num2;
    return;
}

int main(int nArgs, char **pszArgs)
{
    EXAMPLESTRUCT ExStructInstance = {0xFF, 0xFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF};
    printf("%d, %d, %u, %ull\n", ExStructInstance.num1, ExStructInstance.num2, ExStructInstance.num3, ExStructInstance.num4);
    unsigned long num5 = ExStructInstance.num1 + ExStructInstance.num2;
    printf("%d\n", num5);
    examplefunction(&num5, 10);
    printf("%d\n", num5);
    system("pause");
    return 0;
}

(If you’re wondering what the hell this is about, I’m disassembling the created executable file to observe the behaviour of the optimizing compiler, and also to learn more about x86 assembly.)

Under Linker in the project settings, I selected Multi-threaded (/MT) for the runtime library, so it would statically link it.

I compiled and started debugging with F5 and immediately got this error in a message box:

Runtime Error!

Program: C:\Users\xxxxx\Documents\P…

R6030

  • CRT not initialized

So, this basic program won’t run due to some problem with the runtime library, which I can’t figure out!

Any ideas? I’d just like to know what’s going on here. Thanks in advance!

EDIT: FYI, this is all done in Release mode.

  • 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-13T04:44:18+00:00Added an answer on June 13, 2026 at 4:44 am

    Start a new project with the “Empty project” template has a knack for causing trouble. You probably changed another project setting that causes your program to start at the main() method instead of the normal entry point, the CRT startup function. Which initializes the CRT, then calls main(). Hard to guess how you did it, especially when you talk about changing a linker setting to get /MT. That’s a compiler setting.

    Fall in the pit of success by using the Win32 + Win2 Console Application project template instead. Delete the pre-generated code, minus the #include <stdafx.h> line at the top. At the very least you’ll now have a starting point that can help us help you solve problems. And don’t skip the “Hello world” program.

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

Sidebar

Related Questions

I created an empty 'Demo' project in Visual Studio 2008 and added some existing
I created an empty C# Project in Visual Studio, and added a class. Then
I've created an empty C++ project in Visual Studio. When attempting to add .NET
I created an empty project, with a visual studio msi installer. On install it
I created an Empty Project in Visual C++, but now I need the Console
For a new project I have created a local folder tree with empty Visual
I created a Win32 Console project (C++) using Visual Studio 2010 by pasting multiple
Is there a way to have an empty Project in Visual Studio 2008 or
I created an empty c++ console application with visual studio 2010 and dragged and
I had a plugin installed in Visual Studio 2008, and it created some extra

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.