dev c++

This is a discussion on dev c++ within the C++ Programming forums, part of the General Programming Boards category; alright first of all I know next to nothing about programming but I'm trying here. I've been writting some code ...

dev c++

alright first of all I know next to nothing about programming but I'm trying here. I've been writting some code using this graphics program called ccc_win.h and it requires me to use two other programs called ccc_msw.cpp and ccc_shap.cpp. I've made a lot of other programs and have found dev cpp the most user friendly. However, when I try to compile projects these graphic projects on it I get a bunch of linker errors. 2 questions:

To answer those questions we need to see the specific error messages and possibly even the source. Linker errors are problems that occur when Dev-C++ is trying to combine your code with the code in the standard library and other libraries that you use.

oh yes and I'm only using standard library as far as I'm concerned. Is it maybe a problem that there are already objects with the same name I'm using. Is that what your saying when you say combining with my same standard library stuff.

This means that an attempt has been made to call a function (or, possibly, access a global variable) named "DeleteObject@4" and the linker can't find it in any of the object files or libraries being linked. As you're working with C++, "DeleteObject@4" is probably the mangled name of a function being called from your code. It is a fair bet that the actual name not being resolved includes the string "DeleteObject". If your code defines this name (eg provides the body for a function named DeleteObject), then you need to ensure that the corresponding object file is included in the link stage.

You said this code builds with borland but not with dev-c++. That might mean that you are using a Borland-specific function in your code. It might also mean that there is an error in the way you have specified how the program should be built by dev-c++.

Originally Posted by da1nownlee

then there is one of these at the end:

"ld returned 1 exit status"

ld is the name of the program invoked to actually do the linking. This message is simply reporting the exit status from the linker. A non-zero exit status means an error has occurred, which you already knew from the preceding messages about undefined references.

Originally Posted by da1nownlee

and this at the very bottom:
C:\Dev-Cpp\Makefile.win [Build Error] [rectangle1.exe] Error 1

OK; a file named Makefile.win is being used (by a program named make, probably) to compile your code and link the resultant object files. This line simply means that an error has occurred building something called rectangle1.exe. The preceding reports of undefined references and the exit status from the linker are probably the cause. The reason you get told the same thing in multiple ways is that make invokes the compiler, the linker, and various other programs. In this case the linker is reporting errors and also returning an error status. make detects that error status, and tells you it failed to build.

The cause may be in your code or in the way Makefile.win tells the linker to link your program (eg what object files and libraries are linked, and in what order).