Experience: Something about udf_names.c(7): error C2059 when compiling udf
Phenomena:
udf_names.c(7) : error C2059: syntax error : '}' udf_names.c(8) : warning C4034: sizeof 0 Solution: delete any whitespace character adjacent to the string "DEFINE_XXXX". It should only be look like this: Code:
DEFINE_XXX(p1,p2,p3) Comment: This error costs me 4 hours... :mad: Actually I'd like to call it this error a bug which stems from the sentence below in the makefile: Code:
@sed -n "s/^DEFINE_\([_A-Z]*\)( *\([_a-zA-Z0-9]*\).*)/\{\"\2\", (void (*)())\2, UDF_TYPE_\1\},/p" $(SOURCES) >> $@ I do not understand how it works. I think it is used to extract prototype information of the macro and write it to the udf_data[] array in udf_names.c file. However it cannot identify the MACRO with adjacent whitespace. I hope someone good at makefile could make a patch on this. It must be very easy to professional coders. Reference: http://board.fluent.com/ubb/Forum2/HTML/000119.html |
Hey Cheng,
Really your information was very helpful. It worked out !!! Thanks |
Very good advice, thank you very much. I had written DEFINE_PROFILE (T, thread, position) instead DEFINE_PROFILE(T, thread, position)
|
Indeed a very good advice. Really appreciate such posts from people in such forums. Thank you.
|
[QUOTE=chengdi;298107]
Actually I'd like to call it this error a bug which stems from the sentence below in the makefile: Code:
@sed -n "s/^DEFINE_\([_A-Z]*\)( *\([_a-zA-Z0-9]*\).*)/\{\"\2\", (void (*)())\2, UDF_TYPE_\1\},/p" $(SOURCES) >> $@ If you want to allow any number of spaces between "DEFINE_XXX" and "(", then the "sed" command should be adapted to Code:
sed -n "s/^DEFINE_\([_A-Z]*\) *( *\([_a-zA-Z0-9]*\).*)/\{\"\2\", (void (*)())\2, UDF_TYPE_\1\},/p" |
Thank you so much for this information! It worked out fine for me!:)
|
i love you chengdi
best regards |
thanks a lot for this post!
|
Thank you so much for this information!
|
All times are GMT -4. The time now is 03:35. |