本篇内容介绍了“OpenCASCADE 6.3.0编译出错如何解决”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
在Linux下编译OpenCASCADE 6.3.0,出现:
g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../inc -I../../../drv/EDL -I../../../src/EDL -I../../../drv/MS -I../../../src/MS -I../../../drv/WOKAPI -I../../../src/WOKAPI -I../../../drv/WOKBuilder -I../../../src/WOKBuilder -I../../../drv/WOKDFLT -I../../../src/WOKDFLT -I../../../drv/WOKDeliv -I../../../src/WOKDeliv -I../../../drv/WOKMake -I../../../src/WOKMake -I../../../drv/WOKOBJS -I../../../src/WOKOBJS -I../../../drv/WOKOrbix -I../../../src/WOKOrbix -I../../../drv/WOKStep -I../../../src/WOKStep -I../../../drv/WOKTools -I../../../src/WOKTools -I../../../drv/WOKUnix -I../../../src/WOKUnix -I../../../drv/WOKUtils -I../../../src/WOKUtils -I../../../drv/WOKernel -I../../../src/WOKernel -DNDEBUG -DNo_Exception -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -ffriend-injection -fpermissive -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT WOKUnix_FDescr.lo -MD -MP -MF .deps/WOKUnix_FDescr.Tpo -c ../../../src/WOKUnix/WOKUnix_FDescr.cxx -fPIC -DPIC -o WOKUnix_FDescr.lo ../../../src/WOKUnix/WOKUnix_FDescr.cxx: In member function 'void WOKUnix_FDescr::Dup()': ../../../src/WOKUnix/WOKUnix_FDescr.cxx:249: warning: ignoring return value of 'int dup(int)', declared with attribute warn_unused_result ../../../src/WOKUnix/WOKUnix_FDescr.cxx: In member function 'Handle_TCollection_HAsciiString WOKUnix_FDescr::ReadLine()': ../../../src/WOKUnix/WOKUnix_FDescr.cxx:355: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result ../../../src/WOKUnix/WOKUnix_FDescr.cxx: In function 'FILE* _wokunix_fdopen(int)': ../../../src/WOKUnix/WOKUnix_FDescr.cxx:436: warning: deprecated conversion from string constant to 'char*' ../../../src/WOKUnix/WOKUnix_FDescr.cxx:443: warning: deprecated conversion from string constant to 'char*' ../../../src/WOKUnix/WOKUnix_FDescr.cxx:449: warning: deprecated conversion from string constant to 'char*' In function 'int open(const char*, int, ...)', inlined from 'WOKUnix_FDescr WOKUnix_FDescr::BuildNamedPipe()' at ../../../src/WOKUnix/WOKUnix_FDescr.cxx:205: /usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments make[3]: *** [WOKUnix_FDescr.lo] Error 1 make[3]: Leaving directory `/home/anubis/src/rpm/BUILD/OpenCASCADE6.3.0/ros/adm/make/TKWOK' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/anubis/src/rpm/BUILD/OpenCASCADE6.3.0/ros/adm/make' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/anubis/src/rpm/BUILD/OpenCASCADE6.3.0/ros' make: *** [all] Error 2</blockquote>
注意函数体BuildNamedPipe出错。在论坛上找到解决方案
只需要修改ros/src/WOKUnix/WOKUnix_FDescr.cxx的205行为:
myFileChannel = open(apath.ToCString(), O_RDONLY | O_NDELAY | O_CREAT, S_IRUSR);
即可
“OpenCASCADE 6.3.0编译出错如何解决”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。