Build error dev cpp

A C/C++ code in Dev C++ may run into compilation or build time errors and obstruct the program from being executed.

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++?

I can’t seem to find any thing on how to fix this and i have used Dev-Cpp befor but have never had this problem.I have tried re-installing Dev-Cpp and MinGW but nothing seems to work.

i:gwlibcrt2.o(.text+0x8) In function `_mingw_CRTStartup'

[Linker error] undefined reference to `__dyn_tls_init_callback' 

[Linker error] undefined reference to `__cpu_features_init' 

i:gwlibcrt2.o(.text+0x8) ld returned 1 exit status 

C:workspacecppMakefile.win [Build Error]  [Project1.exe] Error 1 

Timo Geusch's user avatar

Timo Geusch

24k5 gold badges51 silver badges70 bronze badges

asked Jun 13, 2013 at 22:24

James's user avatar

Seems like it can’t find the MinGW libraries.

Click on Tools -> Compiler Options
In the directory tab, right click Libraries and change to the MinGW lib directory. In this example, it was C:MinGWlib

This might happen if you uninstall, re-install, or upgrade MinGW.

answered Jun 13, 2013 at 22:36

austin's user avatar

austinaustin

5,7962 gold badges32 silver badges40 bronze badges

1

if you have install Migwin or cygwin in C then try to install Dev C++ on other directory with latest version. Old version on another directory will still may give you the same error.
My problem has been resolve by doing this.

answered Aug 25, 2019 at 9:38

Muhammad Kashif Arif's user avatar

I had an error similar to this in Dev-Cpp (4.9.9.2) after installing MinGW32.

[Linker error] undefined reference to `__dyn_tls_init_callback’

[Linker error] undefined reference to `__cpu_features_init’

Apparently Dev-Cpp was automatically linking to those new libraries and I just changed the name of the MinGW32 folder (default location was inside C:). This fixed the whole problem and Dev-Cpp went back to linking the correct libraries when C:MinGW32 was not accessible. Changing the Dev-Cpp compiler options library did not work in this case.

answered Aug 28, 2019 at 7:34

Sam_Carmichael's user avatar

Member Avatar

17 Years Ago

Hi again everyone, Im running into big trouble with my compiler Dev-C++, every time i compile any project, whether it is 1 im working on, or a completely fresh 1 I get the same error every single time, I have been on the bloodshed forums and IRC channel but Im not getting anywhere with it…I am interested in working with Windows Programming in C/C++ at the moment and every project I try to compile gives the same error…

C:Dev-CppCurrent_ProjectMakefile.win [Build Error]  [main.o] Error 1

and this is my compile log

Compiler: Default compiler
Building Makefile: "C:Dev-CppCurrent_ProjectMakefile.win"
Executing  make...
make.exe -f "C:Dev-CppCurrent_ProjectMakefile.win" all
g++.exe -D__DEBUG__ -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"    -pg -g3

The system cannot find the path specified.

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

Execution terminated

I have tried many times re-installing the program aswell as re-configuring it and installing with fresh configurations etc…nothing seems to work, I get the same error over and over again…anyone know why or how to overcome it ?


Recommended Answers

What is the code in main.cpp, and where is main.cpp located?

Jump to Post

Hi again…I have found out how to compile and link my program, I can only do it step by step using the command line but it works like that…however Im getting lots of error messages like these…

Main.o(.text+0x28d):Main.c: undefined reference to 'GetStockObject@4'
Main.o(.text+0x311):Main.c: undefined reference to 'GetOpenFilename@4'

Im sure …

Jump to Post

Hey i was also suffering that problem when i came upon your thread, and i found however , when out of nowhere my brain said why did this work yesterday and not today, the answer is i had started a windows project today instead of a console application and that …

Jump to Post

The only thing im concerned about there, is why are you using dos to complie when dev cpp has a very useful compilers which uses makefiles (which are a godsend in bigger projects)

ive never used g++ in cmd so im not sure what the correct syntax for it …

Jump to Post

./Borland/libxml library/lib/libxml2-bcc.lib: file not recognized: File format not recognized

that error is referring to libxml2-bcc.lib. gcc and g++ do not recognize libraries wth *.lib file extension, only *.a file extension. That library was built for a different compiler.

Jump to Post

All 45 Replies

Member Avatar


Ancient Dragon

5,243



Achieved Level 70



Team Colleague



Featured Poster


17 Years Ago

might be a dumb question — but did you check your computer to see if those -I<path> paths actually exist?

Member Avatar

17 Years Ago

Is C:Dev-Cppbin in your path?

C:TestGnuC>path
PATH=C:WINNTsystem32;C:WINNT;C:WINNTSystem32Wbem;C;iccbin;C:Dev-Cppbin;C:BC5BIN;C:watcomBINNT;C:watcomBINW;c:Perlbin;C:Program FilesActiveState Komodo 3.1;C:Program FilesCommon FilesGTK2.0bin;C:Program FilesCommon FilesAutodesk Shared;C:Program FilesAutodeskDWG TrueView;..tool;C:Program Filesdoxygenbin;C:Program FilesSubversionbin;C:Program FilesMicrosoft Visual StudioCommonToolsWinNT;C:Program FilesMicrosoft Visual StudioCommonMSDev98Bin;C:Program FilesMicrosoft Visual StudioCommonTools;C:Program FilesMicrosoft Visual StudioVC98bin;C:Program FilesMicrosoft Visual StudioCommonIDEIDE98;C:Program Filesvslickwin;C:NECTOOLSBIN;..tool;C:COSMICEVAL08;c:nectools32bin;

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

Yes I have checked all of the paths and they all exist…this even happens when I compile a project from scratch..ie…

C:Dev-CppNew_ProjectMakefile.win [Build Error]  [main.o] Error 1 

Compiler: Default compiler
Building Makefile: "C:Dev-CppNew_ProjectMakefile.win"
Executing  make...
make.exe -f "C:Dev-CppNew_ProjectMakefile.win" all
gcc.exe -c main.c -o main.o -I"C:/Dev-Cpp/include"   

The system cannot find the path specified.

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

Execution terminated

Dave what do you mean by is C:Dev-Cppbin in my path ? and what is all of that within the code box? I thought it may have come from command prompt or something like that so i tried typing…

C:>path
PATH=C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem
C:>

I dont have a clue what any of that is for, could you explain it? thanks.

Edited

10 Years Ago
by diafol because:

fixed formatting

Member Avatar

17 Years Ago

I’m asking you what I think your make utility is asking you. Does it know where to look for g++?

The stuff in the box is a copy of my result when I execute the path command in a command shell. It is telling me that the path to g++ is indeed available to my system. Yours tells you this is not so.

When you install Dev-Cpp, do you need to reboot to update the path? (It’s been so long since I’ve done this that I forget.)

Member Avatar


Ancient Dragon

5,243



Achieved Level 70



Team Colleague



Featured Poster


17 Years Ago

>>When you install Dev-Cpp, do you need to reboot to update the path?

I think it depends on which version of Windows is running. W2K/XP, definitely not. Win95/98/ME, I’m not sure either (I never used ME)

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

Oh right…Im running windows xp professional with sp1, im never prompted to reboot or anything like that, it has always worked perfect until now, im continuously getting these errors…yes g++.exe is in the c:Dev-Cppbin directory…do you have any suggestions on what i should do?

Member Avatar

17 Years Ago

Add c:Dev-Cppbin to your path. Reboot.

(But it does appear to find the make utility, which I would assume is in the same directory, so I’m reaching for straws.)

Member Avatar


Ancient Dragon

5,243



Achieved Level 70



Team Colleague



Featured Poster


17 Years Ago

Add c:Dev-Cppbin to your path. Reboot.

(But it does appear to find the make utility, which I would assume is in the same directory, so I’m reaching for straws.)

I use XP Pro too.

you might also check the length of the PATH environment variable. On my computer it’s so long that there isn’t any room left to add more. So I have a batch file to truncate the PATH to bare necessity so that I can run other command-line programs from command prompt.

Look at the end of the PATH as shown in command prompt — if the last path isn’t all there, then you probably have to same problem that I do.

Member Avatar


dwks

149



Posting Whiz in Training


17 Years Ago

you might also check the length of the PATH environment variable. On my computer it’s so long that there isn’t any room left to add more. So I have a batch file to truncate the PATH to bare necessity so that I can run other command-line programs from command prompt.

You can change this. I’ve forgotten how I did it, but I ran into the same problem. Increasing the enviroment size fixed it.

I think it’s a parameter to command.com in config.sys.

Member Avatar


Ancient Dragon

5,243



Achieved Level 70



Team Colleague



Featured Poster


17 Years Ago

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

Ah ok I will try to do that in a few moments once I find out how lol…but why isnt there lots of other .exe files (or directories) listed in path, I have many other applications installed…

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

That didnt work, but I dont think I did it correctly…how would i add that to path ?

Member Avatar

17 Years Ago

I generally right-click My Computer, and select Properties to bring up the System Properties dialog. In the Advanced tab, click the Environment Variables… button. Then find the path variable and edit it. Alternatively, I think you can add it to the autoexec.bat which should be in the root directory.

You’ll know you’ve done it correctly when you go to a command shell and type path, like you did earlier, and it now shows the d:dev-cppbin as being part of the path.

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

Thanks, I have did that, It has been added to path successfully but Dev-C++ still doesnt work. I have rebooted as soon as i added C:Dev-Cppbin; to path but the error is still the same…any mroe suggestions ?

Member Avatar

17 Years Ago

What is the code in main.cpp, and where is main.cpp located?

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

This happens every single time i try to compile any project whether it would be a template given by Dev-C++ when creating a windows application or something I have been working on…I save all the files like the source, resource, header and all the files created by the compiler in the same directory, «C:Dev-Cpp» from which I create a another directory depending on what Im creating for example «C:Dev-CppNew_Project» is where I have saved all the files of a brand new project…and here is what main.cpp contains…

#include <windows.h>

/*  Declare Windows procedure  */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

/*  Make the class name into a global variable  */
char szClassName[ ] = "WindowsApp";

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

{
    HWND hwnd;               /* This is the handle for our window */
    MSG messages;            /* Here messages to the application are saved */
    WNDCLASSEX wincl;        /* Data structure for the windowclass */

    /* The Window structure */
    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */
    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */
    wincl.cbSize = sizeof (WNDCLASSEX);

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
    wincl.lpszMenuName = NULL;                 /* No menu */
    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */
    wincl.cbWndExtra = 0;                      /* structure or the window instance */
    /* Use Windows's default color as the background of the window */
    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;

    /* Register the window class, and if it fails quit the program */
    if (!RegisterClassEx (&wincl))
        return 0;

    /* The class is registered, let's create the program*/
    hwnd = CreateWindowEx (
           0,                   /* Extended possibilites for variation */
           szClassName,         /* Classname */
           "Windows App",       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* where the window ends up on the screen */
           544,                 /* The programs width */
           375,                 /* and height in pixels */
           HWND_DESKTOP,        /* The window is a child-window to desktop */
           NULL,                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );

    /* Make the window visible on the screen */
    ShowWindow (hwnd, nFunsterStil);

    /* Run the message loop. It will run until GetMessage() returns 0 */
    while (GetMessage (&messages, NULL, 0, 0))
    {
        /* Translate virtual-key messages into character messages */
        TranslateMessage(&messages);
        /* Send message to WindowProcedure */
        DispatchMessage(&messages);
    }

    /* The program return-value is 0 - The value that PostQuitMessage() gave */
    return messages.wParam;
}


/*  This function is called by the Windows function DispatchMessage()  */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)                  /* handle the messages */
    {
        case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        default:                      /* for messages that we don't deal with */
            return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}

Member Avatar

17 Years Ago

Have you tried compiling using the command-line?

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

yes I have tried that, it doesnt work.

Member Avatar

17 Years Ago

I save all the files like the source, resource, header and all the files created by the compiler in the same directory, «C:Dev-Cpp» from which I create a another directory depending on what Im creating for example «C:Dev-CppNew_Project» is where I have saved all the files of a brand new project…and here is what main.cpp contains…

So you’re saying that you are saving main.cpp in the compiler’s home directory «C:Dev-Cpp»? First, that a practice I generally avoid. Though I doubt it’s the problem here.

It looks to me that the make utility is not finding the source file. Could you post your makefile and .dev file? And state which directory these are in? And am I correct in understanding that you have main.cpp saved in «C:Dev-Cpp»?

Member Avatar


kon_t

0



Newbie Poster


17 Years Ago

Thanks, I have did that, It has been added to path successfully but Dev-C++ still doesnt work. I have rebooted as soon as i added C:Dev-Cppbin; to path but the error is still the same…any mroe suggestions ?

you definitely have a config problem. Your path is wrong &/or dev c++ isnt installed correctly.

some of the following has already been suggested, but ill put it here for completeness anyway.

1st start up a cmd prompt box (click on start, then run & then type ‘cmd’ in the text box).

from the cmd prompt box:

You can test the path setting by just typing ‘g++’. If the path is correct you will see something like:

g++: no input files

you can also try typing ‘make’, which should produce:

make: *** No targets specified and no makefile found. Stop.

If neither work, your path setting is definitely wrong.
If one works & not the other, you have a mixed up configuration.

You can try searching for «g++» and make sure that the folder that it is actually in is alos the folder in the path setting.

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

I have carried out both of those commands in command prompt, and they both produced what expected…

To keep things simple I will attempt to make another windows project and compile it on the root («C:»), I will post the makefile(*.win) and project file(*.dev) here…..

Project file…

[Project]
FileName=Project1.dev
Name=Project1
UnitCount=1
Type=0
Ver=1
ObjFiles=
Includes=
Libs=
PrivateResource=
ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=
IsCpp=1
Icon=
ExeOutput=
ObjectOutput=
OverrideOutput=0
OverrideOutputName=
HostApplication=
Folders=
CommandLine=
UseCustomMakefile=0
CustomMakefile=
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0
CompilerSettings=

[Unit1]
FileName=main.cpp
CompileCpp=1
Folder=
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

[VersionInfo]
Major=0
Minor=1
Release=1
Build=1
LanguageID=1033
CharsetID=1252
CompanyName=
FileVersion=
FileDescription=Developed using the Dev-C++ IDE
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=
AutoIncBuildNr=0

Makefile…

# Project: Project1
# Makefile created by Dev-C++ 4.9.9.2

CPP  = g++.exe
CC   = gcc.exe
WINDRES = windres.exe
RES  = 
OBJ  = main.o $(RES)
LINKOBJ  = main.o $(RES)
LIBS =  -L"C:/Dev-Cpp/lib" -mwindows  
INCS =  -I"C:/Dev-Cpp/include" 
CXXINCS =  -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" 
BIN  = Project1.exe
CXXFLAGS = $(CXXINCS)  
CFLAGS = $(INCS)  
RM = rm -f

.PHONY: all all-before all-after clean clean-custom

all: all-before Project1.exe all-after


clean: clean-custom
	${RM} $(OBJ) $(BIN)

$(BIN): $(OBJ)
	$(CPP) $(LINKOBJ) -o "Project1.exe" $(LIBS)

main.o: main.cpp
	$(CPP) -c main.cpp -o main.o $(CXXFLAGS)

As you can see this contains only the source file, and still produces the same error.

Member Avatar

17 Years Ago

So is your main.cpp file in the same directoty as the .dev file and the make file?

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

Yes all of the files that have something to do with the project are stored in the same directory..source, resource, header, object, makefile, project, icons (this brand new project in C: only has a project file and source file and the makefile that is created..)

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

Do you have any idea about the problem or could you recommend me to try somewhere else please? I have tried on the IRC channel but the 2 people who ever replied didnt know and I did not get a solution ont he bloodshed forum…If not can you recommend any more free compilers that I could try to use?…Thanks for your help.

Member Avatar

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

Ok, thanks a lot for all of your help on this…I will try something new, I will post back if I ever solve the problem..

Member Avatar


bops

1



Posting Whiz in Training


17 Years Ago

Hi again…I have found out how to compile and link my program, I can only do it step by step using the command line but it works like that…however Im getting lots of error messages like these…

Main.o(.text+0x28d):Main.c: undefined reference to 'GetStockObject@4'
Main.o(.text+0x311):Main.c: undefined reference to 'GetOpenFilename@4'

Im sure I have had these before when actually using the IDE…but I cant remember how to correct them…do you know how ? (these functions are within libraries that require me only to include windows.h I think…which I have)

Member Avatar

17 Years Ago

Hi again everyone, Im running into big trouble with my compiler Dev-C++, every time i compile any project, whether it is 1 im working on, or a completely fresh 1 I get the same error every single time, I have been on the bloodshed forums and IRC channel but Im not getting anywhere with it…I am interested in working with Windows Programming in C/C++ at the moment and every project I try to compile gives the same error…

C:Dev-CppCurrent_ProjectMakefile.win [Build Error]  [main.o] Error 1

and this is my compile log

Compiler: Default compiler
Building Makefile: "C:Dev-CppCurrent_ProjectMakefile.win"
Executing  make...
make.exe -f "C:Dev-CppCurrent_ProjectMakefile.win" all
g++.exe -D__DEBUG__ -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"    -pg -g3

The system cannot find the path specified.

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

Execution terminated

I have tried many times re-installing the program aswell as re-configuring it and installing with fresh configurations etc…nothing seems to work, I get the same error over and over again…anyone know why or how to overcome it ?

I was getting this EXACT same error, and i fixed it by renaming my initial file from test to test.cpp (duuhh) and moving the project into a different folder Dev-Cppprojects

In my case it seems it was just the stupppid mistake of creating the new file and not renaming it properly.


cheers ;)

Member Avatar


WolfPack

491



Posting Virtuoso



Team Colleague


17 Years Ago

Hi again…I have found out how to compile and link my program, I can only do it step by step using the command line but it works like that…however Im getting lots of error messages like these…

Main.o(.text+0x28d):Main.c: undefined reference to 'GetStockObject@4'
Main.o(.text+0x311):Main.c: undefined reference to 'GetOpenFilename@4'

Im sure I have had these before when actually using the IDE…but I cant remember how to correct them…do you know how ? (these functions are within libraries that require me only to include windows.h I think…which I have)

I dont use dev-cpp, only MSVC++. Including windows.h is okay for compilation, but you should specifythe required libraries when you link them in the command prompt. For the MSVC I use something like cl main.cpp /link user32.lib gdi32.lib You would need to do something like that in dev-cpp also.


Reply to this topic

Be a part of the DaniWeb community

We’re a friendly, industry-focused community of developers, IT pros, digital marketers,
and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Say your Dev C++ is in C drive of Windows (C:Dev-Cpp)

Copy following text to Tools >> Compiler Options >> Directories >> Binaries and click OK.

C:Dev-CppBin
C:Dev-Cpplibexecgccmingw323.4.2

See the image below.
Compiler Options

Additionally add following text to Tools >> Compiler Options >> Programs before .exe

C:Dev-CppBin
Compiler Options Programs Settings

Please let me know if this has been helpful to you or not.

This entry was posted in Computers, Programming, Technical and tagged Dev C++, Dev C++ compile, Dev C++ compile error, Dev C++ compile error windows vista, Dev C++ compile errors vista, Dev C++ compile errors windows vista, dev c++ makefile build error, Dev C++ Makefile.win, Dev C++ Makefile.win [Build Error] [main.o] Error 1, Dev-C++ [Build Error] Error 1 vista, Dev-C++ [Build Error] Error 1 windows vista, Dev-C++: Error 1, Makefile.win, Makefile.win [Build Error] Error 1, Makefile.win [Build Error] Error 1 vista, Makefile.win [Build Error] Error 1 windows vista, Makefile.win [Build Error] [main.o] Error 1, vista, windows, windows vista, [Build Error] [main.o] Error 1. Bookmark the permalink.

37 Responses to Dev C++ Makefile.win [Build Error] [main.o] Error 1

  1. one says:

    didn’t work 😦
    bye

    • Tina Mishra says:

      didn’t work. why?

  2. one says:

    I had to add:
    c:dev-cppbin
    to the .exe files in the programs tab, Vista didn’t do it correctly. now it works fine =D

  3. Anonymous says:

    Yes, it works for me gr8. I have problem with files, but WITH this tutorial its ok

  4. Anonymous says:

    yes…it solved my problem…
    Thnx..

  5. Praveen says:

    thanks it work mee for 2 times

  6. rst says:

    it works, thanks

  7. THANKS!! says:

    it works, thank you!!

  8. hasan says:

    It works for me. Thanks very much, I was really suffering with this stuff..

  9. k says:

    It works, thanks so much!

  10. roque says:

    si funciono te comento que en el make lo coloque tal y como lo dejaste (quitando los espacios 😀 ) pero al final lo cambio y lo dejo así

    mingw32-make

    problema resuelto gracias

  11. nik says:

    thanks it really helped

  12. Anonymous says:

    it works tnx :)))))

  13. Enzo Roiz says:

    It works ! Thank you 😉

  14. h says:

    did not work

  15. voodoochild says:

    worked!! Thanks a lot.

  16. Marcinkonys says:

    This helped, THANKS!

  17. It worked!!!! Many thanks..

  18. These steps work great. I think that these steps are best for Windows Vista Users.

  19. Curran says:

    did not work for me. I’m still getting the same error

  20. Nikunj says:

    I install dev c++ 4.9.9.2 and write normal program to cout hello world but error come like “no project compile”

    • NN says:

      first you have to compile the source file which is the .dev file

  21. Pingback: Fix Linker Error In Dev C Windows XP, Vista, 7, 8 [Solved]

  22. Thallys says:

    Thanks’

  23. rizwan says:

    did not work with windows 8.1

  24. Laura says:

    It didn’t worked, now I have following problem…:(
    Aborted (program collect2)
    C:Dev-CppExamplesMakefile.win [Build Error] nmake.exe: *** [main.exe] Error 1

  25. AJAY says:

    Thanks !!!! It Worked.

  26. Lx says:

    This helped. Many thanks.

  27. C:Dev-CppBin
    Aborted (program collect2)
    C:UsersDavidDocumentsMakefile.win [Build Error] nmake.exe: *** [minimo.exe] Error 1

  28. C:UsersDavidDocumentsMakefile.win [Build Error] nmake.exe: *** [minimo.exe] Error 1

  29. khadidja says:

    thank you, it’s helpfull, my code works now 🙂

  30. swathi says:

    Did not work

  31. Julian says:

    No me resulto 😦 ahora el error es otro:
    ….Makefile.win [Build Error] nmake.exe: *** [prueba.exe] Error 1
    Ahora voy a tratar de solucionar este

  32. Karina says:

    Auxlio por favor, ya quiero llorar, porque no logro complar en dev c++ 4.9.9.2. tena 5.11 pero me marcaba que no estaba una carpeta, luego tuve problemas con la libreria allegro y en fin, regrese a esa version, nstalé allegro pero resulta que no me deja compilar. Ya puse lo que explicaste pero me sigue marcando un errro que dice makefile.wn error 1073741819 y ya no se que mas le hace falta para funcionar, tengo mucha prisa de avanzar y no se que mas hacer. ayudaaaa

  33. Karina says:

    Encontr{e como resolver lo de makefle.wn, pero ahora me dice que no puede encontrar el archivo allegro.h cuando pongo las cabeceras, pero si est{a el archivo, todo ya lo revis{e muchas vees y nada que logro compilar.

Leave a Reply

almarc

0 / 0 / 1

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

Сообщений: 54

1

01.05.2017, 19:29. Показов 18776. Ответов 10

Метки нет (Все метки)


Код:

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
 
int main(int argc, char** argv) 
{ 
cout << "Enter num1 +-/* num2" << endl;
int x, y;
char r;
cin >> x >> r >> y;
    if (r=='+')
    {
        cout << x + y << endl;
    }
    else if (r=='-')
    {
        cout << x - y << endl;
    }
    else if (r=='/')
    {
        cout << x / y << endl;
    }
    else if (r=='*')
    {
        cout << x * y << endl;
    }
    system ("pause");
}

При попытке скомпилировать, говорит:
cannot open output file Project 4.exe: Permission denied
[Error] ld returned 1 exit status
recipe for target ‘4.exe»‘ failed

После чего открывается файл «Makefile.win», с текстом:

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Project: Project 4
# Makefile created by Dev-C++ 5.11
 
CPP      = g++.exe
CC       = gcc.exe
WINDRES  = windres.exe
OBJ      = E:/main.o
LINKOBJ  = E:/main.o
LIBS     = -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -static-libgcc -m32
INCS     = -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include"
CXXINCS  = -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++"
BIN      = "Project 4.exe"
CXXFLAGS = $(CXXINCS) -m32
CFLAGS   = $(INCS) -m32
RM       = rm.exe -f
 
.PHONY: all all-before all-after clean clean-custom
 
all: all-before $(BIN) all-after
 
clean: clean-custom
    ${RM} $(OBJ) $(BIN)
 
$(BIN): $(OBJ)
    $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)
 
E:/main.o: E:/main.cpp
    $(CPP) -c E:/main.cpp -o E:/main.o $(CXXFLAGS)

При этом, строка:

$(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)

Подсвечивается красным.

Редактор: Dev-C++. В чем может быть дело? Несколько раз программа запустилась нормально, потом это.

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Programming

Эксперт

94731 / 64177 / 26122

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

Сообщений: 116,782

01.05.2017, 19:29

10

284 / 232 / 114

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

Сообщений: 584

01.05.2017, 19:50

2

у вас там от предыдущих запусков не осталось висячих процессов «Project 4.exe»? если остались — их надо прибить. может дело в том, что иде не может редактировать екзешник, потому что процесс запущен и винда залочила этот файл на изменения.



0



0 / 0 / 1

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

Сообщений: 54

01.05.2017, 20:03

 [ТС]

3

Нет, но через некоторое время файл удаляется и я снова могу его компилировать. При попытке новой компиляции снова эта ошибка на какое-то время.



0



284 / 232 / 114

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

Сообщений: 584

01.05.2017, 20:09

4

ну значит кто-то держит этот екзешник. почему и кто — хз. в момент появления ошибки бегите к файлу и попробуйте удалить. если не удаляется — значит точно кто-то держит. попробовать понять, кто его держит можно чем-нибудь типа процессмонитора https://technet.microsoft.com/… 96645.aspx. может это антивирус, может еще кто, а может процесс все-таки висит и ждет нажатия эникея судя по последней строке вашего кода.



0



0 / 0 / 1

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

Сообщений: 54

01.05.2017, 20:22

 [ТС]

5

Антивируса нет, держать ничего, кроме самого cpp, не может.
Кстати, заметил, что при закрытии консоли при первом нажатии консоль пишет время закрытия, и нужно нажать еще раз, чтобы программа закрылась. Раньше такого не было.



0



284 / 232 / 114

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

Сообщений: 584

01.05.2017, 20:26

6

ну раз «держать ничего, кроме самого cpp, не может» а файл что-то держит — остается одно: это происки дьявола. обратитесь в ближайшее отделение РПЦ за святой водой, попшикайте на клавиатуру. может поможет.



0



0 / 0 / 1

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

Сообщений: 54

01.05.2017, 20:46

 [ТС]

7

Экзорцист оказался бессилен. Боюсь, придется обратится к аккаунту с правами….. АДМИНИСТРАТОРА!
Мало ли, может у меня доступа нет, надо с админского аккаунта зайти.



0



Z1qqO

1 / 1 / 1

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

Сообщений: 32

12.01.2018, 01:31

8

Точно такая же ошибка возникает и у меня: в основном, она появляется тогда, когда, «серфируя» по интернету в поисках и изучении наличия хороших кодов и программ, я, отыскивая такой код, копирую его и вставляю в свой главного файла с функцией main. Обычно код, скопированный, в котором содержатся обычные управляющие операторы, арифметические операции и прочие начальные вещи — не конфликтует с компилятором. Но если же в коде, который я пытаюсь «скопипастить», присутствуют различного рода функции не совсем известного мне описания (код представлен ниже), то выдается такая же ошибка линковщика (компоновщика) — $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)

C++
1
2
3
4
5
6
7
8
9
10
11
POINT op;
    HWND hWnd=GetConsoleWindow();
    HDC hDC=GetDC(hWnd);
    SelectObject(hDC,GetStockObject(WHITE_PEN));   // СКОПИРОВАННЫЙ КОД
 
    MoveToEx(hDC,50,50,&op);
    LineTo(hDC,100,200);
 
    ReleaseDC(hWnd,hDC);
    std::cin.get();
    return 0;

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Project: Проект1
# Makefile created by Dev-C++ 5.11
 
CPP      = g++.exe
CC       = gcc.exe
WINDRES  = windres.exe
RES      = ../Project2/Project1_private.res
OBJ      = ../Project2/main.o ../Project2/GradeBook.o ../Project2/Account.o $(RES)
LINKOBJ  = ../Project2/main.o ../Project2/GradeBook.o ../Project2/Account.o $(RES)
LIBS     = -L"D:/Program Files/Dev-Cpp/MinGW64/lib32" -L"D:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -static-libgcc -m32
INCS     = -I"D:/Program Files/Dev-Cpp/MinGW64/include" -I"D:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include"
CXXINCS  = -I"D:/Program Files/Dev-Cpp/MinGW64/include" -I"D:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"D:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++"
BIN      = Project1.exe
CXXFLAGS = $(CXXINCS) -m32
CFLAGS   = $(INCS) -m32
RM       = rm.exe -f
 
.PHONY: all all-before all-after clean clean-custom
 
all: all-before $(BIN) all-after
 
clean: clean-custom
    ${RM} $(OBJ) $(BIN)            
 
$(BIN): $(OBJ)
    $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)
 
../Project2/main.o: main.cpp
    $(CPP) -c main.cpp -o ../Project2/main.o $(CXXFLAGS)
 
../Project2/GradeBook.o: GradeBook.cpp
    $(CPP) -c GradeBook.cpp -o ../Project2/GradeBook.o $(CXXFLAGS)
 
../Project2/Account.o: Account.cpp
    $(CPP) -c Account.cpp -o ../Project2/Account.o $(CXXFLAGS)
 
../Project2/Project1_private.res: Project1_private.rc 
    $(WINDRES) -i Project1_private.rc -F pe-i386 --input-format=rc -o ../Project2/Project1_private.res -O coff

Миниатюры

Странная ошибка makefile.win
 



0



Z1qqO

1 / 1 / 1

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

Сообщений: 32

12.01.2018, 01:32

9

Точно такая же ошибка возникает и у меня: в основном, она появляется тогда, когда, «серфируя» по интернету в поисках и изучении наличия хороших кодов и программ, я, отыскивая такой код, копирую его и вставляю в свой главного файла с функцией main. Обычно код, скопированный, в котором содержатся обычные управляющие операторы, арифметические операции и прочие начальные вещи — не конфликтует с компилятором. Но если же в коде, который я пытаюсь «скопипастить», присутствуют различного рода функции не совсем известного мне описания (код представлен ниже), то выдается такая же ошибка линковщика (компоновщика) — $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)

C++
1
2
3
4
5
6
7
8
9
10
11
POINT op;
    HWND hWnd=GetConsoleWindow();
    HDC hDC=GetDC(hWnd);
    SelectObject(hDC,GetStockObject(WHITE_PEN));   // СКОПИРОВАННЫЙ КОД
 
    MoveToEx(hDC,50,50,&op);
    LineTo(hDC,100,200);
 
    ReleaseDC(hWnd,hDC);
    std::cin.get();
    return 0;

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Project: Проект1
# Makefile created by Dev-C++ 5.11
 
CPP      = g++.exe
CC       = gcc.exe
WINDRES  = windres.exe
RES      = ../Project2/Project1_private.res
OBJ      = ../Project2/main.o ../Project2/GradeBook.o ../Project2/Account.o $(RES)
LINKOBJ  = ../Project2/main.o ../Project2/GradeBook.o ../Project2/Account.o $(RES)
LIBS     = -L"D:/Program Files/Dev-Cpp/MinGW64/lib32" -L"D:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -static-libgcc -m32
INCS     = -I"D:/Program Files/Dev-Cpp/MinGW64/include" -I"D:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include"
CXXINCS  = -I"D:/Program Files/Dev-Cpp/MinGW64/include" -I"D:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"D:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++"
BIN      = Project1.exe
CXXFLAGS = $(CXXINCS) -m32
CFLAGS   = $(INCS) -m32
RM       = rm.exe -f
 
.PHONY: all all-before all-after clean clean-custom
 
all: all-before $(BIN) all-after
 
clean: clean-custom
    ${RM} $(OBJ) $(BIN)                                                                       // КОД ЛИНКОВЩИКА ПОСЛЕ КОМПИЛЯЦИИ
 
$(BIN): $(OBJ)
    $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)
 
../Project2/main.o: main.cpp
    $(CPP) -c main.cpp -o ../Project2/main.o $(CXXFLAGS)
 
../Project2/GradeBook.o: GradeBook.cpp
    $(CPP) -c GradeBook.cpp -o ../Project2/GradeBook.o $(CXXFLAGS)
 
../Project2/Account.o: Account.cpp
    $(CPP) -c Account.cpp -o ../Project2/Account.o $(CXXFLAGS)
 
../Project2/Project1_private.res: Project1_private.rc 
    $(WINDRES) -i Project1_private.rc -F pe-i386 --input-format=rc -o ../Project2/Project1_private.res -O coff



0



6 / 3 / 0

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

Сообщений: 145

14.06.2019, 19:06

10

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

Кстати, заметил, что при закрытии консоли при первом нажатии консоль пишет время закрытия, и нужно нажать еще раз, чтобы программа закрылась. Раньше такого не было.

В Dev-C++ откомпилированный код открывается не просто так, а через ConsolePauser.exe. Он сначала выполняет программу, а после её завершения выводит время выполнения и возвращённое значение и ждёт нажатия любой клавиши.
В общем, скорее всего в настройках что-то поменяли.

Миниатюры

Странная ошибка makefile.win
 

Странная ошибка makefile.win
 



0



6 / 3 / 0

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

Сообщений: 145

15.06.2019, 13:18

11

Чтобы отключить эту функцию, перейди на Сервис -> Параметры среды и убери галочку с Pause console programs after return

Миниатюры

Странная ошибка makefile.win
 

Изображения

 



0



Содержание

  1. Dev cpp compiler error
  2. Dev-C++ — [Build Error] [main.o] Error 1
  3. All 45 Replies

Dev cpp compiler error

1) На Раздел распространяются все Правила Форума.
2) Перед тем, как создать новый топик, убедитесь, что Вы читали Правила создания тем в Разделе.
3) Вопросы, не связанные с программированием (настройки MS Visual Studio, книги, библиотеки и т.д.),
обсуждаются в разделе C/C++: Прочее
4) Вопросы разработки .NET (Windows Form, C++/CLI и т.п.) приложений на Visual C++/C# обсуждаются в разделе .NET.
5) Нарушение Правил может повлечь наказание со стороны модераторов.

Полезные ссылки:
FAQ Раздела Обновления для FAQ Раздела Поиск по Разделу MSDN Library Online

Dev-C++ Совершенно не хочет компилить никакие проекты.
При попытке откомпилить проект(msdos app) оно грит:
Compiler: Default compiler
Building Makefile: «F:Program FilesDev-CppProjectsDOSMakefile.win»
Executing make.
make.exe -f «F:Program FilesDev-CppProjectsDOSMakefile.win» all
g++.exe -c main.cpp -o main.o -I»F:/Program Files/Dev-Cpp/include/c++» -I»F:/Program Files/Dev-Cpp/include/c++/mingw32″ -I»F:/Program Files/Dev-Cpp/include/c++/backward» -I»F:/Program Files/Dev-Cpp/include»

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

и так всегда

Вроде бы все настроил, все фолдеры указал, а он все равно упирается. Мож где че позабыл?

версия — Dev-C++ 4.9.8.0.
проект создавал через file->new->project->winapp

/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

/* Make the class name into a global variable */
char szClassName[ ] = «WindowsApp»;

int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil)

<
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application are saved */
WNDCLASSEX wincl; /* Data structure for the windowclass */

/* The Window structure */
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
wincl.style = CS_DBLCLKS; /* Catch double-clicks */
wincl.cbSize = sizeof (WNDCLASSEX);

/* Use default icon and mouse-pointer */
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
wincl.lpszMenuName = NULL; /* No menu */
wincl.cbClsExtra = 0; /* No extra bytes after the window class */
wincl.cbWndExtra = 0; /* structure or the window instance */
/* Use Windows’s default color as the background of the window */
wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;

/* Register the window class, and if it fails quit the program */
if (!RegisterClassEx (&wincl))
return 0;

/* The class is registered, let’s create the program*/
hwnd = CreateWindowEx (
0, /* Extended possibilites for variation */
szClassName, /* Classname */
«Windows App», /* Title Text */
WS_OVERLAPPEDWINDOW, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
544, /* The programs width */
375, /* and height in pixels */
HWND_DESKTOP, /* The window is a child-window to desktop */
NULL, /* No menu */
hThisInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);

/* Make the window visible on the screen */
ShowWindow (hwnd, nFunsterStil);

/* The program return-value is 0 — The value that PostQuitMessage() gave */
return messages.wParam;
>

/* This function is called by the Windows function DispatchMessage() */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
<
switch (message) /* handle the messages */
<
case WM_DESTROY:
PostQuitMessage (0); /* send a WM_QUIT to the message queue */
break;
default: /* for messages that we don’t deal with */
return DefWindowProc (hwnd, message, wParam, lParam);
>

Источник

Dev-C++ — [Build Error] [main.o] Error 1

Hi again everyone, Im running into big trouble with my compiler Dev-C++, every time i compile any project, whether it is 1 im working on, or a completely fresh 1 I get the same error every single time, I have been on the bloodshed forums and IRC channel but Im not getting anywhere with it. I am interested in working with Windows Programming in C/C++ at the moment and every project I try to compile gives the same error.

and this is my compile log

I have tried many times re-installing the program aswell as re-configuring it and installing with fresh configurations etc. nothing seems to work, I get the same error over and over again. anyone know why or how to overcome it ?

    21 Contributors 45 Replies 21K Views 8 Years Discussion Span Latest Post 8 Years Ago Latest Post by muhammad raees

What is the code in main.cpp, and where is main.cpp located?

Hi again. I have found out how to compile and link my program, I can only do it step by step using the command line but it works like that. however Im getting lots of error messages like these.

Hey i was also suffering that problem when i came upon your thread, and i found however , when out of nowhere my brain said why did this work yesterday and not today, the answer is i had started a windows project today instead of a console application and that …

The only thing im concerned about there, is why are you using dos to complie when dev cpp has a very useful compilers which uses makefiles (which are a godsend in bigger projects)

ive never used g++ in cmd so im not sure what the correct syntax for it …

./Borland/libxml library/lib/libxml2-bcc.lib: file not recognized: File format not recognized

that error is referring to libxml2-bcc.lib. gcc and g++ do not recognize libraries wth *.lib file extension, only *.a file extension. That library was built for a different compiler.

might be a dumb question — but did you check your computer to see if those -I

paths actually exist?

Is C:Dev-Cppbin in your path?

C:TestGnuC>path
PATH=C:WINNTsystem32;C:WINNT;C:WINNTSystem32Wbem;C;iccbin;C:Dev-Cppbin;C:BC5BIN;C:watcomBINNT;C:watcomBINW;c:Perlbin;C:Program FilesActiveState Komodo 3.1;C:Program FilesCommon FilesGTK2.0bin;C:Program FilesCommon FilesAutodesk Shared;C:Program FilesAutodeskDWG TrueView;..tool;C:Program Filesdoxygenbin;C:Program FilesSubversionbin;C:Program FilesMicrosoft Visual StudioCommonToolsWinNT;C:Program FilesMicrosoft Visual StudioCommonMSDev98Bin;C:Program FilesMicrosoft Visual StudioCommonTools;C:Program FilesMicrosoft Visual StudioVC98bin;C:Program FilesMicrosoft Visual StudioCommonIDEIDE98;C:Program Filesvslickwin;C:NECTOOLSBIN;..tool;C:COSMICEVAL08;c:nectools32bin;

Yes I have checked all of the paths and they all exist. this even happens when I compile a project from scratch..ie.

Dave what do you mean by is C:Dev-Cppbin in my path ? and what is all of that within the code box? I thought it may have come from command prompt or something like that so i tried typing.

I dont have a clue what any of that is for, could you explain it? thanks.

I’m asking you what I think your make utility is asking you. Does it know where to look for g++?

The stuff in the box is a copy of my result when I execute the path command in a command shell. It is telling me that the path to g++ is indeed available to my system. Yours tells you this is not so.

When you install Dev-Cpp, do you need to reboot to update the path? (It’s been so long since I’ve done this that I forget.)

>>When you install Dev-Cpp, do you need to reboot to update the path?

I think it depends on which version of Windows is running. W2K/XP, definitely not. Win95/98/ME, I’m not sure either (I never used ME)

Oh right. Im running windows xp professional with sp1, im never prompted to reboot or anything like that, it has always worked perfect until now, im continuously getting these errors. yes g++.exe is in the c:Dev-Cppbin directory. do you have any suggestions on what i should do?

Add c:Dev-Cppbin to your path. Reboot.

(But it does appear to find the make utility, which I would assume is in the same directory, so I’m reaching for straws.)

Add c:Dev-Cppbin to your path. Reboot.

(But it does appear to find the make utility, which I would assume is in the same directory, so I’m reaching for straws.)

I use XP Pro too.

you might also check the length of the PATH environment variable. On my computer it’s so long that there isn’t any room left to add more. So I have a batch file to truncate the PATH to bare necessity so that I can run other command-line programs from command prompt.

Look at the end of the PATH as shown in command prompt — if the last path isn’t all there, then you probably have to same problem that I do.

you might also check the length of the PATH environment variable. On my computer it’s so long that there isn’t any room left to add more. So I have a batch file to truncate the PATH to bare necessity so that I can run other command-line programs from command prompt.

You can change this. I’ve forgotten how I did it, but I ran into the same problem. Increasing the enviroment size fixed it.

I think it’s a parameter to command.com in config.sys.

this is probably not relivent to this thread — but here is what I found in MSDN for environment variables

• The maximum individual environment variable size is 8192bytes.

• The maximum total environment variable size for all variables, which includes variable
names and the equal sign, is 65,536KB.

Ah ok I will try to do that in a few moments once I find out how lol. but why isnt there lots of other .exe files (or directories) listed in path, I have many other applications installed.

That didnt work, but I dont think I did it correctly. how would i add that to path ?

I generally right-click My Computer, and select Properties to bring up the System Properties dialog. In the Advanced tab, click the Environment Variables. button. Then find the path variable and edit it. Alternatively, I think you can add it to the autoexec.bat which should be in the root directory.

You’ll know you’ve done it correctly when you go to a command shell and type path, like you did earlier, and it now shows the d:dev-cppbin as being part of the path.

Thanks, I have did that, It has been added to path successfully but Dev-C++ still doesnt work. I have rebooted as soon as i added C:Dev-Cppbin; to path but the error is still the same. any mroe suggestions ?

What is the code in main.cpp, and where is main.cpp located?

This happens every single time i try to compile any project whether it would be a template given by Dev-C++ when creating a windows application or something I have been working on. I save all the files like the source, resource, header and all the files created by the compiler in the same directory, «C:Dev-Cpp» from which I create a another directory depending on what Im creating for example «C:Dev-CppNew_Project» is where I have saved all the files of a brand new project. and here is what main.cpp contains.

Have you tried compiling using the command-line?

yes I have tried that, it doesnt work.

I save all the files like the source, resource, header and all the files created by the compiler in the same directory, «C:Dev-Cpp» from which I create a another directory depending on what Im creating for example «C:Dev-CppNew_Project» is where I have saved all the files of a brand new project. and here is what main.cpp contains.

So you’re saying that you are saving main.cpp in the compiler’s home directory «C:Dev-Cpp»? First, that a practice I generally avoid. Though I doubt it’s the problem here.

It looks to me that the make utility is not finding the source file. Could you post your makefile and .dev file? And state which directory these are in? And am I correct in understanding that you have main.cpp saved in «C:Dev-Cpp»?

Thanks, I have did that, It has been added to path successfully but Dev-C++ still doesnt work. I have rebooted as soon as i added C:Dev-Cppbin; to path but the error is still the same. any mroe suggestions ?

you definitely have a config problem. Your path is wrong &/or dev c++ isnt installed correctly.

some of the following has already been suggested, but ill put it here for completeness anyway.

1st start up a cmd prompt box (click on start, then run & then type ‘cmd’ in the text box).

from the cmd prompt box:

You can test the path setting by just typing ‘g++’. If the path is correct you will see something like:

g++: no input files

you can also try typing ‘make’, which should produce:

make: *** No targets specified and no makefile found. Stop.

If neither work, your path setting is definitely wrong.
If one works & not the other, you have a mixed up configuration.

You can try searching for «g++» and make sure that the folder that it is actually in is alos the folder in the path setting.

I have carried out both of those commands in command prompt, and they both produced what expected.

To keep things simple I will attempt to make another windows project and compile it on the root («C:»), I will post the makefile(*.win) and project file(*.dev) here.

As you can see this contains only the source file, and still produces the same error.

So is your main.cpp file in the same directoty as the .dev file and the make file?

Yes all of the files that have something to do with the project are stored in the same directory..source, resource, header, object, makefile, project, icons (this brand new project in C: only has a project file and source file and the makefile that is created..)

Do you have any idea about the problem or could you recommend me to try somewhere else please? I have tried on the IRC channel but the 2 people who ever replied didnt know and I did not get a solution ont he bloodshed forum. If not can you recommend any more free compilers that I could try to use. Thanks for your help.

I think I’ve exhausted my attempts. I don’t understand what the issue is.

Ok, thanks a lot for all of your help on this. I will try something new, I will post back if I ever solve the problem..

Hi again. I have found out how to compile and link my program, I can only do it step by step using the command line but it works like that. however Im getting lots of error messages like these.

Im sure I have had these before when actually using the IDE. but I cant remember how to correct them. do you know how ? (these functions are within libraries that require me only to include windows.h I think. which I have)

Hi again everyone, Im running into big trouble with my compiler Dev-C++, every time i compile any project, whether it is 1 im working on, or a completely fresh 1 I get the same error every single time, I have been on the bloodshed forums and IRC channel but Im not getting anywhere with it. I am interested in working with Windows Programming in C/C++ at the moment and every project I try to compile gives the same error.

and this is my compile log

I have tried many times re-installing the program aswell as re-configuring it and installing with fresh configurations etc. nothing seems to work, I get the same error over and over again. anyone know why or how to overcome it ?

I was getting this EXACT same error, and i fixed it by renaming my initial file from test to test.cpp (duuhh) and moving the project into a different folder Dev-Cppprojects

In my case it seems it was just the stupppid mistake of creating the new file and not renaming it properly.

Hi again. I have found out how to compile and link my program, I can only do it step by step using the command line but it works like that. however Im getting lots of error messages like these.

Im sure I have had these before when actually using the IDE. but I cant remember how to correct them. do you know how ? (these functions are within libraries that require me only to include windows.h I think. which I have)

I dont use dev-cpp, only MSVC++. Including windows.h is okay for compilation, but you should specifythe required libraries when you link them in the command prompt. For the MSVC I use something like cl main.cpp /link user32.lib gdi32.lib You would need to do something like that in dev-cpp also.

We’re a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Reach out to all the awesome people in our software development community by starting your own topic. We equally welcome both specific questions as well as open-ended discussions.

Источник

>
Dev-C++ — не хочет компилять

  • Подписаться на тему
  • Сообщить другу
  • Скачать/распечатать тему



Сообщ.
#1

,
08.06.03, 16:06

    Full Member

    ***

    Рейтинг (т): 2

    Dev-C++ Совершенно не хочет компилить никакие проекты.
    При попытке откомпилить проект(msdos app) оно грит:
    Compiler: Default compiler
    Building Makefile: «F:Program FilesDev-CppProjectsDOSMakefile.win»
    Executing  make…
    make.exe -f «F:Program FilesDev-CppProjectsDOSMakefile.win» all
    g++.exe -c main.cpp -o main.o -I»F:/Program Files/Dev-Cpp/include/c++»  -I»F:/Program Files/Dev-Cpp/include/c++/mingw32″  -I»F:/Program Files/Dev-Cpp/include/c++/backward»  -I»F:/Program Files/Dev-Cpp/include»  

    «F:DOCUME~1Smoke» ­¥ ï¥âáï ¢­ãâ७­¥© ¨«¨ ¢­¥è­¥©
    ª®¬ ­¤®©, ¨á¯®«­ï¥¬®© ¯à®£à ¬¬®© ¨«¨ ¯ ª¥â­ë¬ ä ©«®¬.

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

    Execution terminated

    и так всегда   :(

    Вроде бы все настроил, все фолдеры указал, а он все равно упирается. Мож где че позабыл?


    nnn



    Сообщ.
    #2

    ,
    09.06.03, 04:25

      Ты бы код проекта полностью привел…
      И Dev-Cpp какой версии?


      Zmoukie



      Сообщ.
      #3

      ,
      09.06.03, 10:38

        Full Member

        ***

        Рейтинг (т): 2

        версия — Dev-C++ 4.9.8.0.
        проект создавал через file->new->project->winapp

        ExpandedWrap disabled

          <br>#include <windows.h><br><br>/*  Declare Windows procedure  */<br>LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);<br><br>/*  Make the class name into a global variable  */<br>char szClassName[ ] = «WindowsApp»;<br><br>int WINAPI WinMain (HINSTANCE hThisInstance,<br>                    HINSTANCE hPrevInstance,<br>                    LPSTR lpszArgument,<br>                    int nFunsterStil)<br><br>{<br>    HWND hwnd;               /* This is the handle for our window */<br>    MSG messages;            /* Here messages to the application are saved */<br>    WNDCLASSEX wincl;        /* Data structure for the windowclass */<br><br>    /* The Window structure */<br>    wincl.hInstance = hThisInstance;<br>    wincl.lpszClassName = szClassName;<br>    wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */<br>    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */<br>    wincl.cbSize = sizeof (WNDCLASSEX);<br><br>    /* Use default icon and mouse-pointer */<br>    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);<br>    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);<br>    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);<br>    wincl.lpszMenuName = NULL;                 /* No menu */<br>    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */<br>    wincl.cbWndExtra = 0;                      /* structure or the window instance */<br>    /* Use Windows’s default color as the background of the window */<br>    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;<br><br>    /* Register the window class, and if it fails quit the program */<br>    if (!RegisterClassEx (&wincl))<br>        return 0;<br><br>    /* The class is registered, let’s create the program*/<br>    hwnd = CreateWindowEx (<br>           0,                   /* Extended possibilites for variation */<br>           szClassName,         /* Classname */<br>           «Windows App»,       /* Title Text */<br>           WS_OVERLAPPEDWINDOW, /* default window */<br>           CW_USEDEFAULT,       /* Windows decides the position */<br>           CW_USEDEFAULT,       /* where the window ends up on the screen */<br>           544,                 /* The programs width */<br>           375,                 /* and height in pixels */<br>           HWND_DESKTOP,        /* The window is a child-window to desktop */<br>           NULL,                /* No menu */<br>           hThisInstance,       /* Program Instance handler */<br>           NULL                 /* No Window Creation data */<br>           );<br><br>    /* Make the window visible on the screen */<br>    ShowWindow (hwnd, nFunsterStil);<br><br>    /* Run the message loop. It will run until GetMessage() returns 0 */<br>    while (GetMessage (&messages, NULL, 0, 0))<br>    {<br>        /* Translate virtual-key messages into character messages */<br>        TranslateMessage(&messages);<br>        /* Send message to WindowProcedure */<br>        DispatchMessage(&messages);<br>    }<br><br>    /* The program return-value is 0 — The value that PostQuitMessage() gave */<br>    return messages.wParam;<br>}<br><br><br>/*  This function is called by the Windows function DispatchMessage()  */<br><br>LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)<br>{<br>    switch (message)                  /* handle the messages */<br>    {<br>        case WM_DESTROY:<br>            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */<br>            break;<br>        default:                      /* for messages that we don’t deal with */<br>            return DefWindowProc (hwnd, message, wParam, lParam);<br>    }<br><br>    return 0;<br>}<br>

        в закладке compiler пишет «f:dev-cppprojectsproject1makefile.win [buils error] [main.o] Error1»

        меня тревожит этот «main.o» — что это за файл и че там должно быть?
        компилер его сам не создает(хотя, по-моему должен), а если попробовать создать самому, то тада выдает другую ошибку: » F:Dev-CppProjectsProject1Makefile.win
        [Build Error]  [Project1.exe] Error 1″


        nnn



        Сообщ.
        #4

        ,
        09.06.03, 10:55

          main.o — объектный файл, генерируемый компилятором, потом он линкуется в твоем случае в экзешник…
          А у тебя в project->options->files включен файл main.cpp — ведь его текст ты и привел в топике… ???


          Zmoukie



          Сообщ.
          #5

          ,
          09.06.03, 11:25

            Full Member

            ***

            Рейтинг (т): 2

            все включено (include in compilation, include in linking).
            не представляю, в чем проблема все настройки уже раз сто облазил   :(
            а у тя с первого раза все завелось?


            Zmoukie



            Сообщ.
            #6

            ,
            09.06.03, 17:50

              Full Member

              ***

              Рейтинг (т): 2

              что самое удивительное — 4ый devcpp работает без проблем!


              nnn



              Сообщ.
              #7

              ,
              10.06.03, 04:27

                Да. без проблем…
                У тебя пути к c:dev-Cppinclude и ..lib прописаны в проекте?


                nnn



                Сообщ.
                #8

                ,
                10.06.03, 05:03

                  Могу тебе заслать готовый проект под Dev-Cpp


                  Zmoukie



                  Сообщ.
                  #9

                  ,
                  10.06.03, 10:26

                    Full Member

                    ***

                    Рейтинг (т): 2

                    Все прописал, та же фигня. четвертый работает на ура, а пятый не хочет.
                    кинь тада проект на sm0k3@mail.ru

                    Сообщение отредактировано: Smoke — 10.06.03, 10:27


                    Zmoukie



                    Сообщ.
                    #10

                    ,
                    10.06.03, 10:43

                      Full Member

                      ***

                      Рейтинг (т): 2

                      Ха! если создавать не проект, а просто отдельный цпп-файл, то все компилится! Бредятина какая-то  ??? >:(

                      Guru

                      ElcnU



                      Сообщ.
                      #11

                      ,
                      21.07.16, 15:23

                        Moderator

                        *******

                        Рейтинг (т): 823

                        !

                        уже не актуально.
                        Хватит флудить

                        0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)

                        0 пользователей:

                        • Предыдущая тема
                        • Visual C++ / MFC / WTL
                        • Следующая тема

                        [ Script execution time: 0,0361 ]   [ 16 queries used ]   [ Generated: 9.02.23, 07:59 GMT ]  

                        Hi, thanks for your help.

                        I assume you are using Dev-C++ to develop and a makefile thru Cygwin to
                        compile and run.

                        No, I only use Dev-C++. Before installation of Cygwin everything worked.
                        However I assume that during installation of Cygwin or GiNaC library something
                        happened which now causes the problems (please see my first post for a
                        description of the installation steps I performed).

                        It cannot find the library files in the linkjng phase. It should just be
                        looking just for gsl, etc. The «lib» prefix and the «.a» extension are not
                        needed, but it shouldn’t matter if you have them. But is it linking to the
                        entire path ../../../../Program Files/GnuWin32/lib/ . This will override the
                        directory link -L»C:/MinGW/lib». Also, by not being contained in quotes, it
                        will not be able to find the file.

                        I noticed your files and libraries both are prefixed with -L. One of them
                        should have a different prefix.

                        I can’t understand why everything worked before installation of cygwin, I
                        didn’t change compiler options manually (maybe during installation this
                        happened automatically?) or the project itself. The ../../../../ paths are the
                        same as before, I once added them under ProjectOptions->Parameters (i.e. not
                        contained in quotes or leaving out the prefixes). The MinGW path instead of
                        the Dev-Cpp path appears due to the following reason: I have two copies of
                        mingw32, one in MinGW and one in Dev-Cpp. This caused error messages, so I
                        had to put the path C:/MinGW/lib under compiler options -> Directories . This
                        solved the problem.

                        If you can’t figure it out post your makefile. I hope its not the usual
                        Linux style makefile.

                        Here’s the content of Makefile.win, which is automatically produced by Dev-C++
                        :

                        Project: UsingGSL

                        Makefile created by Dev-C++ 4.9.9.2

                        CPP = g++.exe
                        CC = gcc.exe
                        WINDRES = windres.exe
                        RES =
                        OBJ = GSLExample1.o $(RES)
                        LINKOBJ = GSLExample1.o $(RES)
                        LIBS = -L»C:/MinGW/lib» «../../../../Program Files/GnuWin32/lib/libgsl.a»
                        «../../../../Program Files/GnuWin32/lib/libgslcblas.a» «../../../../Program
                        Files/GnuWin32/lib/libgslcblas.dll.a»
                        INCS = -I»C:/Dev-Cpp/include» -I»C:/Program Files/GnuWin32/include»
                        CXXINCS = -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» -I»C:/Users/Martin/Desktop
                        /NumericalRecipes/NumericalRecipesThirdEditionSourceCodeCDROMv3.0/code»
                        -I»C:/Program Files/GnuWin32/include»
                        BIN = UsingGSL.exe
                        CXXFLAGS = $(CXXINCS)
                        CFLAGS = $(INCS)
                        RM = rm -f

                        .PHONY: all all-before all-after clean clean-custom

                        all: all-before UsingGSL.exe all-after

                        clean: clean-custom
                        ${RM} $(OBJ) $(BIN)

                        $(BIN): $(OBJ)
                        $(CPP) $(LINKOBJ) -o «UsingGSL.exe» $(LIBS)

                        GSLExample1.o: GSLExample1.cpp
                        $(CPP) -c GSLExample1.cpp -o GSLExample1.o $(CXXFLAGS)

                        • Forum
                        • Beginners
                        • [Build Error] [main.o] Error 1 in Dev-

                        [Build Error] [main.o] Error 1 in Dev-C++

                        Hi.

                        Most likely, this problem is not even a problem, rather something I myself have messed up.But here it goes:

                        I installed Dev-C++ 4.9.9.2 with Mingw on Windows 7(dont ask me why), and tried to compile a program that I already compiled with no problems on the computers at my university. The following Error appeared when I tried to compile it at home:

                        E:UsersBlack&YellowDesktopMakefile.win [Build Error]  [main.o] Error 1

                        this is the compile log:

                        Executing  make...
                        make.exe -f "E:UsersBlack&YellowDesktopMakefile.win" all
                        g++.exe -c main.cpp -o main.o -I"E:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Dev-Cpp/include/c++/3.4.2"  -I"E:/Dev-Cpp/include"   
                        
                        'E:UsersBLACK' 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 then tried to compile any program, and it shows the same error and compile log, even for the most basic template that appears when you make a new console application project.

                        Also, the install directory for Dev-C++ is E:Dev-Cpp, and here are the folders in E:Users directory, maybe that helps:

                        E:UsersBLACK
                        E:UsersBlack&Yellow
                        E:UsersPublic

                        I am logged in as Black&Yellow, btw, and that is where I save my projects(on the Desktop, or whatever)

                        Thanks in advance.

                        Topic archived. No new replies allowed.

                        Кажется, я не могу найти ничего о том, как это исправить, и раньше я использовал Dev-Cpp, но никогда не сталкивался с этой проблемой. Я пытался переустановить Dev-Cpp и MinGW, но, похоже, ничего не работает.

                        i:gwlibcrt2.o(.text+0x8) In function `_mingw_CRTStartup'
                        
                        [Linker error] undefined reference to `__dyn_tls_init_callback' 
                        
                        [Linker error] undefined reference to `__cpu_features_init' 
                        
                        i:gwlibcrt2.o(.text+0x8) ld returned 1 exit status 
                        
                        C:workspacecppMakefile.win [Build Error]  [Project1.exe] Error 1 
                        

                        3 ответы

                        Похоже, он не может найти библиотеки MinGW.

                        Нажмите на Tools -> Compiler Options
                        На вкладке каталога щелкните правой кнопкой мыши Libraries и перейдите в каталог MinGW lib. В этом примере, это было C:MinGWlib

                        Это может произойти, если вы удалите, переустановите или обновите MinGW.

                        Создан 13 июн.

                        если у вас есть установка Мигвин или Cygwin в C, затем попробуйте установить Dev C++ в другой каталог с последней версией. Старая версия в другом каталоге по-прежнему может выдавать ту же ошибку. Моя проблема была решена, сделав это.

                        ответ дан 25 авг.

                        У меня была похожая ошибка в Dev-Cpp (4.9.9.2) после установки MinGW32.

                        [Ошибка компоновщика] неопределенная ссылка на `__dyn_tls_init_callback’

                        [Ошибка компоновщика] неопределенная ссылка на `__cpu_features_init’

                        По-видимому, Dev-Cpp автоматически связывался с этими новыми библиотеками, и я просто изменил имя папки MinGW32 (расположение по умолчанию было внутри C:). Это решило всю проблему, и Dev-Cpp вернулся к связыванию правильных библиотек, когда C:MinGW32 был недоступен. Изменение библиотеки опций компилятора Dev-Cpp в данном случае не сработало.

                        ответ дан 28 авг.

                        Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками

                        c++
                        dev-c++

                        or задайте свой вопрос.

                        Понравилась статья? Поделить с друзьями:
                      • Build error dev c 1073741819
                      • Build error dev c 1073741674
                      • Build environment error a required application is missing and modconfig can not continue
                      • Bugsplatrc resource dll not found как исправить
                      • Bugcode usb driver windows 10 как исправить