Questions tagged [watcom]

Open-source C/C++ and Fortran compilers for multiple 16- and 32-bit x86 target platforms.

The Watcom compiler line originated with University of Waterloo Fortran, or WATFOR, in the 1960s, widely used at universities. WATCOM was spun off into a private company and eventually the products were open-sourced.

65 questions
0
votes
0 answers

Getting a bunch of weird errors, Open Watcom C++ 2.0 with Allegro 4.2.3 library

I'm trying to compile a project written in C++ and using Allegro 4.2.3 library using Open Watcom C/C++ 2.0 compiler. The OS I'm targetting is MS-DOS. I'm getting the same errors when using CMake in CLion IDE, and when using Open Watcom IDE (compiler…
0
votes
0 answers

Does anyone know the Watcom .lib file for SOCKET.H?

I have been trying to make a dos communication program. Upon finding the header files I would need, I realized that when I tried to link #include #define FD_SETSIZE 1024 #define __NFDBITS (8 * sizeof (fd_mask)) #define…
0
votes
0 answers

Long File Name Support in Watcom Compiler

I'm using Watcom C32 Optimizing Compiler Version 11.0. I developed a sample program test.exe. This will create a file with long file name (ex: "sample file for testing.txt") and write some dummy content in it. #include int main(void) { …
Anand
  • 374
  • 2
  • 11
0
votes
1 answer

How to create DOS .com file with OpenWatcom `owcc`, but without the OpenWatcom libc?

Here is a short C file cu.c: int main(int argc, char **argv) { (void)argc; (void)argv; return 0; } When I compile it with OpenWatcom to a DOS .com file, the result is almost 3 KiB: $ owcc -bcom -mcmodel=t -fno-stack-check -Os -s -march=i86 -W…
pts
  • 80,836
  • 20
  • 110
  • 183
0
votes
1 answer

How to make the DOS .exe relocation table smaller with OpenWatcom linker?

I've created the following DOS .exe file with OpenWatcom: $ xxd prog.exe 00000000: 4d5a 8200 0100 0100 0300 4000 ffff 0500 MZ........@..... 00000010: 0204 0000 0000 0000 2000 0000 0000 0000 ........ ....... 00000020: 0100 0000 0000 0000 0000 0000…
pts
  • 80,836
  • 20
  • 110
  • 183
0
votes
1 answer

Lack of debugging information in Watcom debugger

Currently I am using Clion IDE plus latest version of Open Watcom v2 windows 32 bit compiler to develop some 16 bit MS-DOS application. The problem I have is I don't see all required debugging information when using watcom windows debugger…
BadFatRat
  • 1
  • 1
0
votes
1 answer

What does *$ mean when expanding macros in a Watcom makefile?

I have a peculiar set of makefiles in a legacy project. They are processed by the Watcom make, but they seem to have the NMAKE file format. I frequently encounter the following construct: *$(_cmd_run) $(_cmd_run) is simply a macro expansion, but in…
Malcolm
  • 41,014
  • 11
  • 68
  • 91
0
votes
1 answer

OpenWatcom / VisualStudio interoperability in re calling conventions

I would like to compile a Photoshop Filter plugin with OpenWatcom. The code already exists and works perfectly with Visual Studio. The function looks like this: extern "C" __declspec(export) void PluginMain(short selector, FilterRecordPtr pb,…
Daniel Marschall
  • 3,739
  • 2
  • 28
  • 67
0
votes
1 answer

Char buffer input more than than 256 characters

I'm creating a program on DOS using the FreeRTOS kernel which allows me to render multiple windows onto the screen that contains its own text user interface. The issue is that I've encountered an overflow error which was caused by feeding more than…
Jason Lee
  • 83
  • 1
  • 1
  • 5
0
votes
1 answer

Create an array containing structs in C

I've been working on creating my own GUI library for MS-DOS on my free time and I got stuck on how I can implement an array that would contain structures of GUI elements. So far I was able to make it draw the window itself, but I needed a way to…
Jason Lee
  • 83
  • 1
  • 1
  • 5
0
votes
0 answers

How to start a project using a Watcom compiler?

I need to evaluate a Fortran 77 code I wrote using a WATCOM compiler. Long story short, I have no other option for a compiler. It must be this one. As of now, for this project, I have to read .dat files and print what it is read in a desired…
Jxson99
  • 347
  • 2
  • 16
0
votes
0 answers

How do I mark targets for remake using Open Watcom on the command line?

I can make my Open Watcom project like so: wmake -f path/to/my/proj.mk -h -e But how do I REmake, or mark files for remake? I looked at the wmake usage and nothing seems obvious there. Does anyone know what the Open Watcom GUI does to "Mark for…
Wilbur Whateley
  • 201
  • 1
  • 11
0
votes
1 answer

Error when creating an array with memory addresses

I have matrix declaration implemented as follows: int var_porcenComun; int var_porceninv; uint32_t pointers[] = { (uint32_t)&var_porcenComun, 9999999, (uint32_t)&var_porceninv, 999999 }; Those are all global variables. This code compiles…
Renan Greinert
  • 3,376
  • 3
  • 19
  • 29
0
votes
1 answer

Compiling and linking to binary simple real mode OS in C with OpenWatcom

I have a simple (extreme simple) real mode kernel written in assembly that I am trying to port to C as much as I can. In order to do that I am using OpenWatcom compiler for 16bit binary code. In my file "os.c", if I write this line down it…
rtmc
  • 109
  • 1
  • 7
0
votes
1 answer

WriteFile in pure DOS mode?

As we know VC's WriteFile() writes data to the specified I/O device in OS(see WriteFile) I want to know if there is such an api in pure dos for this purpose ? (Using Watcom C...) Then I found _dos_write() in watcom c library reference page 197(see…
liaoo
  • 193
  • 2
  • 15