How can I compile multiple files in Dev C/C++ using a Makefile?

  • Context: C/C++ 
  • Thread starter Thread starter trickae
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around compiling multiple files in Dev C/C++ using a Makefile, with participants sharing their experiences and challenges related to the compiler. The scope includes practical tips for using Dev C++, comparisons with other IDEs, and specific issues encountered during compilation.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant inquires about tips for compiling single and multiple files using Dev C++, indicating a need for guidance.
  • Another participant suggests switching to Code::Blocks, citing its simplicity, active development, and support for multiple compilers, while expressing concerns about the stagnation of Dev C++.
  • A different participant provides a link to a forum for Dev C++ users, implying that community support is available for those needing help.
  • One user mentions that it is possible to compile a single file without creating a project and suggests checking project options for compiling multiple source files.
  • A participant describes their specific issue where only the current file is being compiled, leading to errors due to undefined structures from a header file, and seeks advice on how to compile all files together.
  • The same participant questions whether having a Makefile in the project would interfere with the compilation process.

Areas of Agreement / Disagreement

Participants express differing opinions on the usability of Dev C++ versus Code::Blocks, with no consensus on the best approach for compiling multiple files. The specific compilation issue raised remains unresolved, as participants have not yet provided a solution.

Contextual Notes

The discussion highlights limitations in the clarity of project settings and compilation options within Dev C++, as well as potential confusion regarding the interaction between Makefiles and the IDE.

trickae
Messages
82
Reaction score
0
Any tips on using this windows based free C compiler?
Like how to compile one file, multiple files.
 
Technology news on Phys.org
I've used Dev-C++ for a long time but now I recommend Code::Block instead which I find simpler and more intuitive. It is also actively developped whereas Dev development seems all but abandonned from burn-out. It can use GCC as compiler, just like Dev-C++, but it can also use many others, plus it runs on both Windows and Linux. Check the web site: http://codeblocks.org/ where you will find the package along with plenty of instructions in the form of a wiki and a discussion forum where you can get help.
 
...oh, and if you need to use Dev as an academic requirement, here is their discussion forum where volunteers provide help on all related subjects: http://sourceforge.net/forum/forum.php?forum_id=48211
 
Last edited by a moderator:
You can compile one file IRC without the need to do a project, see the menu "compile", also do a project for more than one source, also check the project options and when creating the project, select the option that satisfy your needs.

PellesC and LCC are also free IRC only aplicable to C not C++, there are a page that contain some links to "free" things, is something like "the free country" or some like that, do a search, and you will find it.
 
Last edited:
Thanx guys,

As an academic requirement lol we're meant to use putty. Its just so slow when i use SSH to access it.

My problem is that i have all the files i need in one project in Dev C/c++
and I've

Code:
#include "myHeaderfn.h"

etc but when i compile it only looks at the current file.

like i had a structure definition in my header file and the C file with all the function definitions was the only file that was compiled. And i got errors saying my
struct node
was undefined. But i had definied it.

My unix command for it would be as follows
Code:
% ls 
jt.c     jtdriver.c     Makefile     jt.h
% gcc -Wall -o jt jt.c jtdriver.c

and my function definitons will be in in "jt.c" and my struct definitions and prototypes for funtions will be in "jt.h"

so where are the options i need to access to compile all these together.

Also if i have a Makefile written in the same project will that get mixed up with the entire compilation?

thanx
 
Last edited:

Similar threads

  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
6
Views
4K
Replies
14
Views
4K
Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K