Menu

#1 Problem in Compiling In Windows

0.1.0
open
porting (1)
Support
2017-05-14
2017-05-13
Anonymous
No

Hi,

Im a graduate student ,want to do my final semester project on creating a Programmer for 8051 in Windows Enviornment.
Iam very happy to see your program working on p89pgm,but im not able to compile the program on GCC Compiler in Windows.

Please help

Regards
Twashish

C:\Users\Gayatri Shrimali\Desktop\Proj1\main.c|156|error: 'O_NONBLOCK' undeclared (first use in this function)|

Discussion

  • Nutchanon Wetchasit

    I suppose you are trying to modify p89pgm 0.1.0, right? Since line number and filename didn't match.

    All versions of p89pgm rely on few POSIX features; one of them is non-blocking I/O flag O_NONBLOCK which makes sure that the program can continuously try reading from the serial port while repeatly writing "U" to it at the same time.

    As O_NONBLOCK is a POSIX feature unavailable on Windows, not all compiler toolchain emulate it equally- or most likely, not emulate it at all. So you need to be more specific about which brand of GCC you are using before I can try to help any further. (If you're not sure, run gcc -v and post the output here).

    And while you're at it, make sure to include fcntl.h header file at the beginning of your program, just in an unlikely case that it can fix your problem.

    Regards,
    Nutchanon

    P.S. In worst case, you might need to replace all those file functions used for serial port I/O with equivalent Win32 serial port I/O functions.

     
  • Nutchanon Wetchasit

    • labels: variable not declared --> porting
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB