
Sat, 08/16/2003 - 13:11
I tried compiling OCC 5.0 on Linux using OCC.COMP and could not get everything right. After digging through the process I found that the fault started while executing Draw.comp. And the error I got is as follows:
Compiling Draw
/opt/OCC-50/ros/src/Draw/Draw_VariableCommands.cxx: In function `void
numsave(const Handle_Draw_Drawable3D&, std::ostream&)':
/opt/OCC-50/ros/src/Draw/Draw_VariableCommands.cxx:135: invalid conversion from
`long int' to `std::_Ios_Fmtflags'
/opt/OCC-50/ros/src/Draw/Draw_VariableCommands.cxx:135: initializing argument
1 of `std::_Ios_Fmtflags std::ios_base::setf(std::_Ios_Fmtflags)'
Please kindly give me advice to solve this problem.
I am using gcc-c++-3.2-7 on Linux kernel 2.4.18.
Regards,
Worawut
Sat, 08/16/2003 - 20:08
You must use this compiler: gcc-2.95.3.
You can add him to your system without overriding the newer one.
I would also recommend to try Kernel 2.4.20 or 2.4.20.35. But first try the other compiler.
MCV
Mon, 08/18/2003 - 05:25
Thank you for your prompt response. I have not tried what you suggested yet (both gcc-2.95.3 and later version of kernel).
However, I managed to get it compiled without error message by modifying the files as shown below by the diff commands.
I don't have a clue if this is the right fix or not, but at the moment it works for me now with gcc-3.2.7 and kernel 2.4.18. ( I'd rather see the code fixed than having to go back to old version of things).
However, I am running into another problem of compiling the tutorial (I think it is the issue between qt-2 and qt-3). I will post about that if I cannot solve it soon.
Regards,
Worawut
/******************************************************/
Draw/Draw_VariableCommands.cxx
127,128c127
< // long form = OS.setf(ios::scientific);
< ios::fmtflags form = OS.flags(ios::scientific);
---
> long form = OS.setf(ios::scientific);
DrawTrSurf/DrawTrSurf.cxx :
1548c1548,1549
< long form = OS.setf(ios::scientific);
---
> // long form = OS.setf(ios::scientific);
> ios::fmtflags form = OS.flags(ios::scientific);
1610c1611,1612
< long form = OS.setf(ios::scientific);
---
> // long form = OS.setf(ios::scientific);
> ios::fmtflags form = OS.flags(ios::scientific);
1651c1653,1654
< long form = OS.setf(ios::scientific);
---
> // long form = OS.setf(ios::scientific);
> ios::fmtflags form = OS.flags(ios::scientific);
1691c1694,1695
< long form = OS.setf(ios::scientific);
---
> // long form = OS.setf(ios::scientific);
> ios::fmtflags form = OS.flags(ios::scientific);
DrawTrSurf/DrawTrSurf_Point.cxx :
189,190c189
< // long form = S.setf(ios::scientific);
< ios::fmtflags form = S.flags(ios::scientific);
---
> long form = S.setf(ios::scientific);