Dev c makefile ошибка

I have installed Dev-C++, but when I make a C program and run it, it gives me an error, like:

C:\Users\Ved\Dev-Cpp\Makefile.win [Build Error]  [Project1.exe] Error 1

And when I checked the log it shows the following:

Compiler: Default compiler
Building Makefile: "C:\Users\Ved\Dev-Cpp\Makefile.win"
Executing  make...
make.exe -f "C:\Users\Ved\Dev-Cpp\Makefile.win" all
gcc.exe main.o  -o "Project1.exe" -L"C:/Users/Ved/Dev-Cpp/lib"  

gcc.exe: Internal error: Aborted (program collect2)
Please submit a full bug report.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.

make.exe: *** [Project1.exe] Error 1

Execution terminated

I have used Dev-C++ on my friends computer running Windows XP SP3, and it runs fine and gives the output.

I am using Windows 8 64 bit, can I actually run Dev-C++ on 64 bit?
And can this error be fixed?

asked Jan 4, 2014 at 5:00

Ved's user avatar

3

I have used the old Dev-C++ in the past and I’ve have had it break randomly on me at times..

Bloodshed Dev-C++ hasn’t been updated for years and development has actually stopped on it.

If you really like the environment consider getting the updated and maintained Orwell Dev C++ that is improved, faster and much cleaner.

This is Solution to Solve error easily

answered Apr 12, 2021 at 11:52

Keval Savaliya's user avatar

Close All, then Go to Project options and in linker tab write the following and click ok:
-lopengl32
-lfreeglut
-lglu32
Now execute the program

answered Jan 18 at 6:14

mohsin's user avatar

Just close all the other tab in project. It will run normally

answered Apr 5, 2017 at 8:18

Ninh_ghoster's user avatar

Check if in the compiler directory there is g++.exe.
If you can see it go to:

Installing c++/g++ on Windows

and download the file full.exe then follow the instruction and put the directory in path. After that restart your pc, go to the cmd and try to compile there. If it works change the toolchain of the IDE. If you need help contact me :)

answered Aug 30, 2015 at 11:00

Chiara Coppola's user avatar

1

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-Cpp\Bin
C:\Dev-Cpp\libexec\gcc\mingw32\3.4.2

See the image below.
Compiler Options

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

C:\Dev-Cpp\Bin
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-cpp\bin\
    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-Cpp\Examples\Makefile.win [Build Error] n\make.exe: *** [main.exe] Error 1

  25. AJAY says:

    Thanks !!!! It Worked.

  26. Lx says:

    This helped. Many thanks.

  27. C:\Dev-Cpp\Bin\
    Aborted (program collect2)
    C:\Users\David\Documents\Makefile.win [Build Error] n\make.exe: *** [minimo.exe] Error 1

  28. C:\Users\David\Documents\Makefile.win [Build Error] n\make.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] n\make.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

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:\proj1\Makefile.win [Build Error]  [main.o] Error 1 

This is the compiler log :

Compiler: Default compiler
Building Makefile: "E:\proj1\Makefile.win"
Executing  make...
make.exe -f "E:\WorkSpace\POINTMAN CARD PRINTER\Cds\New folder\Makefile.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:\Users\r' 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:\Users\r anything\myproject might be bad location because of the space in it.

answered Jul 25, 2012 at 12:55

Davs's user avatar

DavsDavs

4894 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


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 for Ancient Dragon


Ancient Dragon

5,243



Achieved Level 70



Team Colleague



Featured Poster



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

Member Avatar for Dave Sinkula


Is C:\Dev-Cpp\bin in your path?

C:\Test\GnuC>path
PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C;\icc\bin;C:\Dev-Cpp\bin;C:\BC5\BIN;C:\watcom\BINNT;C:\watcom\BINW;c:\Perl\bin;C:\Program Files\ActiveState Komodo 3.1\;C:\Program Files\Common Files\GTK\2.0\bin;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\Autodesk\DWG TrueView\;..\tool;C:\Program Files\doxygen\bin;C:\Program Files\Subversion\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\Program Files\Microsoft Visual Studio\Common\IDE\IDE98;C:\Program Files\vslick\win;C:\NECTOOLS\BIN;..\tool;C:\COSMIC\EVAL08;c:\nectools32\bin;

Member Avatar for bops


bops

1



Posting Whiz in Training



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-Cpp\New_Project\Makefile.win [Build Error]  [main.o] Error 1 

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\New_Project\Makefile.win"
Executing  make...
make.exe -f "C:\Dev-Cpp\New_Project\Makefile.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-Cpp\bin 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:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
C:\>

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

Edited

by diafol because:

fixed formatting

Member Avatar for Dave Sinkula


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 for Ancient Dragon


Ancient Dragon

5,243



Achieved Level 70



Team Colleague



Featured Poster



>>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 for bops


bops

1



Posting Whiz in Training



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-Cpp\bin\ directory…do you have any suggestions on what i should do?

Member Avatar for Dave Sinkula


Add c:\Dev-Cpp\bin\ 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 for Ancient Dragon


Ancient Dragon

5,243



Achieved Level 70



Team Colleague



Featured Poster



Add c:\Dev-Cpp\bin\ 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 for dwks


dwks

149



Posting Whiz in Training



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 for Ancient Dragon


Ancient Dragon

5,243



Achieved Level 70



Team Colleague



Featured Poster



Member Avatar for bops


bops

1



Posting Whiz in Training



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 for bops


bops

1



Posting Whiz in Training



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

Member Avatar for Dave Sinkula


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-cpp\bin as being part of the path.

Member Avatar for bops


bops

1



Posting Whiz in Training



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-Cpp\bin; to path but the error is still the same…any mroe suggestions ?

Member Avatar for Dave Sinkula


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

Member Avatar for bops


bops

1



Posting Whiz in Training



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-Cpp\New_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 for Ooble


Have you tried compiling using the command-line?

Member Avatar for bops


bops

1



Posting Whiz in Training



yes I have tried that, it doesnt work.

Member Avatar for Dave Sinkula


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-Cpp\New_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 for kon_t


kon_t

0



Newbie Poster



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-Cpp\bin; 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 for bops


bops

1



Posting Whiz in Training



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 for Dave Sinkula


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

Member Avatar for bops


bops

1



Posting Whiz in Training



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 for bops


bops

1



Posting Whiz in Training



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 for Dave Sinkula

Member Avatar for bops


bops

1



Posting Whiz in Training



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 for bops


bops

1



Posting Whiz in Training



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 for splinterz


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-Cpp\Current_Project\Makefile.win [Build Error]  [main.o] Error 1

and this is my compile log

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Current_Project\Makefile.win"
Executing  make...
make.exe -f "C:\Dev-Cpp\Current_Project\Makefile.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-Cpp\projects\

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


cheers ;)

Member Avatar for WolfPack


WolfPack

491



Posting Virtuoso



Team Colleague



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.

Я установил Dev-С++, но когда я создаю программу на C и запускаю ее, она дает мне ошибку, например:

C:\Users\Ved\Dev-Cpp\Makefile.win [Build Error]  [Project1.exe] Error 1

И когда я проверил журнал, он показывает следующее:

Compiler: Default compiler
Building Makefile: "C:\Users\Ved\Dev-Cpp\Makefile.win"
Executing  make...
make.exe -f "C:\Users\Ved\Dev-Cpp\Makefile.win" all
gcc.exe main.o  -o "Project1.exe" -L"C:/Users/Ved/Dev-Cpp/lib"  

gcc.exe: Internal error: Aborted (program collect2)
Please submit a full bug report.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.

make.exe: *** [Project1.exe] Error 1

Execution terminated

Я использовал Dev-С++ на компьютере моих друзей под управлением Windows XP SP3, и он отлично работает и дает результат.

Я использую 64-разрядную версию Windows 8, могу ли я запустить Dev-С++ на 64-битной версии? И можно ли устранить эту ошибку?

Понравилась статья? Поделить с друзьями:

Интересное по теме:

  • Deus ex выдает ошибку
  • Deus ex revision ошибка
  • Deus ex mankind divided при запуске ошибка 0xc0000000142
  • Deus ex mankind divided ошибка драйвера дисплея
  • Deus ex human revolution ошибка сохранения

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии