Questions tagged [djgpp]

DJGPP is a complete 32-bit C/C++ development system for Intel 80386 (and higher) PCs running DOS.

33 questions
1
vote
0 answers

How to disable "'variable' undeclared (first use in this function)" warning in RHIDE (DJGPP)

I have an old C program (which I didn't write) which worked for me before on a machine I had using DJGPP with RHIDE under DOS. The problem is, that since I've moved to a new machine, when I try and compile it, I get loads (100s) of "'variable'…
Galwegian
  • 41,475
  • 16
  • 112
  • 158
1
vote
2 answers

gcc 2.03 gives cc1.exe :"out of memory alloction" error while compilation with 32-bit windows 7 OS

I am using djgpp 2.03 version and 32-bit windows 7 OS with 3 GB RAM, but while compiling the c source code, I am getting the error "cc1.exe: out of memory allocating 65536 bytes after a total of 52828808 bytes" same source code is getting correctly…
1
vote
3 answers

Use fscanf to read two lines of integers

I want to ask something that I write in C. I use the fopen() command to open and read a text file that contains only two lines. in first line is an integer N number, and in the second line is the N integer numbers that the first line…
user4108694
0
votes
0 answers

DOS VGA mode 13h screen stays black

I'm right now programming a game for MS DOS using mode 13h of the VGA card. I'm using DJGPP as my compiler. The following problem is with my Display class. I've originally used _farpokeb() to copy my buffer (which is an array with the size of the…
Nkl29
  • 11
  • 2
0
votes
0 answers

Implementing vertical sync MS DOS C++

I'm right now developing a game for ms dos in C++ (compiler: DJGPP) and need to test if the VGA card is currently in the vertical blanking interval. Is there a memory address I can just read? How can I check for this?
Nkl29
  • 11
  • 2
0
votes
0 answers

Why when I run my application DOS shows me the SIGSEGV error?

I'm trying to make a game for MS-DOS in DOSBox with DJGPP and Allegro 4. But when I try to draw a shape or show a sprite on screen I get the SIGSEGV error. This is my code: RGB palette[256]; if (allegro_init() != 0) return 1; …
Mau_RyT0
  • 3
  • 2
0
votes
2 answers

fread error with DJGPP

While reading a binary file using DJGPP on DOS this code hangs. This happens when the fread call is made. If the call is removed then the program runs successfully. The same code runs fine through Visual C++ 2008. Has anyone experienced similar…
vivekian2
  • 3,795
  • 9
  • 35
  • 41
0
votes
0 answers

Disable/enable USB interrupts in MSDOS

I use a program for MS-DOS that reads and writes data to the parallel port and uses the hardware timer for timing. It doesn't work unless I disable USB support in the BIOS. With USB enabled, it looks like the operation of the program is interrupted…
Carmine
  • 13
  • 2
0
votes
2 answers

Recording from microphone to .wav (or other) under DJGPP

I'm hoping to programmatically record several sound files from a microphone under DOS using DJGPP. So far my research has pointed to OpenAL, but I can't find anything definite that that's the best way to go. I'm wondering if anyone here's done this…
Galwegian
  • 41,475
  • 16
  • 112
  • 158
0
votes
0 answers

Strange compilation errors when compiling C++ on DJGPP

Compiling the following code on DJGPP with GCC 6.1.0 #include int main() {} results in the following error: In file included from c:/djgpp/include/cxx/6.10/cmath:42:0, from…
Emil Laine
  • 41,598
  • 9
  • 101
  • 157
0
votes
1 answer

Keyboard handler causes segfault (djgpp)

Recently I decided, it would be funny, to code some simple MSDOS game. Needles to say, I need code for handling keyboard events. This is what I came up with for testing: int i, c = 0; for ( i = 0; i < 10; i++ ) { asm ( "mov $0x00,…
Jacajack
  • 759
  • 2
  • 11
  • 23
0
votes
1 answer

Is __MSDOS__ still defined when compiling with djgpp?

Is using __MSDOS__ enough with djgpp or should __DJGPP__ be used instead? By comparison, I know _WIN32 isn’t defined by default on cygwin (based on the assumption djgpp and cygwin have the purpose to build an Unix layer to hide real OS details). I…
user2284570
  • 2,891
  • 3
  • 26
  • 74
0
votes
2 answers

compile C program to MS-DOS environment

i have a small program that uses 32bit object file, and i wish to run it under dos operating system. now, after searching i found DJGPP. is there a way to use DJGPP to compile my program to 16Bit dos executable format? thanks in advance
bks
  • 1,886
  • 1
  • 24
  • 43
0
votes
1 answer

undefined reference to dlopen using djgpp

When I tried to compiled sqlite3 uding djgpp, it gives error undefined reference to dlopen, undefined reference to dlclose, undefined reference to dlsym etc. On Linux if we use -ldl the problem is olved. However there is no dl.a available in…
0
votes
2 answers

djgpp compiled harbour exe does not run in pure dos

I have compiled one clipper program using haarbour compiler and the c file produced was compiled using djgpp to produce final exe. This exe runs fine in console window of Windows 98. However, when I exit to msdos prompt or try to run in pure dos, it…