![]() |
| | #1 |
| Registered User Join Date: Mar 2006
Posts: 143
| Compiler problem Linker error: undefined reference to _cpu_features_init. Does anyone know how to solve this problem? For the record, I also use Visual C++ Express and it works just fine.
__________________ HA! I WIN! |
| xixpsychoxix is offline | |
| | #2 |
| Registered User Join Date: Jun 2005
Posts: 1,343
| A possible reason is that the link libraries that come with Dev-C++ are installed incorrectly. The linker needs to access a number of libraries (eg in the standard C and C++ libraries) in order to build a program and if one of these is misconfigured ..... It's also possible you have some environment variables set incorrectly, in particular things like LD_LIBRARY_PATH or similar, which the linker uses to find libraries. These are set through your IDE (eg Dev-C++) and, if so, care is needed to ensure they are correct and handle things like space characters in paths correctly. There is also an occasional inconvenience that the same environment variable can be used by different products, so the installation of one development environment might upset the working of another. |
| grumpy is offline | |
| | #3 |
| and the hat of vanishing Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,214
| IIRC, gcc prog.cpp will trigger it. Try g++ prog.cpp That is, use the C++ compiler to compiler C++ code. Although the compiler auto-detects the language, it won't necessarily pass on all the correct linker options to link the program successfully.
__________________ If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut. Up to 8Mb PlusNet broadband from only £5.99 a month! |
| Salem is offline | |
| | #4 |
| Registered User Join Date: Dec 2006
Posts: 1,780
| I remember it's due to something very stupid... (needed to use it at my school) Something like running 2 instances of Dev-C++, if not I don't remember. But I guarantee that when you found out the cause you will feel like smashing your head against the nearest wall. |
| cyberfish is offline | |
| | #5 |
| Registered User Join Date: Mar 2006
Posts: 143
| well, i have another version of MinGW installed besides just the one for Dev. I installed it some time ago. I also have DJGPP installed, which i think i remember may be very similar to MinGW? anyways, i'll try some more stuff and if anyone has any more ideas, please let me know
__________________ HA! I WIN! |
| xixpsychoxix is offline | |
| | #6 | |
| Registered User Join Date: Dec 2006
Posts: 1,780
| Quote:
Rename it or delete it or take it out of $PATH. Dev-C++ is getting confused. I had my own copy of MinGW, and then installed Dev-C++ for my schoolwork, and it didn't like that. | |
| cyberfish is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dev-C++ compiler problem | GrasshopperEsq | C++ Programming | 19 | 05-08-2008 02:35 AM |
| Compiler Problem | sitestem | C++ Programming | 2 | 04-11-2004 03:48 PM |
| C / OpenGL help REALLY needed for simple but annoying problem! | Oz_joker | C Programming | 5 | 12-03-2003 05:47 PM |
| Problem with compiler | knight543 | C++ Programming | 4 | 02-09-2002 09:16 PM |
| Please help me with this compiler problem | incognito | C++ Programming | 1 | 01-05-2002 05:14 PM |