I have found a program and tried using 'DEV C++' but it only reported an error report. I later then discovered that is was because 'DEV C++' used C++ when the code was designed for just plane C. I have searched the web and this forum but only found two relevant threads from this forum (as shown below):
http://www.daniweb.com/forums/showthread.php?t=33446&highlight=c+compiler
http://www.daniweb.com/forums/showthread.php?t=45333&highlight=c+compiler
However, this still does not answer my question. And that is where to find a FREE or cheap compiler which compiles only 'C' code and not C++.

DEV C++ compiles C or C++ just fine. What is the reported error ?

The links you posted give me a 404 page not found error.

Below is the error:
# Project: Project1
# Makefile created by Dev-C++ 4.9.8.0

CPP = g++.exe -D__DEBUG__
CC = gcc.exe -D__DEBUG__
WINDRES = windres.exe
RES = encoder7_private.res
OBJ = "D:/Program Files/Dev-Cpp/Templates/encoder.o" $(RES)
LINKOBJ = "D:/Program Files/Dev-Cpp/Templates/encoder.o" $(RES)
LIBS = -L"D:/Program Files/Dev-Cpp/lib" -mwindows
INCS = -I"D:/Program Files/Dev-Cpp/include"
CXXINCS = -I"D:/Program Files/Dev-Cpp/include/c++" -I"D:/Program Files/Dev-Cpp/include/c++/mingw32" -I"D:/Program Files/Dev-Cpp/include/c++/backward" -I"D:/Program Files/Dev-Cpp/include"
BIN = encoder7.exe
CXXFLAGS = $(CXXINCS) -ansi -traditional-cpp -w -fdollar-in-identifiers -g3
CFLAGS = $(INCS) -ansi -traditional-cpp -w -fdollar-in-identifiers -g3

.PHONY: all all-before all-after clean clean-custom

all: all-before encoder7.exe all-after


clean: clean-custom
rm -f $(OBJ) $(BIN)

$(BIN): $(LINKOBJ)
$(CPP) $(LINKOBJ) -o "encoder7.exe" $(LIBS)

"D:/Program Files/Dev-Cpp/Templates/encoder.o": D:/Program\ Files/Dev-Cpp/Templates/encoder.c
$(CC) -c "D:/Program Files/Dev-Cpp/Templates/encoder.c" -o "D:/Program Files/Dev-Cpp/Templates/encoder.o" $(CFLAGS)

encoder7_private.res: encoder7_private.rc
$(WINDRES) -i encoder7_private.rc -I rc -o encoder7_private.res -O coff

------------------------------
and it says [Build Error] multiple target patterns. And for the links above (which I have just checked, the way to get to the is be searching this forum for 'c compiler' (in threads) and they are in the first 3 pages.

One of the things that Dev C++ gets mixed up with is when you use a code like:
#include "../encoder.h"
It gets mixed up with the .h

Ok I'm not too sure. But this might have something to do with dependancy. Is there more than 1 makefile in your download?

One of Dev-C++ shortfalls is it can't compile multiple projects all at once. You have to compile them one at a time, and you have to know manually in which order to build them.

Member Avatar for iamthwee

What!? just save the file as something.c and hit the compile button. Job done.

commented: That's all it takes :) +11

The thing is, the source code did not come with a make file and I think dev C++ is having trouble making it. Below is the link to the source code (and I hope this link works).
http://www.xvid.org/Downloads.43.0.html?&tx_quickpoll_pi1[go]=savevote#c25
So now I am trying to contact technical support for this source code to see what compiler they recommend.

read the INSTALL file and it will tell you that they used VC++ 6 and NASM assembler.

2.a/ Requirements.
------------------

- MS VisualDev 6 Processor Pack 5 or MS VisualDev 7
- nasm installed as 'nasm' in the msvc binary search paths.

Well if you want a simple command line compiler then you can go for DJGPP It'll work good too.

Thanks for the compilers. I think I will be able to take it on from here. And I have found that Pelles C is a good compiler.

*Solved*

I have found a program and tried using 'DEV C++' but it only reported an error report. I later then discovered that is was because 'DEV C++' used C++ when the code was designed for just plane C. I have searched the web and this forum but only found two relevant threads from this forum (as shown below):
http://www.daniweb.com/forums/thread33446.html&highlight=c+compiler
http://www.daniweb.com/forums/thread45333.html&highlight=c+compiler
However, this still does not answer my question. And that is where to find a FREE or cheap compiler which compiles only 'C' code and not C++.

cwarn23, you might look at LLC-Win32, which is free for PERSONAL use, or try Pelles, which is totally free. I have been using LLC-Win32 to learn C, using Gookin's C for Dummies (6 books in one). However, Gookin uses the Linux C compiler and I have run into problems with the implementation of subroutines (bad word, functions or procedures in C). I intend to try to use the Pelles C Compiler. However, the LLC-Win32 does have some good documentation. Google for these or go to http://www.thefreecountry.com/
Best of luck
Kocmotex

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.