[Coco] VCC configuration discussion

Barry Nelson barry.nelson at amobiledevice.com
Sat Jul 9 00:03:52 EDT 2016

Windows builds would continue to use Visual Studio. To build and link with Wine, a Makefile for Mac or Linux would need to be created and the Linux or Mac builds would be compiled with gcc and make, but would be able to call Direct X and Windows APIs. Here is a link:

What is Winelib?
Winelib is a development toolkit which allows you to compile your Windows applications on Unix.

Most of Winelib code consists of the Win32 API implementation. Fortunately this part is 100 percent shared with Wine. The remainder consists of Windows compatible headers and tools like the resource compiler (and even these are used when compiling Wine).

Thanks to the above, Winelib supports most C and C++ source code, resource and message files, and can generate graphical or console applications as well as dynamic libraries.

What is not supported is 16-bit source code as the types it depends on (especially segmented pointers) are not supported by Unix compilers. Also missing are some of the more exotic features of Microsoft compilers like native COM support and structured exception handling. So you may need to perform some modifications in your code when recompiling your application with Winelib. This guide is here to help you in this task.

So what is needed to compile a Windows application with Winelib? Well, it really depends on the complexity of your application but here are some issues that are shared by all applications:

the case of your files may be bad. For example they could be in all caps: HELLO.C. It's not very nice to work with and probably not what you intended.
then the case of the filenames in your include statements may be wrong: maybe they include Windows.h instead of windows.h.
your include statements may use '\' instead of '/'. '\' is not recognized by Unix compilers while '/' is recognized in both environments.
you will need to perform the usual DOS to Unix text file conversion otherwise you'll get in trouble when the compiler considers that your '\' is not at the end of the line since it is followed by a pesky carriage return.
you will have to write new makefiles.
The best way to take care of all these issues is to use winemaker.

winemaker is a Perl script which is designed to help you bootstrap the conversion of your Windows projects to Winelib. In order to do this it will go analyze your code, fixing the issues listed above and generate straight Makefiles.

Let's suppose that you are already in the top directory of your sources. Then converting your project to Winelib may be as simple as just running the two commands below (note the dot indicating current directory at the end of the first command):

$ winemaker --lower-uppercase .
$ make
But of course things are not always that simple, which is why we have this guide at all.

> Bill Pierce ooogalapasooo at aol.com 
> Fri Jul 8 07:17:20 EDT 2016
> Barry, the Wine build sounds cool. I need to check into that. Do you have any links? Do you know if it can be done through Visual Studio 2015?
> VS 2015 opened up a lot of "outside" build environments that MS never supported in the past. Someone was telling me you can even run lwtools and toolshed from VS2015, but I've yet to find any info on it.
> As for the RS232, your idea sounds like building a "suedo dw4" into Vcc itself. That's not a bad idea at all. At the moment, we just want to get all "original" Coco hardware going. The bitbanger is used by a lot of existing software and opening that up to outside communication would make old software work again. Then plugins could be made for the BB.. Printers & Modems come to mind. The plugins would do what dw4 does (as far as virtual modems & printers), but more efficiently. The printer module could actuall send stuff to the host PC's printer instead of just writing to a text or graphics file.
> There's a lot of stuff that could be done, but no programmers doing it. That's the real problem. The two programmers working on Vcc have been too busy to do much so everything has come to a halt for now. With more people sharing the load, it could move forward again.

More information about the Coco mailing list