Everytime I open up a project that I ever made, and try to build it, it keeps complieing all of these other files that i've never seen before, and it gives me about 300 errors. I don't know what to do. I can't even use it, everthing has these files. I'm using the Windows 32 Console Projects. PLEASE HELP ME! :eek:

Dani AI

Generated

Symptoms like describes (an old project suddenly compiling lots of unfamiliar files and spitting out hundreds of errors) usually come from project/toolchain configuration rather than accidental corruption of every source file. Common causes include precompiled-header mismatches (MSVC projects and the familiar stdafx.h behavior), opening a solution that builds many projects at once, source files using the wrong extension (.c vs .cpp), or incorrect include/search paths so the compiler is pulling the wrong headers. As suggested, pasting build output helps; as suggested, a tiny reproducible test isolates whether the compiler or the project is at fault.

A minimal test file (create a fresh console project and add main.cpp):

#include <iostream>

int main()
{
    std::cout << "Hello, world\n";
    return 0;
}

Quick isolation checklist:

  • Build the fresh project above. If it succeeds, the toolchain is OK and the original project settings are the culprit.
  • If using MSVC and errors mention precompiled headers or stdafx.h, either include stdafx.h as the first include in each .cpp or disable precompiled headers for those files in Project Properties.
  • Verify extensions: files that need C++ must use .cpp. In Visual Studio per-file settings there is a "Compile As" option.
  • Open Solution Explorer / Configuration Manager: remove or exclude unexpected source files or disable "Build" for unrelated projects. Clean (delete intermediate folders and .pch files) and Rebuild.
  • If many errors originate inside <...> headers (iostream, etc.), check VC include directories — a bad include path can make standard headers fail.

If the log is too long to paste, copy the Output window (Select All -> Copy) or run the compiler from a command prompt and redirect output (e.g., cl /c file.cpp > buildlog.txt 2>&1). When asking for help, include the IDE/compiler version and the first 10–20 distinct errors; that usually points directly to the root cause.

Recommended Answers

All 3 Replies

past the soreces on here.

They are to long, they will not fit!

Can you give an example of some of the errors?

Can you make a "hello world" (i.e. very simple) project that shows this behavior and post that source?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.