Dev c ошибка при компиляции

After some investigation, and with Dr.Topaz’s help, I have learned that you will want to confirm that the program set for g++ in the Compiler Options really does compile the source code. In my case, the C:Dev-Cppbing++.exe program did not create an exe, but the C:Dev-Cppbinc++.exe program did. Either program appears to be intended to take the same arguments and options as GNU g++. I would love to find an actual doc on the Dev-C++ compiler programs, but I have not so far.

You can test the compiler program with a simple example like this:

C:Dev-Cppbinc++.exe hello.cpp -o hello.exe

Currently in 2021, the Dev-C++ site invites you to download either original Dev-C++ or a newer fork by a group named Embarcadero.

I decided to try the Embarcadero version and the experience was slightly better. The UI is still a tad dated, but the g++.exe program it came with was able to compile programs without issue. Again, take note of where the program is being installed, but in my case, the Embarcadero compiler programs were in C:Program Files (x86)EmbarcaderoDev-CppTDM-GCC-64bin.

Both original Dev-C++ and Embarcadero come with mingw-32 versions of the compiler programs that from what I see do work in a Git Bash console, with slight differences such as not recognizing a default locale when using the command std::cout.imbue(std::locale("")).

8 / 8 / 5

Регистрация: 07.12.2014

Сообщений: 73

1

27.02.2015, 16:59. Показов 9658. Ответов 11


Студворк — интернет-сервис помощи студентам

Здравствуйте, у меня есть ошибка с комплиации в dev c++, ОС Windows 8.1 Профессиональная

Миниатюры

Ошибка компиляции в Dev C++
 



0



55 / 56 / 34

Регистрация: 29.12.2012

Сообщений: 478

27.02.2015, 17:08

2

А код ошибки то и не показали….
return 0;-попробуйте добавить



0



41 / 41 / 26

Регистрация: 24.02.2015

Сообщений: 151

27.02.2015, 17:08

3

Попробуй добавить return 0;
И покажи код ошибки(кликнуть по «показать подробности проблемы»)



1



55 / 56 / 34

Регистрация: 29.12.2012

Сообщений: 478

27.02.2015, 17:12

4

Не по теме

Цитата
Сообщение от MakeEasy
Посмотреть сообщение

Попробуй добавить return 0;
И покажи код ошибки(кликнуть по «показать подробности проблемы»)

Гении мыслят одинаково



1



8 / 8 / 5

Регистрация: 07.12.2014

Сообщений: 73

27.02.2015, 17:18

 [ТС]

5

Добавил return 0; Тоже дает одинаковый ошибку

Рисунок

Ошибка компиляции в Dev C++



0



41 / 41 / 26

Регистрация: 24.02.2015

Сообщений: 151

27.02.2015, 17:27

6

Наверное, кривая сборка dev c++. Попробуй переинсталить.



0



8 / 8 / 5

Регистрация: 07.12.2014

Сообщений: 73

27.02.2015, 17:34

 [ТС]

7

Я установил dev c++ 4.9.9 dev и c++ 5.3, я тоже думал что некоторые компоненты не установился, и потом установил Visual studio 2012 и Visual Studio 2013. Не помогло. Потом я установил эти сборки на другом компьютеры на который установленоWindows XP и Windows 7. У них работал.



0



41 / 41 / 26

Регистрация: 24.02.2015

Сообщений: 151

27.02.2015, 17:49

8

Может быть это косяк Windows 8. В любом случае проблема здесь не в коде. Так что надо эксперементировать. Отключить антивирусник, переустановить компилятор, библиотеки.



0



быдлокодер

1723 / 910 / 106

Регистрация: 04.06.2008

Сообщений: 5,666

27.02.2015, 18:00

9

Если поможет- ось почему-то палит компилятор. ТС:
1) Создать файл «cmd.bat» содержания «cmd»
2) Создать файл «file.cpp» содержащий код
3) Запихать «cmd.bat» и «file.cpp» в папку с «g++.exe», последний должен находиться в папке «Dev-CppMinGW32bin»
4) Ткнуть на файл «cmd.bat»
5) В появившемся окне скомандовать: g++ file.cpp
6) Результаты сюда.



0



0 / 0 / 0

Регистрация: 10.01.2015

Сообщений: 1

27.02.2015, 18:13

10

Erkin надо устанавить оs windows 7 ))))



0



быдлокодер

1723 / 910 / 106

Регистрация: 04.06.2008

Сообщений: 5,666

27.02.2015, 18:20

11

Цитата
Сообщение от Britanik
Посмотреть сообщение

Erkin надо устанавить оs windows 7

Если уж так, то XP (на чём и работаю). Но мы должны найти в чём именно плоха windows 8, поэтому будем разбирать всё предметно.



1



8 / 8 / 5

Регистрация: 07.12.2014

Сообщений: 73

27.02.2015, 19:03

 [ТС]

12

Друзья, все работал спасибо за внимание. Обновил систему и переустановил dev c++



0



Possible Duplicate:
dev c++ compiler error

I have written a quite simple Windows application in Dev-C++ (actually it is the Dev-C++ default project template).

U have got this error

E:proj1Makefile.win [Build Error]  [main.o] Error 1 

This is the compiler log :

Compiler: Default compiler
Building Makefile: "E:proj1Makefile.win"
Executing  make...
make.exe -f "E:WorkSpacePOINTMAN CARD PRINTERCdsNew folderMakefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

'C:Usersr' is not recognized as an internal or external command,
operable program or batch file.

The system cannot find the path specified.

make.exe: *** [main.o] Error 1

Execution terminated

I have Googled and tested the solutions but none of them worked for me.
Does anyone have any idea about this?

Community's user avatar

asked Jul 25, 2012 at 12:45

Bahram's user avatar

0

Don’t you have a space in your user name perhaps? C:Usersr anythingmyproject might be bad location because of the space in it.

answered Jul 25, 2012 at 12:55

Davs's user avatar

DavsDavs

4954 silver badges12 bronze badges

1

It looks like it is the backslash r ‘r’ in your path that is causing troubles. I don’t suspect the ming toolchain handles that well without escaping:

make.exe -f "E:\WorkSpace\POINTMAN CA..."

Or, easier, use forward slashes ‘/’.

make.exe -f "E:/WorkSpace/POINTMAN CA..."

You may have to escape the spaces too:

make.exe -f "E:/WorkSpace/POINTMAN CA..."

answered Jul 25, 2012 at 13:28

Tim Finer's user avatar

Tim FinerTim Finer

5656 silver badges13 bronze badges

2

#c #windows #makefile #compiler-errors #dev-c

#c #Windows #makefile #ошибки компилятора #dev-c

Вопрос:

У меня возникли большие проблемы с компиляцией программы hello world на Dev-C . Я очень хорошо знаком с кодированием, я использую python, C # и Java уже несколько лет.

Синтаксис и заголовки, похоже, все в порядке. Я несколько раз переустанавливал Dev-C и даже пытался установить компилятор вручную, но безрезультатно. Я искал stack overflow и форумы, но все еще не могу решить свою проблему. Я на Windows 10.

Вот мой код ошибка компиляции. Похоже, что при создании происходит сбой.

 #include <iostream>
using namespace std;

int main()
{
    cout << "Hello World!";
    return 0;
}
  

#Журнал компиляции:

 Compiler: Default compiler
Building Makefile: "C:Dev-CppProjectsMakefile.win"
Executing  make...
make.exe -f "C:Dev-CppProjectsMakefile.win" all
g  .exe -c project2.cpp -o project2.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c  /3.4.2/backward"  -I"C:/Dev-Cpp/include/c  /3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c  /3.4.2"  -I"C:/Dev-Cpp/include"   

make.exe: *** [project2.o] Error -1073741674

Execution terminated
  

Спасибо за помощь, это начинает вызывать стресс.

Комментарии:

1. Я бы рекомендовал избавить себя от множества будущих головных болей, не используя Dev C . Он старый и устаревший, и, похоже, его больше никогда не будут обновлять.

2. Можете ли вы передать параметры в dev c и, возможно, попытаться выяснить, какую версию g он использует? И попробуйте применить что-то вроде -std=c 14 (или 17 или что-то еще, в зависимости от того, насколько ужасно устарел g ). Также попытайтесь выяснить, что означает «Ошибка -1073741674».

3. Этот код ошибки означает STATUS_PRIVILEGED_INSTRUCTION (выполните 2 ^ 32-1073741674 и преобразуйте в hex, что дает 0xC0000096, и найдите в Google #define 0xC0000096 ), что указывает на то, что g сильно разбился и выполнил неправильную инструкцию перехода. (Поскольку ошибка на самом деле означает, что была выполнена инструкция типа mov cr0, eax , которая разрешена только в режиме ядра, а g не будет этого делать при обычных обстоятельствах, поэтому я думаю, что она перескочила в data / stack и выполнила случайный код, т. Е. произошел сбой). — Вероятно, это очень старая версия, в которой есть ошибка или проблема несовместимости с Win10 или какой-либо библиотекой.

4. Хрустящий, ты еще ничего не видел. Мы регулярно получаем вопросы от студентов, относящиеся к TurboC (хотя, должен сказать, в этом году это сильно замедлилось), компилятору C , выпущенному тридцать <ругательство удалено> лет назад.

5. Dev-C не полностью совместим с C 11, вот насколько он устарел.

Dev C++, created by Bloodshed programming, is a free IDE for programming in C/C++. It works with Windows 7, 8 and 10 and can be used to compose Windows or control centre based C/C++ programs effectively, and you can also make an installer for your application.

In this article, we’re going over what is the Dev C++ build error, and quick fixes for the error.


What is the Dev C++ build error?

Build represents a compilation of the code. If the code is built successfully, it is now executable and does not have any errors. An error is the illicit use of commands or operations, leading to abnormal functionality. An error prevents the code from being built or compiled and hence becomes non-executable.

There are five different types of errors commonly seen in C/C++.

  • Syntax error
  • Run-time error
  • Linker error
  • Logical error
  • Semantic error

The syntax error is also known as compilation error or build error.


Syntax errors

Syntax errors occur due to a violation of the basic rules or syntax for writing the code in the C/C++ language. This error prevents the code from getting compiled. All the syntax errors detected by the compiler need to be resolved for the code to compile successfully.

The most common syntax errors are forgetting to put a semicolon, incorrect number of parenthesis and using a variable without the declaration, among others.

How to fix Dev C++ build error?

Note the words failed and Error 1 in the snipped above. This indicates that the code ran into a build error.

Also read: How to create a project in Dev C++?


Ensure that the version being used is the latest and is supported by your device.

The first step to follow when a build error occurs is to check the errors and the lines where it is happening. Then, under the Compiler tab in the bottom panel, the error message is mentioned alongwith the line number.

How to fix Dev C++ build error?

Follow the message and attempt to debug the code. The error in the above snippet is expected ‘;’ before return, which indicates that the 6th line is missing a semicolon.


Paranthesis

Build errors may occur due to the incorrect opening/closing of the parenthesis or an incorrect number of them. Always make sure that function calls like main(), or any other user-defined function has the opening and closing brackets next to them with or without the parameters in them depending on the type of function.

When writing a conditional statement like if, if-else, for, switch, while and others, double-check the number of opening parenthesis. Nested loops might often have a confusing set of brackets. Always keep practising making both the start and end set of parenthesis when starting a new loop.


Spell check

While coding, the spellings of variables, functions, methods, and keywords often go wrong and sometimes may not be detected as a spelling error in the console, which makes it tricky to fix the errors. C/C++ is a case-sensitive language.

All user-defined variables, functions and methods must be called in the same case for the code to build error-free. Try to keep the names of variables and functions easy to remember, something meaningful to its function in the code and not very complicated in terms of the casing.


Semicolon

Forgetting a semicolon is one of the worst nightmares of any coder. The absence of a single semicolon can prevent the entire program from building.

If the semicolon is missed within a loop, it can cause many more errors that may make no sense. Ensure to insert a semicolon after every single line of code, with the given exceptions of functions and beginnings of loops.


Data type

Every initialised variable and user-defined function has a specific data type. Data types include int or integer, str or string, float and many others. Using the wrong data type under these variables can cause the entire program to break down.

When writing a command for taking input or initialising the values for the variables, double-check the originally initialised data type for it. If the function is an array or tuple, or dictionary, check all the individual parameters before calling them.


Syntax

While C and C++ are both similar and can be written in the same software, there are a few key differences in the syntax of the two languages. For instance, the commands for input and output in C are scanf and print; on the other hand, cin and cout are C++ commands.

Writing a C code in C++ and vice-versa often leads to syntax errors that may be correct in the other language. Always use syntax for the language in which the file/project was created.

Another important aspect of the syntax is the include files. There are specific header files to be written initially in the code to use specific functions like input-output, mathematical functions and others. The absence of header files prevents the function from being verified and used; hence the build may fail.

Also read: How to add a header file in Dev C++?

Понравилась статья? Поделить с друзьями:
  • Deus ex ошибка при запуске приложения 0xc0000142
  • Deus ex ошибка 0xc0000142 при запуске игры
  • Deus ex revision ошибка
  • Deus ex mankind divided ошибка при запуске приложения
  • Deus ex mankind divided ошибка драйвера дисплея