|
From: <jp...@br...> - 2002-05-03 17:51:30
|
I've juste installed Dev-C++ in my computer (Win2K) and I tried to
compile the simple program bellow, but I've got the error message
"C:\DevC\Bin\ld.exe: cannot open crt0.o: No such file or directory". The
Dev-C++ is installed in a different directory because I was trying to
fix this problem, but I was not succesfull in doing it.
=20
#include<stdio.h>
=20
char primo(long int);
=20
void main(void){
long int i;
=20
printf("Entre com um n=FAmero: ");
scanf("%d",&i);
printf("%c",primo(i));
getchar(); =20
}
=20
char primo(long int x){=20
int i;
=20
for(i=3D2;i<x;i++)
if(x%i=3D=3D0)
break;
if(i=3D=3D(x-1))
return('P');
else
return('N'); =20
}
=20
=20
=20
---------------------------------------
"Porque, se eu orar em l=EDnguas,
o meu esp=EDrito ora de fato." I Cor=EDntios 14:14
--------------------------------------
=20
|
|
From: Ioannis V. <no...@ho...> - 2002-05-04 00:49:29
|
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Juliano
P=A6=C1vel Brasil Cust=A6=D2dio
Sent: Friday, May 03, 2002 8:52 PM
To: dev...@li...
Subject: [Dev-C++] crt0.o
I've juste installed Dev-C++ in my computer (Win2K) and I tried to
compile the simple program bellow, but I've got the error message
"C:\DevC\Bin\ld.exe: cannot open crt0.o: No such file or directory". The
Dev-C++ is installed in a different directory because I was trying to
fix this problem, but I was not succesfull in doing it.
=20
#include<stdio.h>
=20
char primo(long int);
=20
void main(void){=20
=20
int main(void) {
=20
long int i;
=20
printf("Entre com um n=A8=B2mero: ");
scanf("%d",&i);
printf("%c",primo(i));
getchar(); =20
return 0; /* not necessary in C99 */
=20
}
=20
char primo(long int x){=20
int i;
=20
for(i=3D2;i<x;i++)
if(x%i=3D=3D0)
break;
if(i=3D=3D(x-1))
return('P');
else
return('N'); =20
}=20
=20
The code should compile ok provided the changes above.
=20
=20
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
<http://www.noicys.cjb.net/>=20
* Alternative URL: http://run.to/noicys
=20
|
|
From: Ioannis V. <no...@ho...> - 2002-05-04 00:51:44
|
I had forgotten something:
=20
=20
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Juliano
P=A6=C1vel Brasil Cust=A6=D2dio
Sent: Friday, May 03, 2002 8:52 PM
To: dev...@li...
Subject: [Dev-C++] crt0.o
I've juste installed Dev-C++ in my computer (Win2K) and I tried to
compile the simple program bellow, but I've got the error message
"C:\DevC\Bin\ld.exe: cannot open crt0.o: No such file or directory". The
Dev-C++ is installed in a different directory because I was trying to
fix this problem, but I was not succesfull in doing it.
=20
#include<stdio.h>
=20
char primo(long int);
=20
void main(void){=20
=20
int main(void) {
long int i;
=20
printf("Entre com um n=A8=B2mero: ");
scanf("%d",&i);
=3D> scanf("%ld", &i);
=20
printf("%c",primo(i));
getchar(); =20
return 0; /* not necessary in C99 */
=20
}
=20
char primo(long int x){=20
int i;
=20
for(i=3D2;i<x;i++)
if(x%i=3D=3D0)
break;
if(i=3D=3D(x-1))
return('P');
else
return('N'); =20
}=20
=20
The code should compile ok provided the changes above.
=20
=20
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
<http://www.noicys.cjb.net/>=20
* Alternative URL: http://run.to/noicys
=20
|
|
From: Bob W. <bo...@ph...> - 2002-05-04 02:57:23
|
MessageJuliano, I've juste installed Dev-C++ in my computer (Win2K) and I tried to = compile the simple program bellow, but I've got the error message = "C:\DevC\Bin\ld.exe: cannot open crt0.o: No such file or directory". The = Dev-C++ is installed in a different directory because I was trying to = fix this problem, but I was not succesfull in doing it. You must have an installation problem. I just took your code and it = compiled just fine on Dev-C++.=20 Regards, Bob Wilson |
|
From: <jp...@bo...> - 2002-05-04 03:38:32
|
Maybe... what kind of problem? Do you have a guess?
=20
Juliano
=20
=20
=20
---------------------------------------
"Porque, se eu orar em l=EDnguas,
o meu esp=EDrito ora de fato." I Cor=EDntios 14:14
--------------------------------------
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Bob
Wilson
Sent: Friday, May 03, 2002 11:59 PM
To: Dev-C++ User Mailing List
Subject: Re: [Dev-C++] crt0.o
_____ =20
Quer ter seu pr=F3prio endere=E7o na Internet?
Garanta j=E1 o seu e ainda ganhe cinco e-mails personalizados.
Dom=EDniosBOL - http://dominios.bol.com.br <ttp://dominios.bol.com.br>=20
_____ =20
Juliano,
=20
I've juste installed Dev-C++ in my computer (Win2K) and I tried to
compile the simple program bellow, but I've got the error message
"C:\DevC\Bin\ld.exe: cannot open crt0.o: No such file or directory". The
Dev-C++ is installed in a different directory because I was trying to
fix this problem, but I was not succesfull in doing it.
You must have an installation problem. I just took your code and it
compiled just fine on Dev-C++.=20
=20
Regards,
=20
Bob Wilson
=20
|
|
From: Yeoh H. <ye...@ye...> - 2002-05-04 04:18:18
|
MessageHi Juliano, I compiled and linked your program without any problems. I looked for the file crt0.o and yes there is no such file in any of the = Dev-C++ directories. The ones that I found were: crt1.0, crt2.0, crtmt.o = and crtst.o. I've also examined my Makefile.win and the paths to the libs are = correct. In the Makefile.win, I see that g++.exe is invoked twice, once = to compile the cpp file into .o file and then a second time to pass info = to the linker ld.exe to link the .o files with the standard libs to = produce an exe file. I'm using Dev-C++ 4.9.2.0 beta. Which version are you using? Perhaps = you can list your Makefile.win. Have you installed any other versions of gcc compilers on your system? = You might also want to check your system path to see which ld.exe is = executed. Your ld.exe is looking for a crt0.o. Do a search of your = harddisk for crt0.o. See if you can find it. Also search for ld.exe. Any = chances of multiple copies? This is a perplexing problem. Regards, Yeoh ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ Author of "How to Create an eBook Using Visual C++" Free Downloads at http://www.yeohhs.com ICT eBooks by Yeoh HS ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ ----- Original Message -----=20 From: Juliano P=E1vel Brasil Cust=F3dio=20 I've juste installed Dev-C++ in my computer (Win2K) and I tried to = compile the simple program bellow, but I've got the error message = "C:\DevC\Bin\ld.exe: cannot open crt0.o: No such file or directory". The = Dev-C++ is installed in a different directory because I was trying to = fix this problem, but I was not succesfull in doing it. =20 |
|
From: <jp...@bo...> - 2002-05-06 02:55:47
|
Thanks Yeoh,
=20
In fact, I had rsxnt installed in my computer and the wrong path was
the cause of all this mess, because it was refering to some enviroment
variables of rsxnt that devC maybe use. When I cleaned up the path, it
started working fine.
=20
Thanks all of you for your valuable help!
=20
Juliano
=20
=20
=20
---------------------------------------
"Porque, se eu orar em l=EDnguas,
o meu esp=EDrito ora de fato." I Cor=EDntios 14:14
--------------------------------------
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Yeoh HS
Sent: Saturday, May 04, 2002 1:31 AM
To: dev...@li...
Subject: Re: [Dev-C++] crt0.o
Hi Juliano,
=20
I compiled and linked your program without any problems.
=20
I looked for the file crt0.o and yes there is no such file in any of the
Dev-C++ directories. The ones that I found were: crt1.0, crt2.0, crtmt.o
and crtst.o.
=20
I've also examined my Makefile.win and the paths to the libs are
correct. In the Makefile.win, I see that g++.exe is invoked twice, once
to compile the cpp file into .o file and then a second time to pass info
to the linker ld.exe to link the .o files with the standard libs to
produce an exe file.
=20
I'm using Dev-C++ 4.9.2.0 beta. Which version are you using? Perhaps
you can list your Makefile.win.
=20
Have you installed any other versions of gcc compilers on your system?
You might also want to check your system path to see which ld.exe is
executed. Your ld.exe is looking for a crt0.o. Do a search of your
harddisk for crt0.o. See if you can find it. Also search for ld.exe. Any
chances of multiple copies? This is a perplexing problem.
=20
=20
Regards,
Yeoh
~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
Author of "How to Create an eBook Using Visual C++"
Free Downloads at http://www.yeohhs.com
ICT eBooks by Yeoh HS
~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
----- Original Message -----=20
From: Juliano P=E1vel <mailto:jp...@br...> Brasil Cust=F3dio=20
I've juste installed Dev-C++ in my computer (Win2K) and I tried to
compile the simple program bellow, but I've got the error message
"C:\DevC\Bin\ld.exe: cannot open crt0.o: No such file or directory". The
Dev-C++ is installed in a different directory because I was trying to
fix this problem, but I was not succesfull in doing it.
=20
|