Unfixible error in dev-cpp

Started by
18 comments, last by Glenn1962 17 years, 10 months ago
That function is in crt1.o, as well as crt2.o, one of which should be linked automatically by the compiler, unless you somehow instructed it not to. I don't use Dev-CPP (though I do use gcc), so I don't know what the options look like.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Advertisement
ok, I linked crt1.o to the compiler and the error is gone. But now I'm getting a bunch of linker errors that say:

"Undefined reference to" etc.

how do I fix this?
------------------------------Trust me, I do this all the time.
You know, the linker does spit out those big error messages just to waste your clock cycles. It puts out that information to help you diagnose what the problem is. In other words, you have not posted enough information to allow us to figure out what you are doing wrong.
O.k. This is all the Information I can Give you. Whenever I write a program with dev-cpp (library doesn't matter) and compile it with no errors it runs perfectly. After the app is compiled I can go back into dev-cpp and edit the code. But when I click on the "Project options" button and click "ok" in the project options window (in other words, open project options and DO NOTHING TO THE PROJECT) and then I comile the code once more, I get an error that says:

[error]cannot find entry symbol WinMainCRTStartup;defaulting to 004010000

and following that error are hundreds of linker errors that say:

[Linker error]undefined reference to:

(after the colon is all of my data types and functions. That is all the information I have. Nothing more to say.Except for When I link crt1.o to the project I dont get the "winmainCRTStartup" error but I still get all the linker errors.
------------------------------Trust me, I do this all the time.
Well, there is nothing more we can do for you. Report the bug to their development team. Try reinstalling. Switch to another IDE.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Id say your installation is corrupted. A reinstall of Dev-C++ should fix it.
I third the suggestion to reinstall devc++. It will probably solve your problem in less time then anyone of us could try to brainstorm exactly what went wrong.

Barring that, have you tried to google your error message and see if anyone else has had this problem?
If reinstalling doesn't help, you can try this:

- Generate a makefile (and make sure it works by running make on the command line in the same directory - might have to mess with PATH variable to get it to recognize).

- Back up this makefile somewhere

- Do whatever you do to break it (open project options window and click ok)

- Generate makefile again

- Verify that it breaks this time when you run make

- Compare the two makefiles and report back with the diff :-)

(or... just skip the steps where you verify it works, and if it really does get generated differently, then tell us what the diffs are, and we will probably be able to tell you what's going wrong).

I'll go on google and check to see if any one else has this error. @ender7771
------------------------------Trust me, I do this all the time.
Quote:Original post by Fruny
WinMainCRTStartup is one of the possible entry points for a Windows executable -- the function that gets called at startup and then later calls your main() or WinMain() function. The linker didn't find it, so it tried a standard address instead.

The error is probably due to you not linking the appropriate libraries (e.g. the C runtime library).


Agreed. That was the first thing I thought of as well as the possibility of not including the appropriate headers in the source code.

This topic is closed to new replies.

Advertisement