Содержание
- Eclipse fatal error no input files
- Eclipse fatal error no input files
- Breadcrumbs
- Eclipse fatal error no input files
- Breadcrumbs
Eclipse fatal error no input files
I just downloaded c/c++ IDE developer and made a C++ project. but then under problems tab, these come up and I cannot proceed to do anything else from there.
Program «g++» not found in PATH
Program «gcc» not found in PATH
sh-c «autoreconf-i»
fyi, I had a EE java developer installed previously, but when I downloaded c/c++ developer, I just clicked to replace all java’s with c/c++.
thanks for the help fellas
A compiler is a program that takes text files and turns them into binary object files.
A linker is a program than takes these binary object files and turns them into a neatly packaged library or an executable.
Often, the term «compiler» is taken to mean «compiler and linker», and they usually come as a pair.
An IDE is a set of nice tools that help you write the text files and use the compiler and linker. Eclipse is an IDE. SOmetimes an IDE comes with a compiler/linker. Sometimes it does not.
Go back to where you got Eclipse and check if it actually comes with the compiler. Perhaps there is a download with compiler, and a download without. You may have taken the one without.
Failing that, google for a C++ compiler for your chosen OS and see what you find. On linux, gcc (and its g++ guise) is common.
could you please check for me? I have no idea what indicates that there is a compiler included.
Here is the link:
http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/junor
^^ I clicked details on the eclipse that I installed. It’s called Eclipse IDE for C/C++ Developers
Look for the text «Eclipse IDE for C/C++ Developers does not contain a compiler or debugger». Looks like you have to provide it yourself.
Alright, I downloaded the MinGW. While installing, I clicked download latest repository catalogues, accepted the agreement, and when it asked me to choose which optional components of MinGW to install, I clicked c++ compiler, at the bottom though there are like msys basic system and mingw developer toolkit, which I did not click. After I installed it, I went to computer properties then environment variables and then added ;C:MinGWbin to Path. I then searched for cmd and typed in gcc. It outputted, gcc : no input files and in the next line said compilation terminated. I clicked eclipse and clicked C++ project. But still there was no MinGW GCC under Toolchains. All I saw was GNU autotools Toolchain.
Moschops, I appreciate you helping me but could you specify more as to what I should do step by step to get the eclipse to function properly? so that you won’t have to come back here and reply to every single problem that I encounter? that will be more beneficial to both of us. thanks in advance.
Short answer — no idea. I’ve never used Eclipse. I tried it once and I didn’t like it. I write my code in text files and manually compile them without an IDE.
Since it said gcc : no input files gcc clearly has been installed. All I can suggset now is that buried somewhere in Eclipse’s menus is an options to specify the compiler/location.
oh actually, I tried gcc again in cmd and this popped up, «gcc : fatal error : no input files» and below that is «compilation terminated.»
Here is one way gcc works; you type «gcc» and then you type the name of the file you want it to compile.
If you don’t provide the name of a file to compile, or any instructions, how does it know what you want it to do?
where do I provide that?
now I only get this error. sh-c «autoreconf-i»
can nobody fix this? this is problem something new??
I think you’re the first person I’ve met who uses Eclipse for C++. Now I know why 🙂
Источник
Eclipse fatal error no input files
Community
Participate
Eclipse IDE
Home » Language IDEs » C / C++ IDE (CDT) » g++.exe: no input files on mingw
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Whenever I try to build C++ programs that involve I/O, I get errors in Eclipse.
02:19:02 **** Incremental Build of configuration Debug for project SecondProject ****
make all
Building target: SecondProject
Invoking: GCC C++ Linker
g++ -o "SecondProject"
g++: fatal error: no input files
makefile:45: recipe for target 'SecondProject' failed
compilation terminated.
make: *** [SecondProject] Error 1
It compiles just fine for other C++ programs that don’t require user input.
However, I can compile just fine when I use the command line without an issue. Why is this happening? Is there a fix for it?
asked Nov 29, 2016 at 7:23
1
The compiler is attempting to compile SecondProject with no source files. Which is why you observed this:
g++ -o "SecondProject"
g++: fatal error: no input files
Troubleshoot
Verify your project properties in
Properties > C/C++ General > Paths and Symbols
Check that your Source Location
and Include
paths are setup correctly. If your paths are correct, you should see something like when you build again:
g++ -o "SecondProject" ./<your src folder>/<something>.o ...
Otherwise, create a fresh new C/C++ Project and add the sources again.
answered Nov 29, 2016 at 7:34
Andrea ChuaAndrea Chua
3022 silver badges8 bronze badges
3
leWire 1 / 1 / 2 Регистрация: 02.03.2014 Сообщений: 34 |
||||
1 |
||||
06.05.2015, 00:19. Показов 14743. Ответов 11 Метки нет (Все метки)
Не могу разобраться как исправить ошибки. Подсобите кто как может. Скриншот прилагается. Сам код:
Миниатюры
__________________
0 |
Max Dark шКодер самоучка 2173 / 1880 / 912 Регистрация: 09.10.2013 Сообщений: 4,135 Записей в блоге: 7 |
||||
06.05.2015, 00:26 |
2 |
|||
у вас терминал запущен в домашней директории(/home/lolka/)
0 |
4839 / 3852 / 1598 Регистрация: 24.04.2014 Сообщений: 11,300 |
|
06.05.2015, 00:28 |
3 |
leWire, для начала нужно убедиться, что в текущей директории есть файл tex.c
0 |
1 / 1 / 2 Регистрация: 02.03.2014 Сообщений: 34 |
|
06.05.2015, 00:44 [ТС] |
4 |
Файлы лежат в /home/lolka. Добавлено через 1 минуту
0 |
4839 / 3852 / 1598 Регистрация: 24.04.2014 Сообщений: 11,300 |
|
06.05.2015, 10:53 |
5 |
«/home/lolka/bad.txt» — так правильно? tex.c для начала найти нужно
0 |
1 / 1 / 2 Регистрация: 02.03.2014 Сообщений: 34 |
|
06.05.2015, 21:37 [ТС] |
6 |
tex.c находится ведь там где надо? разве нет?
0 |
4839 / 3852 / 1598 Регистрация: 24.04.2014 Сообщений: 11,300 |
|
07.05.2015, 10:11 |
7 |
tex.c находится ведь там где надо? разве нет? компилятор говорт что не видит его.
0 |
43 / 43 / 12 Регистрация: 06.10.2014 Сообщений: 135 |
|
07.05.2015, 11:13 |
8 |
tex.c находится ведь там где надо? разве нет? Вы действительно думаете, что отсюда виднее, где этот файл у вас там находится?
0 |
1 / 1 / 2 Регистрация: 02.03.2014 Сообщений: 34 |
|
07.05.2015, 21:39 [ТС] |
9 |
ха-ха,
0 |
4839 / 3852 / 1598 Регистрация: 24.04.2014 Сообщений: 11,300 |
|
07.05.2015, 22:20 |
10 |
leWire, что ls -l выводит? tex.c — все символы в правильной раскладке
0 |
1 / 1 / 2 Регистрация: 02.03.2014 Сообщений: 34 |
|
22.05.2015, 04:42 [ТС] |
11 |
Причина была в том, что gpedit, или как то так, текстовой редактор в общем, имеет функцию выбора под какую систему сохранять текстовой файл, под windows или же под Linux, так как это связано с символом конца строки, который в какой то системе помещается, а в какой то нет, (точно не помню), так вот я не глядя сохранял под windows, а когда сохранил под linux, естественно все заработало.
0 |
0 / 0 / 0 Регистрация: 12.07.2021 Сообщений: 3 |
|
16.07.2021, 14:07 |
12 |
Гость — 2 Февраль, 2017 — 12:38 Гость — 7 Декабрь, 2017 — 16:42 нашел где то на каком то форуме, как вариант решения, мне помогло.
0 |
please help with eclipse
I just downloaded c/c++ IDE developer and made a C++ project. but then under problems tab, these come up and I cannot proceed to do anything else from there.
Program «g++» not found in PATH
Program «gcc» not found in PATH
sh-c «autoreconf-i»
fyi, I had a EE java developer installed previously, but when I downloaded c/c++ developer, I just clicked to replace all java’s with c/c++.
thanks for the help fellas
Looks like you haven’t got a compiler, or you’ve told eclipse to use the wrong one, or it’s not where eclipse expects to find it.
Last edited on
So what should I do?
Do you have a compiler?
isn’t eclipse the compiler? if not then how do i check?
No.
A compiler is a program that takes text files and turns them into binary object files.
A linker is a program than takes these binary object files and turns them into a neatly packaged library or an executable.
Often, the term «compiler» is taken to mean «compiler and linker», and they usually come as a pair.
An IDE is a set of nice tools that help you write the text files and use the compiler and linker. Eclipse is an IDE. SOmetimes an IDE comes with a compiler/linker. Sometimes it does not.
Go back to where you got Eclipse and check if it actually comes with the compiler. Perhaps there is a download with compiler, and a download without. You may have taken the one without.
Failing that, google for a C++ compiler for your chosen OS and see what you find. On linux, gcc (and its g++ guise) is common.
Last edited on
any suggestions on where I should look into? could you provide me with a link? i’m a newbie..
Last edited on
bumpp please help…
Last edited on
On that page is a link titled «Before you Begin».
Alright, I downloaded the MinGW. While installing, I clicked download latest repository catalogues, accepted the agreement, and when it asked me to choose which optional components of MinGW to install, I clicked c++ compiler, at the bottom though there are like msys basic system and mingw developer toolkit, which I did not click. After I installed it, I went to computer properties then environment variables and then added ;C:MinGWbin to Path. I then searched for cmd and typed in gcc. It outputted, gcc : no input files and in the next line said compilation terminated. I clicked eclipse and clicked C++ project. But still there was no MinGW GCC under Toolchains. All I saw was GNU autotools Toolchain.
Moschops, I appreciate you helping me but could you specify more as to what I should do step by step to get the eclipse to function properly? so that you won’t have to come back here and reply to every single problem that I encounter? that will be more beneficial to both of us. thanks in advance.
Short answer — no idea. I’ve never used Eclipse. I tried it once and I didn’t like it. I write my code in text files and manually compile them without an IDE.
Since it said gcc : no input files
gcc clearly has been installed. All I can suggset now is that buried somewhere in Eclipse’s menus is an options to specify the compiler/location.
oh actually, I tried gcc again in cmd and this popped up, «gcc : fatal error : no input files» and below that is «compilation terminated.»
any clue?
Here is one way gcc works; you type «gcc» and then you type the name of the file you want it to compile.
For example,
gcc someFile.cpp
If you don’t provide the name of a file to compile, or any instructions, how does it know what you want it to do?
where do I provide that?
now I only get this error… sh-c «autoreconf-i»
can nobody fix this? this is problem something new??
I think you’re the first person I’ve met who uses Eclipse for C++. Now I know why
Your problems are not C++ problems — they’re Eclipse problems. You would get better responses at an Eclipse forum (like this http://www.eclipse.org/forums/index.php/t/366745/ )
Last edited on
Topic archived. No new replies allowed.
Увидели сообщение с непонятной ссылкой, спам, непристойность или оскорбление?
Воспользуйтесь ссылкой «Сообщить модератору» рядом с сообщением!
- Форум русскоязычного сообщества Ubuntu »
- Ubuntu Russian LoCo »
- Разработка (Модератор: Azure) »
- Нужна помощь насчет Eclipse Juno
- Печать
Страницы: [1] Вниз
Тема: Нужна помощь насчет Eclipse Juno (Прочитано 739 раз)
0 Пользователей и 1 Гость просматривают эту тему.

MoHoXPOM
Доброго времени суток! При компиляции выдает ошибку — «Program «g++» not found in PATH». Не стоял компилятор С++. Странно, поставил. Теперь из терминала:
«g++:fatal error: no input files compilation terminated.»
Но в Eclipse ничего не поменялось, та же ошибка при компиляции. Кто сталкивался с такой ошибкой и как ее решить? Заранее благодарен за помощь.
- Печать
Страницы: [1] Вверх
- Форум русскоязычного сообщества Ubuntu »
- Ubuntu Russian LoCo »
- Разработка (Модератор: Azure) »
- Нужна помощь насчет Eclipse Juno
SMF 2.0.19 |
SMF © 2011, Simple Machines | Карта форума
Страница сгенерирована за 0.04 секунд. Запросов: 25.
Эта тема
- Везде
-
- Эта тема
- Этот форум
-
- Расширенный поиск
Поиск
Here is a summary of the most important steps:
- Download and install a JDK version 8 (Java Development Kit)
- from http://www.oracle.com/technetwork/java/javase/downloads/index.html, go to «JDK Download»
- Run the installer
- Check on the command line: java -version
- If it says «command not found» or similar try this: Add the bin directory (e.g. C:Program FilesJavajdk1.8.x_xxbin) of the installed JDK to the PATH environment variable, as described here: http://www.java.com/en/download/help/path.xml
- Download Eclipse IDE for C/C++ Developers from http://www.eclipse.org/downloads/ (same bit version as for the JRE, i.e. 32 or 64 bit) and unzip e.g. to C:deveclipse
- Download and install a C/C++ compiler (you will need gcc) for Windows,
- e.g. MinGW (alternatively Cygwin): for MinGW read http://www.mingw.org/wiki/Getting_Started or http://www.mingw.org/wiki/InstallationHOWTOforMinGW
- In the MinGW Installer choose «Basic Setup» and then the following packages:
- add the bin directory (e.g. C:MinGWbin) to the PATH variable, as before in 1.
- Check on the command line: gcc
- You should get: gcc: fatal error: no input files. compilation terminated. (this means gcc is found!!!)
- Start Eclipse with eclipse.exe. Then:
- File > New > C Project
- Enter a project name of your choice e.g. «helloworld»
- Select project type «Hello World ANSI C Project» and toolchain «MinGW GCC»
- Edit the source file:
- Initially build the project: either press Ctrl+B or click the «Hammer» button or right click the project and click «Build Project»
- Click the «Run» button. That’s it!
#include <stdio.h> int main(void) { printf("C/C++ on Eclipse...n"); return 0; }
I wrote this simple line of code and saved it in a file called ‘ex.c’.
The code is the following (first line is purposely written wrong as it showed up different in the post):
"#include < stdio.h >
int lst[] = {6,3,7,9};
int main(){
printf("Hellon");
return 0;
}
I then wanted to compile it using the command gcc ex.c
but I get an error saying «gcc: fatal error: no input files
compilation terminated.»
What am I doing wrong?
I use git bash and have installed both msys64 and MinGW to the C directory, aswell as add the gcc in my path enviorment.
Why is it not working?
asked Aug 28, 2019 at 15:58
you should add the output executable name
gcc ex.c -o output
and then you can execute your output
file with /output
.
all the other options are available in the gcc documentation
answered Aug 28, 2019 at 16:22
13
The problem was that I had followed the instructions on the following page: https://github.com/is1200-example-projects/mcb32tools/releases/
But I had forgot the last step which is to download the .run file for msys, I did this and now it is working for MSYS2, Git Bash still not working, but one working is all I need!
STEPS I FORGOT (as taken from the link):
-
Download the .run-file for windows. Make sure you download the correct version.
The x86_64 version is for 64 bit MSYS2 installation and the i686 version for a 32 bit MSYS2 installation. -
Run the .run-file inside the MSYS2 environment (cd to containing directory, run with ./mcb32tools-*.run)»
answered Aug 28, 2019 at 19:03
PCheckPCheck
11 gold badge1 silver badge1 bronze badge