Simple program error

J

...:::JA:::...

Hi,

I using "Dev-C++", yesterday I was install Microsoft Visual Studio .NET 2003
I need it for building python extensions.Since I was install it when I write
some program
in Dev-C++ for example:

#include <iostream>
using namespace std;

int main(){
int z;
z=4;
cout <<z<<endl;
scanf("\n");
return 0;
}


This is error of this program
Error:

[Linker error] undefined reference to `__cpu_features_init'
ld returned 1 exit status


If anybody know how to solve this problem please tell me, I will be very
grateful!!!!!!!
 
M

Marcus Kwok

....:::JA:::... said:
#include <iostream>
using namespace std;

int main(){
int z;
z=4;
cout <<z<<endl;
scanf("\n");

scanf() requires you to #include <stdio.h> (or <cstdio> since you are
using namespace std;).

If you are just doing this to pause the screen, you could try

cin.get();
 
?

=?ISO-8859-1?Q?Erik_Wikstr=F6m?=

Hi,

I using "Dev-C++", yesterday I was install Microsoft Visual Studio .NET 2003
I need it for building python extensions.Since I was install it when I write
some program
in Dev-C++ for example:

#include <iostream>
using namespace std;

int main(){
int z;
z=4;
cout <<z<<endl;
scanf("\n");
return 0;
}


This is error of this program
Error:

[Linker error] undefined reference to `__cpu_features_init'
ld returned 1 exit status


If anybody know how to solve this problem please tell me, I will be very
grateful!!!!!!!

Best bet: reinstall Dev-C++.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top