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

  • Thread starter Thread starter trickae
  • Start date Start date
AI Thread Summary
The discussion focuses on tips for using a Windows-based free C compiler, specifically Code::Blocks, which is recommended over Dev-C++ due to its active development and user-friendly interface. Users can compile single files or multiple files by creating projects and accessing the appropriate menu options. The compiler supports various compilers, including GCC, and is available for both Windows and Linux. For those still required to use Dev-C++, a dedicated forum is available for assistance. A user encountered issues with compiling multiple files, where only the current file was being compiled, leading to undefined structure errors. They sought guidance on how to compile all files together, referencing a Unix command example for clarity. Additionally, there was a query about whether a Makefile in the project would interfere with the compilation process.
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:
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top