Code::Blocks Forums

User forums => Help => Topic started by: Rajmund on July 15, 2019, 07:10:54 pm

Title: I always give an error, and I don't know why
Post by: Rajmund on July 15, 2019, 07:10:54 pm
What cause this? I can not solve it, Its from Build log:
 Build: Debug in gyak (compiler: GNU GCC Compiler)---------------

g++ -Wall -fexceptions -g  -c /home/rajmund/Dokumentumok/Programozás/CodeBlocks/gyak/main.cpp -o obj/Debug/main.o
g++  -o bin/Debug/gyak obj/Debug/main.o   
g++: error: obj/Debug/main.o: Nincs ilyen fájl vagy könyvtár
g++: fatal error: no input files
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
It looks like codeblocks not create object file! How can I fix this? I use Arcolinux 19.07.9, an arch linux based distro, and I installed codeblocks from community repo!
Title: Re: I always give an error, and I don't know why
Post by: Rajmund on July 15, 2019, 07:15:06 pm
This is my source code, everything is correct:
#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}
Title: Re: I always give an error, and I don't know why
Post by: stahta01 on July 15, 2019, 07:34:19 pm
Code
g++  -o bin/Debug/gyak obj/Debug/main.o

The above have a space in it between "gyak" and "obj". Find where you put the space and remove it.

If you can not find where try creating a new project.

Tim S.
Title: Re: I always give an error, and I don't know why
Post by: Rajmund on July 15, 2019, 08:20:21 pm
Not I put the space there, It  's create automatically, where can I remove it?
Title: Re: I always give an error, and I don't know why
Post by: Rajmund on July 15, 2019, 08:56:56 pm
And when I create a new project, the space is there again!
Title: Re: I always give an error, and I don't know why
Post by: Miguel Gimenez on July 15, 2019, 08:59:06 pm
The space is there to separate the executable name (gyak) from the object file path and must be there.

You can try removing the accented character in Programozás or checking the permissions of the obj/Debug folder, wherever it is.
Title: Re: I always give an error, and I don't know why
Post by: Rajmund on July 15, 2019, 09:08:45 pm
Okay, thank you! Now its working! I had to remove the á character from programozás!