The function CRC16 is used before it is declared. Either move the definition of CRC16 to before main, or declare it separately prior to its use.
I notice that you are using (very) old style declarations in that code. Modern coders would write: unsigned short CRC16(unsigned char *puchMsg, unsigned short usDataLen)etcKen ----- Original Message ----- From: "Kirk Wallace" <[EMAIL PROTECTED]> To: "Enhanced Machine Controller (EMC)" <[email protected]> Sent: Tuesday, February 12, 2008 5:29 PM Subject: [Emc-users] OT: C Data Type Problem > At the risk of letting everyone know I am a C newbie. Oh ... you already > know? > > I am getting: > > [EMAIL PROTECTED]:~/emc2/Modbus$ gcc -o modbus-1c modbus-1c.c > modbus-1c.c:75: error: conflicting types for 'CRC16' > modbus-1c.c:28: error: previous implicit declaration of 'CRC16' was here > [EMAIL PROTECTED]:~/emc2/Modbus$ > > The offending code is here: > > http://www.wallacecompany.com/machine_shop/EMC2/modbus/modbus-1c.c > > I thought my call and return data types match, but some how they must > not. Sometimes when I get messages I can't explain, I find it is > because I haven't "#incude"'d something, but I played with some options > that came to mind, without any luck. Can anyone point me in the proper > direction? Thanks. > > -- > Kirk Wallace (California, USA > http://www.wallacecompany.com/machine_shop/ > Hardinge HNC lathe, > Bridgeport mill conversion, doing XY now, > Zubal lathe conversion pending) > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
