Dev C Project Undefined Reference

Posted By admin On 02.01.21

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Click here for Dev-C 5 FAQ. /antares-autotune-4-vst-download-free.html. Last update:. When I compile my dos program and execute it, Dev-C minimizes and then restore in a second but nothing appears? The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. You're compiling this code as C but this is written using C functions/headers. In order to convert it to C, do the following changes: Change your headers: stdio.h, conio.h, stdlib.h; these are all C-style headers. Essentially all headers that end in '.h' are C-style headers. C has its own I/O library, thus making its C equivalent obsolete. Hello, i got the same problem, the reason was because i had another mingw instalations in my system. It seems that devc looks for a mingw installation each time it starts. The solution: i rename the c:mingw folder and everything start working.

You may want to investigate makefiles. Then you can use your favorite editor and still write modular code the correct way.

I just had a glance at how to write makefiles. Looks messy(will look into that later). So opened Dev C++ instead, and tried to work with projects for the first time in DevC++( used visual C++ projects bfor though). The program compiles without error but i get errors while linking, saying undefined reference to xyz. Obviously the linker is not finding the definitions of the declared functions. I did include the .cpp files containing the definitions in my project, but still getting the same errors. What should i do?

  • 11 Contributors
  • forum 12 Replies
  • 2,551 Views
  • 7 Years Discussion Span
  • commentLatest Postby Musa_JuttLatest Post

Narue5,707

>What should i do?
Post a reply to the thread that this question is concerning rather than starting a new one so that we have a clue what you're talking about. ;)

Undefined Reference In C Compiler

P: 1
I have designed a package with several files, which is listed bellow
base.cpp & base.hpp - define the template class base
tree.cpp & tree.hpp - define the class tree derived from base<int>
client.cpp & client.hpp - define the class client derived from tree
main.cpp - the main function instantiate client and run
All these files are compiled successfully, but there's a linker error ' [Linker error] undefined reference to `base<int>::base_run()' '.
However, I have defined this function in base.cpp, and all .cpp files are added to the project. I use IDE Dev-C++ 4.9.9.2. I don't know why the linker cannot find this function. When I get ride of the template, then problem solved. But I really need the class 'base' to be a template class. When I use the template but melt all these files into one file, problem also solved. But I don't like that.
I have made the program to be very small (doing nothing, only shows the problems) and attached it with this note in the file problem_example.zip.
Can anybody tell me why this happen? what's wrong with template class?
thanks a lot
Attached Files
problem_example.zip (6.7 KB, 338 views)