Code Blocks Process Terminated With Status 127 on linux - c++

Recently i installed Code Blocks, done all the linking after that i build and run the program it comes out error with "Process Terminated With Status 127". i tried several ways to solve it like build-essential, g++ but still can't solve it, please help`
-------------- Run: Release Win32 in DeepNeuralNetwork (compiler: GNU GCC Compiler)---------------
Checking for existence: /media/rnd/4F3D93242E986B7F/DeepNeuralNetwork/DeepNeuralNetwork/DeepNeuralNetwork
Executing: /media/rnd/4F3D93242E986B7F/DeepNeuralNetwork/DeepNeuralNetwork/DeepNeuralNetwork (in /media/rnd/4F3D93242E986B7F/DeepNeuralNetwork/DeepNeuralNetwork/.)
Process terminated with status 127 (0 minute(s), 0 second(s))
`

Related

I recently installed codeblocks (Code :: Blocks IDE) but do not compile the simple test program

Summarizing the problem as generally as possible:
I used to compile the program via terminal with the sequence of commands even in bash.
Basically:
g++ test.cpp -o teste.exe
chmod +x teste.exe
./teste.exe
At the terminal it works perfectly. But Codeblock practically does not create the program's executable.
Simple example program created:
#include <iostream>
int main(){
std::cout << "Test\n";
return 0;
}
I press "Build and run" (At first it detects g++ so I selected the only one I had.).
Nothing, just this:
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------
g++ -c "/home/williambronzo/Área de Trabalho/teste.cpp" -o "/home/williambronzo/Área de Trabalho/teste.o"
g++ -o "/home/williambronzo/Área de Trabalho/teste" "/home/williambronzo/Área de Trabalho/teste.o"
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Checking for existence: /home/williambronzo/Área de Trabalho/teste
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------
g++ -c "/home/williambronzo/Área de Trabalho/teste.cpp" -o "/home/williambronzo/Área de Trabalho/teste.o"
g++ -o "/home/williambronzo/Área de Trabalho/teste" "/home/williambronzo/Área de Trabalho/teste.o"
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
There is some detail that I missed to be able to use the codeblock, otherwise I will be in the terminal and bash. I heard that new students are afraid of the terminal. So I'm trying to use something that should be "easy" (the terminal is easy for me but not for others).
Detail:
Use linux minimal ubuntu version with essential installation.
Have you checked that the compiler is configured correctly? A similar problem happened to me.
To resolve, go to Settings >> Global Compiler Settings >> Toolchain executables and click on "Auto-Detect".
After that the problem must be solved, if not, make sure that the mingw has been installed correctly.
Everything correct except the folder with space, after changing the directory to test the program it worked without problems, with my research I found that this bug exists since 2007 after 13 years, I was surprised to come across this problem not fixed.
Link:
http://forums.codeblocks.org/index.php/topic,5003.0.html
No problems:
g++ "/home/williambronzo/Área de Trabalho/teste.cpp" -o "/home/williambronzo/Área de Trabalho/teste.exe"
Same problem:
g++ /home/williambronzo/Área de Trabalho/teste.cpp -o /home/williambronzo/Área de Trabalho/teste.exe
Out put erro:
g++: error: /home/williambronzo/Área: Arquivo ou diretório inexistente
g++: error: de: Arquivo ou diretório inexistente
g++: error: Trabalho/teste.cpp: Arquivo ou diretório inexistente
g++: error: de: Arquivo ou diretório inexistente
g++: error: Trabalho/teste.exe: Arquivo ou diretório inexistente
g++: fatal error: no input files
compilation terminated.
The incredible thing that puts double quotes in the code output (build log), but apparently runs the program underneath without double quotes.
If it weren't for the sam varshavchik tip, I wouldn't have found the problem. After all, I was wondering where the program was putting the, "teste.o" and "teste". Then I looked at the folder spaces. (Noobs error.)
My solution:
Avoid folders with spaces.
Change the:
"/home/williambronzo/Área de Trabalho/teste.cpp"
For:
"/home/williambronzo/Documentos/[Filename without space]/teste.cpp"
Probably if your main language or the selected computer language does not include spaces in the directories you will not find an error, but if there is space in any directory you will find this Codeblocks error.
I'm sorry for bothering you with a trivial error and Thank you all.

CodeBlocks no such file, no input files error, using GCC cygwin compiler

I have installed code blocks on Windows 10, before that I installed GCC Cygwin compiler.
In Settings > Toolchain executables section I set up C compiler, C++ compiler,
linker to dynamic libs to use gcc.exe, the compiler's directory is set as C:\cygwin64.
I tried to run a dummy hello world program to make sure it works but got the following error:
||=== Build: Debug in dummy2 (compiler: Cygwin GCC) ===|
\Users\abc\OneDrive\ミミクミケ ムath\dummy2\main.c"||No such file or directory|
||error: no input files|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
I used to use min gw compiler and it worked fine, but once I switched to cygwin it started to throw errors.
It looks like this part of the file directory is garbled, cant figure out why.
OneDrive\ミミクミケ ムath\
Please let me know what can be a problem here.
Cheers.

“No such file or directory found” when building a project in CodeBlocks

I’m new to C++, only experienced in Java so far, so please be precise with the answers.
I translate the error from German to English, so they might not match the English counterpart.
I was trying to set up the IDE Codeblocks on Ubuntu, and tried to test it with a simple Hello World program.
Trying to "Build and run" the program caused two errors in the build log:
"-------------- Build: Debug in TestProject (compiler: GNU GCC Compiler)---
g++ -Wall -std=c++11 -g -c /home/marcel/Dokumente/Dokumente/Privat/Udemy/C++/Übung/TestProject/src/Main.cpp -o obj/Debug/src/Main.o
g++ -o bin/Debug/TestProject obj/Debug/src/Main.o
g++: error: obj/Debug/src/Main.o: File or directory not found
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))"
I tried to look it up, but most people seemed to have more problems than just these two files. None of their Solutions worked.
So far I've wasted a few days trying to fix it, so I thought I would ask here.

codeblocks doesn't work on windows 8 or 8.1

I really need your help. I just purchased a new laptop, it has windwos 8 operating system, and I am trying to practice my c++ code, but it gives me error and doesn't output. Please help...
Here is what I get when I run simple "Hello world" program.
||=== Build: Debug in codeblocks_testing (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lsndfile|
ld.exe||cannot find -lglew|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 2 second(s)) ===|
Thanks in advance,

Boost threads creating InterlockedCompareExchange Errors on mingw32

After googling for InterlockedCompareExchange errors, it seems like it always points to an old error for mingw64, and I am using mingw32.
It seems to happen to all examples that use threads, but if I just have "#include <boost/thread.hpp>" and no calls of a thread it will work, so I think I did the linking correct.
This is my build:
-------------- Build: Debug in UDP_EXAMPLE (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -D_WIN32_WINNT=0x0501 -g -IC:\boost_1_56_0 -c "C:\Users\poteto\Desktop\Other Programming\UDP_EXAMPLE\server.cpp" -o obj\server.o
In file included from C:\boost_1_56_0/boost/thread/win32/thread_data.hpp:11:0,
from C:\boost_1_56_0/boost/thread/thread_only.hpp:15,
from C:\boost_1_56_0/boost/thread/thread.hpp:12,
from C:\boost_1_56_0/boost/thread.hpp:13,
from C:\Users\poteto\Desktop\Other Programming\UDP_EXAMPLE\server.cpp:5:
C:\boost_1_56_0/boost/thread/win32/thread_primitives.hpp:180:0: warning: ignoring #pragma intrinsic [-Wunknown-pragmas]
mingw32-g++.exe -o Debug\http_server.exe obj\server.o -lws2_32 -lwsock32 C:\boost_1_56_0\stage\lib\libboost_thread-mgw47-mt-1_56.a C:\boost_1_56_0\stage\lib\libboost_system-mgw47-mt-1_56.a
C:\boost_1_56_0\stage\lib\libboost_thread-mgw47-mt-1_56.a(thread.o):thread.cpp:(.text$_ZN5boost6detail5win3223GetTickCount64emulationEv+0x1e): undefined reference to `_InterlockedCompareExchange'
C:\boost_1_56_0\stage\lib\libboost_thread-mgw47-mt-1_56.a(thread.o):thread.cpp:(.text$_ZN5boost6detail5win3223GetTickCount64emulationEv+0x70): undefined reference to `_InterlockedCompareExchange'
C:\boost_1_56_0\stage\lib\libboost_thread-mgw47-mt-1_56.a(thread.o):thread.cpp:(.text$_ZN5boost6detail5win3223GetTickCount64emulationEv+0xb5): undefined reference to `_InterlockedCompareExchange'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 11 second(s))
3 error(s), 1 warning(s) (0 minute(s), 11 second(s))
I linked the libraries: libboost_thread and libboost_system. I am using Codeblocks. Other asio examples without threads work.
In the example:http://www.ce.unipr.it/~medici/udpserver2.html
If I were to remove the call to the thread, it would work.