|
[Sponsors] |
Experience: Something about udf_names.c(7): error C2059 when compiling udf |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 6, 2011, 12:53 |
Experience: Something about udf_names.c(7): error C2059 when compiling udf
|
#1 |
Member
Di Cheng
Join Date: May 2010
Location: Beijing, China
Posts: 47
Rep Power: 16 |
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... 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 |
|
October 6, 2012, 07:08 |
|
#2 |
New Member
Naman
Join Date: Jul 2012
Posts: 1
Rep Power: 0 |
Hey Cheng,
Really your information was very helpful. It worked out !!! Thanks |
|
January 7, 2014, 17:07 |
|
#3 |
Senior Member
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 17 |
Very good advice, thank you very much. I had written DEFINE_PROFILE (T, thread, position) instead DEFINE_PROFILE(T, thread, position)
|
|
July 10, 2014, 13:58 |
|
#4 |
New Member
Rakesh
Join Date: Jan 2014
Location: Delft
Posts: 13
Rep Power: 12 |
Indeed a very good advice. Really appreciate such posts from people in such forums. Thank you.
|
|
July 10, 2014, 22:11 |
|
#5 |
Senior Member
|
[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" |
|
September 26, 2014, 15:32 |
|
#6 |
New Member
Mari
Join Date: Jul 2014
Posts: 2
Rep Power: 0 |
Thank you so much for this information! It worked out fine for me!
|
|
May 18, 2015, 13:35 |
|
#7 |
New Member
abed
Join Date: Dec 2014
Posts: 13
Rep Power: 12 |
i love you chengdi
best regards |
|
January 25, 2016, 10:09 |
|
#8 |
Senior Member
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 16 |
thanks a lot for this post!
__________________
best regards pblasiak |
|
September 27, 2018, 10:07 |
|
#9 |
New Member
alvin
Join Date: Aug 2018
Location: HONGKONG
Posts: 5
Rep Power: 8 |
Thank you so much for this information!
|
|
Tags |
error c2059, fluent, nmake, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
About UDF compiling issues: 'nmake' | Haoyin Shan | Fluent UDF and Scheme Programming | 15 | November 4, 2019 19:05 |
Compiling UDF on a cluster | Adya | FLUENT | 1 | December 14, 2009 12:30 |
UDF compiling problem in Flient 6.3 | jeevan kumar | FLUENT | 2 | February 25, 2009 01:43 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 08:14 |
On Compiling a UDF | David Chabot | FLUENT | 5 | May 20, 2005 10:13 |