I created a new dev-cpp project at "e:\My Project\dev2" with the project type "C project" and project name "dev2". Then i copied a c file "quotes.c" to the project directory and added it to the project. Its contents is as follows:
//quotes.c
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main(void)
{
char string[] = "\"Stop!\", he said.";
printf(string);
getche();
return 0;
}
When i compiled it, there was a linker error: "undefined reference to __gxx_personality_v0". But, when i change the c file name from "quotes.c" to "quotes_1.c", the project could be successfully compiled and the executable ran well. So why all this happened?
By the way the dev-cpp version is 4.9.8.5. When i installed it tonight, i used the update utility to downloaded two packages.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Wayne stupid question #1 - Are you sure that you didn't have a capital C in there? That can trip it into compiling incorrectly.
In the future, it would be a BIG help if you would post the full compile log, and not just the errors. The compile log is on the tab labeled "Compile Log" (I say that not to insult you, some folks try to copy the contents of the tab labeled "Compile"). The right mouse button brings up the copy menu on this tab, Grab the contents of the compile log with your mouse, hit the right mouse button, hit copy, and paste it on in.
Great job of posting your code and giving version information!
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is not a good habit to get into of putting your projects in paths with spaces in them, like "My Project". Why? Even though Colin and team have worked hard to work around it, GCC is still a Unix ancestry tool, and Unix does not always parse spaces well.
Two rules of thump I filllow that seem to help me. I let Dev install where it wants, and don't put it in "Program Files" or something with a space in the path. And then I keep my projects in a directory with no spaces in the path.
This has nothing to do with your specific problem, but it should help you avoid some weirdness down the road.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I created a new dev-cpp project at "e:\My Project\dev2" with the project type "C project" and project name "dev2". Then i copied a c file "quotes.c" to the project directory and added it to the project. Its contents is as follows:
//quotes.c
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main(void)
{
char string[] = "\"Stop!\", he said.";
printf(string);
getche();
return 0;
}
When i compiled it, there was a linker error: "undefined reference to __gxx_personality_v0". But, when i change the c file name from "quotes.c" to "quotes_1.c", the project could be successfully compiled and the executable ran well. So why all this happened?
By the way the dev-cpp version is 4.9.8.5. When i installed it tonight, i used the update utility to downloaded two packages.
Wayne stupid question #1 - Are you sure that you didn't have a capital C in there? That can trip it into compiling incorrectly.
In the future, it would be a BIG help if you would post the full compile log, and not just the errors. The compile log is on the tab labeled "Compile Log" (I say that not to insult you, some folks try to copy the contents of the tab labeled "Compile"). The right mouse button brings up the copy menu on this tab, Grab the contents of the compile log with your mouse, hit the right mouse button, hit copy, and paste it on in.
Great job of posting your code and giving version information!
Wayne
Oh yeah, I forgot....senile....
It is not a good habit to get into of putting your projects in paths with spaces in them, like "My Project". Why? Even though Colin and team have worked hard to work around it, GCC is still a Unix ancestry tool, and Unix does not always parse spaces well.
Two rules of thump I filllow that seem to help me. I let Dev install where it wants, and don't put it in "Program Files" or something with a space in the path. And then I keep my projects in a directory with no spaces in the path.
This has nothing to do with your specific problem, but it should help you avoid some weirdness down the road.
Wayne