RetroBASIC icon indicating copy to clipboard operation
RetroBASIC copied to clipboard

Support for Visual Studio (sloppy version)

Open pansk opened this issue 1 year ago • 2 comments

This is a very sloppy version of the visual studio support. I'm linking two external libraries for support, unfortunately one needs to be patched, you'll need to move the following lines:

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>

#ifdef _MSC_VER
#pragma comment(lib, "Ws2_32.lib")
#endif

from termiWin.h to termiWin.c

then, in termiWin.h, add the declaration for HANDLE:

typedef void* HANDLE;

and lastly modify the select_serial declaration to:

int select_serial(int nfds, struct fd_set *readfds, struct fd_set *writefds, struct fd_set *exceptfds, struct timeval *timeout);

pansk avatar Dec 13 '24 23:12 pansk

I also had to add the pre-generated flex and bison sources - I couldn't find a way to simply download and run flex and bison from the visual studio solution.

pansk avatar Dec 13 '24 23:12 pansk

Hey pan, I only noticed this now when I was looking at another repo. I've done some major re-arrangement of the IO stuff since you posted this. Can you see how much effort it would be to make this patch work with the new version? It might actually be easier because some of it is more cleanly separated. I'm also thinking of moving the implementation of PRINT and INPUT to io.c, do you think that would help or hinder?

maurymarkowitz avatar Mar 25 '25 14:03 maurymarkowitz