News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Simple Project Building Fails

Started by cdemirkir, April 08, 2009, 09:29:52 PM

Previous topic - Next topic

cdemirkir

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

saevar

Quote from: cdemirkir 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

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

oBFusCATed

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!]

saevar

Quote from: oBFusCATed 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.
when i took up command from log and trying to used him on console, it works normaly, problem is just with code::blocks