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

  • C/C++
  • Thread starter trickae
  • Start date
In summary, the conversation discusses tips for using a windows based free C compiler, specifically Code::Blocks. It is recommended over Dev-C++ for its simplicity, active development, and compatibility with both Windows and Linux. Tips are provided for compiling one file or multiple files using the "compile" menu and project options. Other free options such as PellesC and LCC are also mentioned. Finally, a question is raised about compiling multiple files with a Makefile included in the project.
  • #1
trickae
83
0
Any tips on using this windows based free C compiler?
Like how to compile one file, multiple files.
 
Technology news on Phys.org
  • #2
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.
 
  • #3
...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:
  • #4
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:
  • #5
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:

1. How do we use bloodshed C/C++ for programming?

Bloodshed C/C++ is a popular programming language used for developing applications, games, and other software. To use it, you will need to have a compiler installed on your computer. You can then write your code in a text editor and save it with the .c or .cpp extension. Once you have written your code, you can compile it using the compiler and run the resulting executable file.

2. Can I use bloodshed C/C++ for web development?

Yes, bloodshed C/C++ can be used for web development. However, it is not commonly used for this purpose as there are other languages and frameworks that are more suited for web development, such as HTML, CSS, JavaScript, and PHP. Additionally, C/C++ is a low-level language and may not have the necessary features for efficient web development.

3. Is bloodshed C/C++ difficult to learn?

Learning any programming language can be challenging, but with dedication and practice, bloodshed C/C++ can be mastered. It is a powerful language with a steep learning curve, but it is widely used in various industries and has a large community of developers who can provide support and resources for learning.

4. What are the advantages of using bloodshed C/C++?

Bloodshed C/C++ is a fast and efficient language that allows for low-level control of hardware and memory. It is also highly portable and can be used for developing applications on different platforms. Additionally, it has a large standard library and a vast community of developers, making it a versatile and powerful language for various programming needs.

5. Can I use bloodshed C/C++ for game development?

Yes, bloodshed C/C++ is commonly used for game development. Many popular games, such as Minecraft and Unreal Tournament, are written in C/C++. Its speed and efficiency make it well-suited for graphics-intensive and real-time applications. There are also many game development libraries and frameworks available for C/C++ that can make the process easier for developers.

Similar threads

  • Programming and Computer Science
Replies
0
Views
230
  • Programming and Computer Science
Replies
12
Views
2K
  • Programming and Computer Science
Replies
29
Views
2K
  • Programming and Computer Science
Replies
2
Views
364
Replies
6
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
2
Replies
65
Views
2K
  • Programming and Computer Science
Replies
1
Views
3K
Back
Top