Author Topic: "Hello World". Error: No such file or directory  (Read 2015 times)

Offline Soros

  • Single posting newcomer
  • *
  • Posts: 1
"Hello World". Error: No such file or directory
« on: June 30, 2021, 08:36:10 am »
Hello. I wrote project that used "usb.c" file. This project done and removed.
Then I try create simple "Hello World" application
Code
int main()
{
    printf("Hello World!\n");
    return 0;
}

Click Build and Run... And:
I see this sh...  >:(
gcc     No such file or directory
usb.c  No such file or directory


WTF?? Why new compiling searches old files and resources from old (removed) project??
I clear confused and dont know.. How fix this??
What means that "gcc No such file.." ??
I tried reinstall CB. But this uneusefull.
At another computer no any troubles
Thanks.

Offline Miguel Gimenez

  • Lives here!
  • ****
  • Posts: 798
Re: "Hello World". Error: No such file or directory
« Reply #1 on: June 30, 2021, 02:22:00 pm »
Somehow you are still using the old project, or misconfigured the compiler settings. Can you post the CBP file?

Reinstalling applications (or OSes) is rarely a wise option.

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 185
Re: "Hello World". Error: No such file or directory
« Reply #2 on: July 01, 2021, 03:29:55 pm »
Soros, Looks like you have either not installed a compiler or using the old project or have an incorrect default compiler or have not configured the compiler in codeblocks.

To configure a compiler in codeblocks please have a look at section 5.2.3 in the following codeblocks manual:
https://www.codeblocks.org/docs/manual_codeblocks_en.pdf

If you still cannot get CB working in addition to the CBP file as rquested by Miguel can you also supply the following details:
  • What OS are you using? If it is Lunux can you let us know the distribution and release.
  • What C/C++ compiler and version did you install?


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7180
    • My Best Post
Re: "Hello World". Error: No such file or directory
« Reply #3 on: July 01, 2021, 04:10:58 pm »
If you post the "Build Log" instead of "Build Messages" it will also help find the problem's cause.

https://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

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