-1

I'm in class where we're learning C, and a few weeks ago I noticed whenever I included any library with #include<stdio.h> an error takes place.

For this simple piece of code:

#include <stdio.h> 
#include <locale.h>

int main() { 
    printf("Hi"); 
    return 0; 
} 

This is the error message:

Severity    Code    Description Project File    Line    Suppression State
Error   LNK2019 unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)   P2ficha4    E:\Programacao1\P2\P2ficha4\P2ficha4\MSVCRTD.lib(exe_main.obj)  1   

and

Severity    Code    Description Project File    Line    Suppression State
Error   LNK1120 1 unresolved externals  P2ficha4    E:\Programacao1\P2\P2ficha4\Debug\P2ficha4.exe  1   

This has been a really big set back for me, and I don't think my professor can help me on this one. I appreciate any help

anastaciu
  • 23,467
  • 7
  • 28
  • 53

1 Answers1

0

My partion of E was disconnected from C by root. I made the project in the same partion (C) that windows was installed, I also selected the "make solution as same directory of project file". It was working for all semester until now, I don't know what triggered it. Thank you all for helping me brain storm