I installed a Dev Cpp (devcpp-4.9.9.2) on a Macbook Pro with Windows XP
running by Parallels Desktop. When I try to compile and run a very simple C
program like "hello world", it shows a Link error :
undefined referece to '_cup_features_init'
Id returned 1 exit status
Error 1
If I do the same thing on a "Real" Windows XP OS on a PC, it works very well.
I have confirmed all the path setting for compiler, library.... are the same(I
use default setting). Have I do some special lib setting or change some other
environment setting? Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Works in the real OS but not in the virtual OS. My guess would be that the
linker may need a switch to compile with. Do a search for the "GNU LD
options". If the preprocessor, compiler, and assembler all worked I would
think that the code is good. The linker "LD" is what does the final
aggregation to your complete working program, but its not happy with the
virtual OS. Can you run the "real OS execuatable" in the virtual OS? Your
virtual OS may be the problem also?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you transcribe build logs, please do it by copy & paste not by manual
transcription; I am very certain that the error message was not
undefined referece to '_cup_features_init'
The linker does not spell that badly! Also copy and paste the text from the
"Compile Log" tab; it is easier (because it is plain text), and more complete
(because it is not filtered).
I doubt that it has anything to do with your VM or any linker switch. I have
no idea why davidarod might suspect that; sounds like a wild guess to me.
The "undefined reference to '_cpu_features_init' is a known issue with
known causes and has been dealt with on the forum before, and is dealt with
specifically in the thread (in post #7).
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My other guess was that it ran out of memory and the virtual OS enviroment
needed more memory space to comple and link. But since it was stated that it
was a simple/small code, I guessed it was a MAC or virtual OS problem.
Clifford, can you give a simple/basic answer to why my guess was so wrong. Im
just a hobbiest coder, so no need to get too technical.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Clifford, can you give a simple/basic answer to why my guess was so wrong.
Im just a hobbiest coder, so no need to get too technical.
Simple; Occam's Razor applies;
the most likely cause is the same thing that has caused this exact problem
previously. No need ot seek new and more complex answers; at least not before
discounting the obvious likely ones. Also an undefined reference is a normal
error message caused by, well - an undefined reference! The reason that it
occurs on the VM and not the standard PC likely occurs for the same reason the
error may occur on one standard PC and not another; namely the presence of
another GNU toolchain interfering with Dev-C++'s MinGW installation.
My point is that this error has been seen before and is caused by other
software installed and configuration of the PC, there is nothing about about
this that would lead me to suspect the virtualistion technology rather than
the usual suspects.
Not everything that may fail in a VM is due to it being a VM. The VM is as
likely to suffer from the same misconfiguration and application software
errors as a standard PC installation, and such errors are no doubt more common
than specifically VM related errors.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I installed a Dev Cpp (devcpp-4.9.9.2) on a Macbook Pro with Windows XP
running by Parallels Desktop. When I try to compile and run a very simple C
program like "hello world", it shows a Link error :
undefined referece to '_cup_features_init'
Id returned 1 exit status
Error 1
If I do the same thing on a "Real" Windows XP OS on a PC, it works very well.
I have confirmed all the path setting for compiler, library.... are the same(I
use default setting). Have I do some special lib setting or change some other
environment setting? Thanks!
Works in the real OS but not in the virtual OS. My guess would be that the
linker may need a switch to compile with. Do a search for the "GNU LD
options". If the preprocessor, compiler, and assembler all worked I would
think that the code is good. The linker "LD" is what does the final
aggregation to your complete working program, but its not happy with the
virtual OS. Can you run the "real OS execuatable" in the virtual OS? Your
virtual OS may be the problem also?
When you transcribe build logs, please do it by copy & paste not by manual
transcription; I am very certain that the error message was not
The linker does not spell that badly! Also copy and paste the text from the
"Compile Log" tab; it is easier (because it is plain text), and more complete
(because it is not filtered).
I doubt that it has anything to do with your VM or any linker switch. I have
no idea why davidarod might suspect that; sounds like a wild guess to me.
The "undefined reference to '_cpu_features_init' is a known issue with
known causes and has been dealt with on the forum before, and is dealt with
specifically in the thread (in post #7).
Clifford
Oops; somehow the link got omitted. Should have read:
... and is dealt with specifically in the PLEASE READ BEFORE POSTING A
QUESTION thread (in post #7).
My other guess was that it ran out of memory and the virtual OS enviroment
needed more memory space to comple and link. But since it was stated that it
was a simple/small code, I guessed it was a MAC or virtual OS problem.
Clifford, can you give a simple/basic answer to why my guess was so wrong. Im
just a hobbiest coder, so no need to get too technical.
Simple; Occam's Razor applies;
the most likely cause is the same thing that has caused this exact problem
previously. No need ot seek new and more complex answers; at least not before
discounting the obvious likely ones. Also an undefined reference is a normal
error message caused by, well - an undefined reference! The reason that it
occurs on the VM and not the standard PC likely occurs for the same reason the
error may occur on one standard PC and not another; namely the presence of
another GNU toolchain interfering with Dev-C++'s MinGW installation.
My point is that this error has been seen before and is caused by other
software installed and configuration of the PC, there is nothing about about
this that would lead me to suspect the virtualistion technology rather than
the usual suspects.
Not everything that may fail in a VM is due to it being a VM. The VM is as
likely to suffer from the same misconfiguration and application software
errors as a standard PC installation, and such errors are no doubt more common
than specifically VM related errors.
Thanks Clifford. After your explaination, its obvious I went on an assumption
that the difference in the two was the most likely cause of the problem.