Author Topic: Simple Project Building Fails  (Read 8925 times)

Offline cdemirkir

  • Single posting newcomer
  • *
  • Posts: 7
Simple Project Building Fails
« on: April 08, 2009, 09:29:52 pm »
Hi Everyone,
   I opened a simple Hello project at Linux and tried to build it. It gives the following log output for the simple hello cpp project.

-------------- Build: Debug in Hello ---------------
g++ -Wall -fexceptions -g -c /media/TRANSFER/Projects/Cpp/Test/Hello/main.cpp -o obj/Debug/main.o
Process terminated with status -1 (0 minutes, 0 seconds)
0 errors, 0 warnings

When I tried to compile the same code from the command line at a new opened terminal, it also refuses to compile the code and it gives the following message

g++ -Wall -fexceptions  -g     -c /media/TRANSFER/Projects/Cpp/Test/Hello/main.cpp -o obj/Debug/main.o
Assembler messages:
Fatal error: can't create obj/Debug/main.o: No such file or directory

When I tried to change the object output path as given in the following, it compiles and produces the object code, it works !!!

g++ -Wall -fexceptions  -g     -c /media/TRANSFER/Projects/Cpp/Test/Hello/main.cpp -o /media/TRANSFER/Projects/Cpp/Test/Hello/obj/Debug/main.o

It seems that g++ can not work at the project directory, and it needs a full path definition for output directory.

I can not resolve the problem, I'd be grateful to anyone Who can help me solving these weird problem ......

Regards
Cem
« Last Edit: April 08, 2009, 11:04:47 pm by cdemirkir »

Offline saevar

  • Single posting newcomer
  • *
  • Posts: 4
Re: Simple Project Building Fails
« Reply #1 on: March 23, 2010, 10:08:49 am »
Hi Everyone,
   I opened a simple Hello project at Linux and tried to build it. It gives the following log output for the simple hello cpp project.

-------------- Build: Debug in Hello ---------------
g++ -Wall -fexceptions -g -c /media/TRANSFER/Projects/Cpp/Test/Hello/main.cpp -o obj/Debug/main.o
Process terminated with status -1 (0 minutes, 0 seconds)
0 errors, 0 warnings

When I tried to compile the same code from the command line at a new opened terminal, it also refuses to compile the code and it gives the following message

g++ -Wall -fexceptions  -g     -c /media/TRANSFER/Projects/Cpp/Test/Hello/main.cpp -o obj/Debug/main.o
Assembler messages:
Fatal error: can't create obj/Debug/main.o: No such file or directory

When I tried to change the object output path as given in the following, it compiles and produces the object code, it works !!!

g++ -Wall -fexceptions  -g     -c /media/TRANSFER/Projects/Cpp/Test/Hello/main.cpp -o /media/TRANSFER/Projects/Cpp/Test/Hello/obj/Debug/main.o

It seems that g++ can not work at the project directory, and it needs a full path definition for output directory.

I can not resolve the problem, I'd be grateful to anyone Who can help me solving these weird problem ......

Regards
Cem

I have got something similar to cdmirkir, can anybody help?
[ 50,0%] gcc -march=nocona -O2 -Wmain -Wall -g   -I/usr/local/include -I./. -I./include  /home/saevar/DevelC/command_ap.c -c -o /home/saevar/DevelC/command_ap.o
[100,0%] g++  -o /home/saevar/DevelC/command_ap /home/saevar/DevelC/command_ap.o   
gcc -march=nocona -O2 -Wmain -Wall -g   -I/usr/local/include -I./. -I./include  /home/saevar/DevelC/command_ap.c -c -o /home/saevar/DevelC/command_ap.o: No such file or directory.

- OS PCBSD 8, C::B 8.02

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Simple Project Building Fails
« Reply #2 on: March 23, 2010, 10:17:46 am »
Does simple console (hello world) project build successfully?

The last line in the log looks quite strange.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline saevar

  • Single posting newcomer
  • *
  • Posts: 4
Re: Simple Project Building Fails
« Reply #3 on: March 25, 2010, 06:56:37 pm »
Does simple console (hello world) project build successfully?

The last line in the log looks quite strange.
when i took up command from log and trying to used him on console, it works normaly, problem is just with code::blocks