You are viewing our Forum Archives. To view or take place in current topics click here.
GCC says file doesn't exist.
Posted:

GCC says file doesn't exist.Posted:

TGK
  • TTG Senior
Status: Offline
Joined: Oct 03, 201311Year Member
Posts: 1,409
Reputation Power: 64
Status: Offline
Joined: Oct 03, 201311Year Member
Posts: 1,409
Reputation Power: 64
So, I'm trying to convert my kernel.c file into a object file (.o), but when I try using this command line (gcc -c kernel.c -o kernel.o) it says that the file (kernel.c, duh.) doesn't exist. It's in the same directory and it is indeed spelled right and it is also a .c file. Any help?
#2. Posted:
TGK
  • TTG Senior
Status: Offline
Joined: Oct 03, 201311Year Member
Posts: 1,409
Reputation Power: 64
Status: Offline
Joined: Oct 03, 201311Year Member
Posts: 1,409
Reputation Power: 64
I fixed it by using a different compiler. Weird. O_o
#3. Posted:
Experiment5X
  • TTG Senior
Status: Offline
Joined: Aug 14, 200915Year Member
Posts: 1,291
Reputation Power: 65
Status: Offline
Joined: Aug 14, 200915Year Member
Posts: 1,291
Reputation Power: 65
Could you give the EXACT output that gcc returns? And are you sure that it says that kernel.c doesn't exist and not kernel.o? You could also try doing this:


gcc -c kernel.c


According to gnu.org, that will create a .o file in the current directory. I would test it, but I'm on Windows right now.
#4. Posted:
TGK
  • TTG Senior
Status: Offline
Joined: Oct 03, 201311Year Member
Posts: 1,409
Reputation Power: 64
Status: Offline
Joined: Oct 03, 201311Year Member
Posts: 1,409
Reputation Power: 64
Experiment5X wrote Could you give the EXACT output that gcc returns? And are you sure that it says that kernel.c doesn't exist and not kernel.o? You could also try doing this:


gcc -c kernel.c


According to gnu.org, that will create a .o file in the current directory. I would test it, but I'm on Windows right now.

I'm using a GCC Windows alternative. It worked, and all I had to do was use a different GCC program. I'm just having problems linking these files with ld now.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.