找回密码
 注册
查看: 2898|回复: 2

[求助] fluent编译udf,#include <windows.h>,出问题

[复制链接]
发表于 2011-8-24 20:25:42 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
fluent编译udf,其中含#include <windows.h>,在vc中编译没有问题,在fluent中编译就出问题了,如下:

已复制         1 个文件。
(system "copy C:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\2d\makefile")
已复制         1 个文件。
(chdir "libudf")()
(chdir "ntx86\2d")()
myudf.c
C:\Program Files\Microsoft Visual Studio\VC98\include\winnt.h(357) : error C2467: illegal declaration of anonymous 'struct'
C:\Program Files\Microsoft Visual Studio\VC98\include\winnt.h(376) : error C2467: illegal declaration of anonymous 'struct'
C:\Program Files\Microsoft Visual Studio\VC98\include\winnt.h(1519) : error C2054: expected '(' to follow '_inline'
......
......
C:\Program Files\Microsoft Visual Studio\VC98\include\wingdi.h(3558) : error C2143: syntax error : missing ')' before '*'
C:\Program Files\Microsoft Visual Studio\VC98\include\wingdi.h(3558) : error C2143: syntax error : missing '{' before '*'
C:\Program Files\Microsoft Visual Studio\VC98\include\wingdi.h(3558) : fatal error C1003: error count exceeds 100; stopping compilation

Done.

已经好多天了,老解决不了。请教高手们,如何解决这个问题,非常感谢!
发表于 2011-8-24 23:04:32 | 显示全部楼层
包含其他的库,不要在 fluent 编译

还是选择单独编译吧

可以考虑 cmake 生成 project 文件,也可以用fluent 自带的 makefile

[ 本帖最后由 fox000002 于 2011-8-25 13:29 编辑 ]
 楼主| 发表于 2011-8-27 18:28:37 | 显示全部楼层

回复 2# fox000002 的帖子

谢谢。
这个cmake 生成 project 文件后,fluent怎么调用,可以说具体一点吗?

还有,你说的fluent 自带的 makefile,是不是就是下面这种方法?
   (1)修改user_nt.udf的内容
   (2)将makefile_nt.udf改为makefile
我试过了,还是不行。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表