News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

I always give an error, and I don't know why

Started by Rajmund, July 15, 2019, 07:10:54 PM

Previous topic - Next topic

Rajmund

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!

Rajmund

This is my source code, everything is correct:
#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}

stahta01


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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Rajmund

Not I put the space there, It  's create automatically, where can I remove it?

Rajmund

And when I create a new project, the space is there again!

Miguel Gimenez

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.

Rajmund

Okay, thank you! Now its working! I had to remove the á character from programozás!