User forums > Help

'No such file or directory' error running in terminal

(1/3) > >>

markpotts:
Running under Linux (Ubuntu 20.04) I can build an application using Code::Blocks and run it from the IDE (in Debug or Release mode) without problem. However when I try to run the same executable under terminal I get a 'No such file or directory' error. This was not an issue with earlier Linux/Code::Blocks versions

If I build the same application using 'gcc' directly from the command line it build and runs correctly with no problem.

Any thoughts would be much appreciated.

oBFusCATed:
You have to give us more details... How are you running the executable? Does it depend on external libraries? Are they found?

markpotts:
The executable is stand-alone with no libraries. In terminal I simply type the path to the executable. This works if I compiled with gcc from the command line but gives the error if compiled with CB.

stahta01:
Post the full build commands used; Both inside Code::Blocks and on the command line.

http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Tim S.

markpotts:
Inside CB:
  Build->Rebuild
  Build->Run    [works correctly]
 
then in terminal:
  ~$ ./name    [fails 'No such file or directory']

Command Line:
 ~$ gcc name.cpp -lpthread -o name
 ~$ ./name   [works correctly]

I will review the suggested FAQ, thanks.

Navigation

[0] Message Index

[#] Next page

Go to full version