On 09/10/15 12:39, Graeme Gregory wrote:

I have replied to your pull request through github. Some some small
comments.

Ok, they are fixed now, I'll sort out another pull request.

Addressing one of your other comments on github publically here you can
use linux to generate the windows version (as I did for dilwyns page)
using the mingw compiler. You should find it packaged on most modern
linux systems. Its far easier than trying to make the code compile in
Visual Studio.

make CC=i686-w64-mingw32-gcc

Well, that opened another can of worms! It seems that under Windows getch() is deprecated and "this API cannot be used in the Windows environment" - use _getch() instead. Either that, or, they need to #include <conio.h> to avoid the following:

../qltools.c: In function ‘writefile’:
../qltools.c:1330:7: warning: implicit declaration of function ‘getch’ [-Wimplicit-function-declaration]
       OWopt = getch ();


Linux is happy enough without conio, which is just as well as it's not there in Unix anyway!

For Windows we need either the #include or just a simple int getch() forward declaration somewhere. I'm not sure what is #defined in Windows these days, so I've left that well alone for now.

Also, using the mingw compiler, it seems that now dev is flagged as unused. Sigh!

../qltools.c:1845:14: warning: unused variable ‘dev’ [-Wunused-variable]
     char *pd,dev[64];

However, as it is used within a couple of #ifdefs relating to __NT__ and __linux__ I suspect it's because I'm effectively cross compiling. It should (!) be ok on Windows itself.


Cheers,
Norm.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
27a Lidget Hill
Pudsey
West Yorkshire
United Kingdom
LS28 7LG

Company Number: 05132767
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to