Question

When I compile the code:

#include <iostream>
#include <string.h>

using namespace std;

int main(void) {

    string m1;

    cout<< "enter your name: "<<endl;
    getline(cin,m1);

    cout << "Your name is: " << m1 << endl;

    return EXIT_SUCCESS;
}

It give the following warning:

type of symbol `_main' changed from 32 to 512 in >C:\Users\KDesktop\AppData\Local\Temp\cc7XPBuL.o

Secondly, the compiler does generate an .exe file, but whenever I run it, the program crashes immediately. Can someone help me with this issue.

Thank you

Was it helpful?

Solution

Your toolchain is outdated. Older versions of LLVM used the wrong value for the function symbol type; the bug was fixed in late 2010. Here's the bug report: http://llvm.org/bugs/show_bug.cgi?id=8320

You should upgrade your LLVM; the problem will go away.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top