Hi, as the forum indicates I'm only just beginning to understand the depths of the gulf that is my ignorance on this subject (C++) and have stumbled across this error on my first attempt to code: [Linker error] undefined reference to `__cpu_features_init'
The switches have been abbreviated to save space, there are 5 of them all the same until I get at least this working.
I am using Dev-C++ as my compiler, and would greatly appreciate any advice on this error, please? :D
Well I've made the modifications you have suggested (thanks for those) but am still getting the same error message. (buggerit)
UPDATE:
Just on a hunch I copy/paste this from the tutorials & tried to compile it
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// i/o example
#include <iostream>
usingnamespace std;
int main ()
{
int i;
cout << "Please enter an integer value: ";
cin >> i;
cout << "The value you entered is " << i;
cout << " and its double is " << i*2 << ".\n";
return 0;
}
I googled your error and it sounds about what I thought: you have library clashes somewhere. Do you have more than one copy of MinGW installed? (The Dev-C++ IDE installs its own copy.)
Either delete the extra copy or make sure that when the Dev IDE runs that only Dev's MinGW lib/ directory is in the PATH variable.
Does this help?
@averageGuy: careful there. <iostream> is the standard C++ header. Anything else is pre-standard.
This site has a top-notch reference that will list all the ISO C++ standard includes and functions and classes etc. with the correct includes. The .h was deprecated, and <stdio.h> became <cstdio>, etc.
Newer compilers tend to put-up with older stuff, but since there wasn't a fixed standard for the older stuff, it is unreliable.