Closed Jim-bee closed 4 years ago
The other library should not pollute the global namespace with #defines like CMD_NOP. If they used enums like this one does, this kind of error would not happen. I see you have filed a bug with the other library - you can add the fact that they should not use such #defines if you like.
Thanks for your interest in this library and for reporting the issue. I'm going to close it because it's a problem with the other library.
you can try re-arranging the order of the includes for the library headers, but I don't remember if arduino's "improvements" to header file processing will interfere with this strategy
Hi Ted,
Thank you for your reply. I try this and make your recommendation to them. Thanks again for your help.
Best Regards, Jim
On Jul 16, 2019, at 8:14 PM, Ted Yapo notifications@github.com wrote:
you can try re-arranging the order of the includes for the library headers, but I don't remember if arduino's "improvements" to header file processing will interfere with this strategy
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tedyapo/arduino-MLX90393/issues/44?email_source=notifications&email_token=AKVJBA3XGSR3N56M3WR5Y3TP7Z57PA5CNFSM4ID3B6R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2CZZIA#issuecomment-512072864, or mute the thread https://github.com/notifications/unsubscribe-auth/AKVJBAY2WBKMIENO4HNPXMTP7Z57PANCNFSM4ID3B6RQ.
it's possible to clean up the #defines a little if that style is still preferred. If you add a scoping prefix, you're unlikely to get such collisions. For instance:
#define TFT_ILI9163C_CMD_NOP 0x00//Non operation
is unlikely to collide with anything in other libraries. But, I still prefer the enums which can be scoped within the class.
Hi Ted,
Thanks I will give that a try tomorrow.
Thanks Again, Jim
On Jul 17, 2019, at 6:39 PM, Ted Yapo notifications@github.com wrote:
it's possible to clean up the #defines a little if that style is still preferred. If you add a scoping prefix, you're unlikely to get such collisions. For instance:
define TFT_ILI9163C_CMD_NOP 0x00//Non operation
is unlikely to collide with anything in other libraries. But, I still prefer the enums which can be scoped within the class.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tedyapo/arduino-MLX90393/issues/44?email_source=notifications&email_token=AKVJBA3IB436DMOL6ML2M43P763S7A5CNFSM4ID3B6R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2G7I4I#issuecomment-512619633, or mute the thread https://github.com/notifications/unsubscribe-auth/AKVJBA3DAXT2P2PVZTERWW3P763S7ANCNFSM4ID3B6RQ.
Hi, Your library works great. I do have one issue when I include sumotoy ILI9163C library there is a conflict with both libraries. Both libraries work fine on their own.
Please let me know if this can be fixed or if there is a work around.
Compile Error;
n file included from /Users/JimD/Documents/Arduino/libraries/TFT_ILI9163C-master/TFT_ILI9163C.h:135:0, from /Users/JimD/Documents/Arduino/RewinderTS/RewinderTS.ino:11: /Users/JimD/Documents/Arduino/libraries/TFT_ILI9163C-master/_settings/TFT_ILI9163C_registers.h:6:22: error: expected identifier before numeric constant
define CMD_NOP 0x00//Non operation
/Users/JimD/Documents/Arduino/libraries/arduino-MLX90393-master/MLX90393.h:38:5: note: in expansion of macro 'CMD_NOP' CMD_NOP = 0x00, ^ /Users/JimD/Documents/Arduino/libraries/TFT_ILI9163C-master/_settings/TFT_ILI9163C_registers.h:6:22: error: expected '}' before numeric constant
define CMD_NOP 0x00//Non operation
/Users/JimD/Documents/Arduino/libraries/arduino-MLX90393-master/MLX90393.h:38:5: note: in expansion of macro 'CMD_NOP' CMD_NOP = 0x00, ^ /Users/JimD/Documents/Arduino/libraries/TFT_ILI9163C-master/_settings/TFT_ILI9163C_registers.h:6:22: error: expected unqualified-id before numeric constant
define CMD_NOP 0x00//Non operation
/Users/JimD/Documents/Arduino/libraries/arduino-MLX90393-master/MLX90393.h:38:5: note: in expansion of macro 'CMD_NOP' CMD_NOP = 0x00, ^ In file included from /Users/JimD/Documents/Arduino/RewinderTS/RewinderTS.ino:14:0: /Users/JimD/Documents/Arduino/libraries/arduino-MLX90393-master/MLX90393.h:65:12: error: expected unqualified-id before ')' token MLX90393(); ^ /Users/JimD/Documents/Arduino/libraries/arduino-MLX90393-master/MLX90393.h:116:1: error: expected unqualified-id before 'private' private: ^ /Users/JimD/Documents/Arduino/libraries/arduino-MLX90393-master/MLX90393.h:138:3: error: expected unqualified-id before 'private' private: ^ /Users/JimD/Documents/Arduino/libraries/arduino-MLX90393-master/MLX90393.h:141:1: error: expected declaration before '}' token }; ^ exit status 1 Error compiling for board Adafruit Feather M0.