开发者

Cannot find direct.h

For some reason when I try to compile my code, I get this error:

fatal error: direct.h: No such file or directory compilation terminated.

I'm on linux using g++ (GCC) 开发者_JS百科4.6.0 20110509 (Red Hat 4.6.0-7)


Commonly, is a C/C++ header file provided by Microsoft Windows, so it cannot works in linux.

reference at wikipedia

You can use unistd.h to replace the actions in direct.h like mkdir, rmdir, etc.


direct.h is part of the Digital Mars compiler, not gcc.

Most of its functions have similar names on linux that's posix standarized. Read the manpage for e.g. getcwd , rmdir, mkdir ,or clarify your question as to which functions you need.

As a start, just remove the include and see what other errors you are getting, and work from there.


I took SWMM5 source code and modify the files following the readme and some small fixes. It seems in linux you do not need direct.h at all for the CLE version. I have tested several of the examples provided by EPA https://www.epa.gov/sites/production/files/2014-05/epaswmm5_apps_manual.zip

You can get the files from here.

Let me know if something is not working.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜