How to install DJGPP - c

I am brand new to C and programming. I would like to use DJGPP as my compiler at this point. How can I install it? From what I understand it is multiple files. I cant seem to find a site that actually has the files that has working links. Thank you!
I am on Windows Vista.

His official website worked for me when I downloaded it:
http://www.delorie.com/djgpp/zip-picker.html
Choose what you want and follow the instructions.

Installing DJGPP on Vista might be a bit challenging for you now. I'd recommend that you go with native Windows C compiler, for example, Cygwin or MinGW.
If you insist on trying DJGPP, then go to the DJGPP zip picker and select options as necessary. Pick Windows 2000 or XP for an OS.
The reason why it's better to go with native Windows compiler than DOS-based one such as DJGPP is that DOS support in 2000/XP/Vista is rather buggy and limited. DJGPP developers have done heroic amount of effort to support these OSes, but some of the limitations are unfortunately unavoidable.

I've used DJGPP for some time, and I quickly switched to MinGW. IIRC DJGPP is an old 16-bit compiler and I had problems with accents or whatever. MinGW seems to be the most up to date GCC port for Windows.

Related

Dos.h + Pc.h in C and Windows Vista

I am currently looking to work with Mesa3D to create a software rendered graphic application with OpenGL.
I am looking a a few tutorials right now on how to use it, and many are written with DOS or older versions of Windows in mind. As I run Vista I don't seem to have the right files I need.
The Mesa3D tutorial I am using uses outportb() and a few other commands which I can't seem to get working. After looking around I have found you require the 2 include files:
dos.h
pc.h
These do not seem to be found within the Window's SDK that comes with Visual Studio 2010 (Express) or even the older version of 2005 (Professional) which I currently have.
They seem to be found with the DJGPP compiler that only works under DOS and is not supported in Vista, even with compatability mode. Running DosBox still does not get this to work.
I am wondering - is there perhaps a new functions replacing outportb or can I use these DJGPP files with my C/C++ complier with VS or PellesC (which I find better for C-only programs)?
In addition the conio.h include file I have with both VS and PellesC doesn't have the textmode() function, but the DJGPP version does.
If anyone could help either getting DJGPP working on Vista or allowing me to use the dos,pc and conio.h files from DJGPP with either VS or PellesC that'd be a great help!
Port-manipulating functions will simply not work in Win32 programs. Either use Win32 APIs to do I/O (rendering included) or stick to DOS and run your program in DOS or whatever DOS emulator you can find that works. Vista and later Windows won't run most DOS programs directly as the support for DOS is either severely reduced or removed altogether (e.g. in 64-bit Windows).
The low-level hardware access that functions like outportb give you is not available to programs in modern Windows environments. Such capabilities are reserved for specially-trusted code (OS internals and drivers). You need to go through higher-level APIs or drivers in order to access the same functionality.
The Mesa3D website has a readme for Windows developers that has information about what you need to install and configure. It also references some official demo code that you can use as the basis for your project. The Mesa3D website also has a repository full of demo programs that will probably serve as better examples than the out-of-date tutorials that you mentioned.
Do not use 16bit compilers on vista and higher.. instead use DOSBOX to run your programs.

ANSI C MultiPlatform Compiler and GUI

Hi guys I have an ANSI C university course.
I am looking for a compiler that will easily create
makefiles and .o files and binaries that would work on both windows and ubuntu.
all code i write must be multiplatform.
(Im a C#/C++ programmer, didn't touch C for over 10 years)
no need for any external library support except ones that are part of the spec.
I assume its C99 though might be C90
nice Dev Env GUI preferably same for both windows and ubuntu is needed as well
how to make sure I don't use none-standard libraries?
I think gcc is your best option. On Windows the best port is probably MinGW.
You edited your question to request an IDE too. Try Code::Blocks.
I will recommend Eclipse as the IDE. It has some issues on Windows, but it is great on Linux.
GCC/MinGW as compiler doesn't need much discussing.

which development software should be used for VLC on mac?

i want to do some modification and development for VLC. i download its source code, vlc-1.1.5. and it is written by C. so usually which development environment should i use, xcode or some others?
thx...
I thought VLC was developed in Qt. Do you see the class names starting with Q? In case it is developed in Qt, Qt Creator or KDevelop would be a good choice of development environment.
The VideoLAN folks provide a wiki page with information about compiling their source on multiple platforms. The page relevant to OS X is here: http://wiki.videolan.org/OSXCompile
Compiling VLC media player on Mac OS X is different from normal linux compiling and OS X compiling. We do not use Xcode, but a simple ./configure and then make isn't enough either.
The page provides a step-by-step guide to setting up a machine running either OS X 10.5 or 10.6.
Any editor of choice should suffice. Looking at the code, it seems that VLC uses Unix-style building (autotools, make, etc). On Win32, it uses MinGW, so plain old gcc and make is probably used on OSX as well.

How to make console screen (Turbo C editor) full screen in MS-windows vista

I creates program in c/c++ in turbo c . but i am facing problem is that i am not able to make it full screen in windows vista. please tell me how to do it?
Why are you still living in the Turbo era? Switch on to some better compiler.
gcc and MSVC++ Professional Edition are better ones.
On windows use IDEs like DevCpp or Code::Blocks, both support MinGw port of gcc.
I'm afraid, but you can't reliable switch to full-screen text mode anymore.
Microsoft deprecated support for full-screen text mode in the graphic drivers. It's optional now and some drivers still support it, but most manufacturers don't bother implementing a deprecated feature.
The best thing you can do is to open a real GUI window and emulate the text-mode display. Obviously this will not work with DOS programs.
Edit: If you can't life without full-screen you can always install DOSBOX. It will execute Dos programs and can emulate fullscreen for you. However, your programs will run slower because DOSBOX is basically a emulator and has it's own performance overhead.
you can also use the new Express editions of Visual C++ 2008, it has an updated C++ compiler, which you can also use when trying to create C programs/apps. If you really wanna use Turbo compilers, you can set external tools on the Visual C++ 2008 Express, using the Turbo compilers as the external tools. That way you can compile your program with both MS C++ Compiler and your Turbo Compilers...

Good IDE/compiler for simple C dll's

I'm trying to disassemble a C/C++ DLL, and have made some progress, but I would like to create my own C DLL with the same function the original exports, and compare disassemblies.
Visual Studio adds to much crap, and when I remove the crap and build my project, the expected DLL is missing.
I need a lightweight, preferably IDE, tool to edit and build very simple C libraries.
Take a look at Code::Blocks
I need a lightweight, preferably IDE, tool to edit and build very simple C libraries.
I have found that one of the best ways to do integrated C-only Win32 development is using the freely available Lcc Win32 Compiler which comes with a built-in IDE, including resource editor.
In fact, it is really very lightweight and can be run from a USB stick with some manual tweaking.
It's indeed a really small download of just 6 mb and you can even download an optional Win32 API help file which is really useful while doing development.
The compiler also comes with a C tutorial, as well as good user documentation detailing how to use the integrated Win32 resource editor "wedit", there's also an advanced manual about more complex development tasks.
Dev-C++ is a nice and fast IDE which works well with MingW.
But it's all been asked and answered before ...
MinGW adds its own crap. Install your VC express properly and save yourself a lifetime of trouble.
Btw, you don't need to use Visual Studio for its compiler or vice versa. The oddity of missing a build dll is probably because you are not looking at the right path.
If you are building C DLLs you really would benefit from its command line toolset and utilities, sdks, easy config etc. MS lock-in proprietary extensions are widely used (in context of you trying to emulate another dll), and last thing you need is chasing cross compiler issues..
GCC + any text editor such as VIM is a very light alternative.
For Windows Development, all you need is inside MinGW
Edit: If you are in dire need of an IDE you can also use the MinGW tools from Eclipse with the CDT plugin. Although it adds weight to the solution because of the installation of Eclipse, this is what I really use to build my small DLLs (JNI wrappers in my case).
You can setup your small and direct makefiles or let Eclipse do it automatically for you and concentrate only on the source files (*.h, *.c).
The best part of using this approach instead other IDE is that you do not need Eclipse to further build the DLL, since the underlying project files generated are standard ones directly usable by integrated dev inside MinGW (or any Unix distro) such as make, configure, automake, and so on.
I'll second the vote for Code::Blocks, it's what I use (despite having VS 2008 installed as well). It is very simple and lightweight but has basically all the features you'd expect out of an IDE. It comes with several predefined project templates for all kinds of C and C++ development, including templates for DLLs.
Download the version that includes MinGW and you get a complete lightweight IDE ready to start compiling. You can also easily configure it to use the Visual Studio compiler instead of gcc if you prefer.
try Open Watcom. A cross-platform product, well-supported by the community, lets you develop in DOS, Windows, OS/2 etc for a lot of platforms. Version 1.8 was released recently. Has a light-weight IDE indeed

Resources