Author Topic: I always give an error, and I don't know why  (Read 443 times)

Offline Rajmund

  • Single posting newcomer
  • *
  • Posts: 6
I always give an error, and I don't know why
« 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!

Offline Rajmund

  • Single posting newcomer
  • *
  • Posts: 6
Re: I always give an error, and I don't know why
« Reply #1 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;
}

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: I always give an error, and I don't know why
« Reply #2 on: July 15, 2019, 07:34:19 pm »
Code: [Select]
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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Rajmund

  • Single posting newcomer
  • *
  • Posts: 6
Re: I always give an error, and I don't know why
« Reply #3 on: July 15, 2019, 08:20:21 pm »
Not I put the space there, It  's create automatically, where can I remove it?

Offline Rajmund

  • Single posting newcomer
  • *
  • Posts: 6
Re: I always give an error, and I don't know why
« Reply #4 on: July 15, 2019, 08:56:56 pm »
And when I create a new project, the space is there again!

Offline Miguel Gimenez

  • Regular
  • ***
  • Posts: 341
Re: I always give an error, and I don't know why
« Reply #5 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.

Offline Rajmund

  • Single posting newcomer
  • *
  • Posts: 6
Re: I always give an error, and I don't know why
« Reply #6 on: July 15, 2019, 09:08:45 pm »
Okay, thank you! Now its working! I had to remove the á character from programozás!