I am using a macro defined in the same source file as:
#define MY_MACRO (a, b,...) (...)
The macro is used later in the file.
However, the compiler complains:
error: undeclared (first used in this function).
This is really weird .. will I miss something obvious?
I think the problem is that there is a MY_MACRO between MY_MACRO and (a, b, ...) . It should be like this:
MY_MACRO
(a, b, ...)
#define MY_MACRO(a, b,...) (...)
Remove the space between the macro name and the argument list. The space separates the head of the macro from the body, so it is considered as a macro without arguments, which expands into a list of desired arguments, followed by the desired body.
Source: https://habr.com/ru/post/977612/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/977607/what-happens-to-milliseconds-since-epoch-when-daylight-savings-time-beginsends&usg=ALkJrhju38egDPAcxrKBdY7gfNiHCSTwNQCan a gradient be applied to a shadow box? - cssEncryption Password FOSUserBundle - restWix * .msi icon and logos - windows-installerC ++ Priority queue for finding and modifying objects - c ++Jade: loading external javascript and call functions - javascriptHow to safely add the file name to the argument of the path to the Windows folder? - windowsIn Jade, how can you call a function in external Javascript - javascriptDjango Rest Framework object not repeating? - pythonFast / SpriteKit multiple collision detection? - iosAll Articles