Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Resolving the ./main: not found Error in C++ with Geany IDE on Raspberry Pi 3

  • vlogize
  • 2025-03-25
  • 7
Resolving the ./main: not found Error in C++ with Geany IDE on Raspberry Pi 3
./main: not found (C++ RP 3/B Geany IDE)c++geany
  • ok logo

Скачать Resolving the ./main: not found Error in C++ with Geany IDE on Raspberry Pi 3 бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Resolving the ./main: not found Error in C++ with Geany IDE on Raspberry Pi 3 или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Resolving the ./main: not found Error in C++ with Geany IDE on Raspberry Pi 3 бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Resolving the ./main: not found Error in C++ with Geany IDE on Raspberry Pi 3

Encountering the `./main: not found` error while executing your C++ program in Geany IDE? This guide walks you through the solution and correct commands for a smooth experience.
---
This video is based on the question https://stackoverflow.com/q/74594984/ asked by the user 'Runsva' ( https://stackoverflow.com/u/12224591/ ) and on the answer https://stackoverflow.com/a/74594989/ provided by the user 'lorro' ( https://stackoverflow.com/u/6292621/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions.

Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: "./main: not found" (C++, RP 3/B, Geany IDE)

Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l...
The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license.

If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com.
---
Understanding the ./main: not found Error in C++

If you've been using the Geany IDE on your Raspberry Pi 3 Model B, you might have encountered a frustrating issue when trying to run your C++ program. Specifically, you may see an error message that states ./main: not found. This guide aims to clarify why this error occurs and how you can effectively resolve it, ensuring you can run your C++ programs without issues.

The Problem

You were trying to compile and run a simple C++ program comprised of a header file (test.h), a source file (test.cpp), and a main file (main.cpp). Your files are structured like this:

main.cpp: Includes test.h and calls test_function().

test.h: The header file declaring the function test_function().

test.cpp: Defines the test_function() that prints "hello world".

Despite the code compiling and building without any apparent errors, executing the program results in the frustrating message:

[[See Video to Reveal this Text or Code Snippet]]

Analyzing the Compile and Build Commands

To address the issue, let's take a closer look at the compile and build commands you've been using:

Compile Command:

[[See Video to Reveal this Text or Code Snippet]]

Build Command:

[[See Video to Reveal this Text or Code Snippet]]

The confusion arises primarily due to the -o option in your Build Command.

The Key Insight

In the build command, you have the flag -o test, which indicates that the output binary of your build will be named test, not main.

Therefore, when you attempt to run the program using ./main, it fails because there's no executable named main. Instead, you should run ./test.

Steps to Fix the Error

To resolve the issue and successfully execute your program, follow these steps:

Correct the Build Command:
You can simply run:

[[See Video to Reveal this Text or Code Snippet]]

Alternatively, if you want the output filename to remain main, you could adjust your command to:

[[See Video to Reveal this Text or Code Snippet]]

Execute the Correct Binary:
After building your code, ensure to run:

[[See Video to Reveal this Text or Code Snippet]]

or

[[See Video to Reveal this Text or Code Snippet]]

Confirm the Output:
Once executed correctly, you should see the output:

[[See Video to Reveal this Text or Code Snippet]]

Conclusion

By understanding and correcting your compile and build commands, you will be able to run your C++ programs in Geany IDE on your Raspberry Pi 3 without encountering the ./main: not found error. Always remember to check the name of the produced executable, as this is a common source of confusion among beginners. Happy coding!

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]