Re: [oce-dev] Re: OCE 0.12 and MinGW

210 views
Skip to first unread message

D. Barbier

unread,
May 18, 2013, 8:06:03 AM5/18/13
to oce...@googlegroups.com
On 2013/5/18 thatcadguy wrote:
> Hello again,
>
> GCC has an option to downgrade certain errors to warnings (-fpermissive). If
> you edit CMakeLists.txt and add this, it will compile just fine with
> MinGW-w64.
>
> Lines 784-785:
> IF(MINGW)
> SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthreads")
>
> change line 785 to:
> SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthreads -fpermissive")

Hello,

There is no need to edit CMakeLists.txt, you can either edit flags in
a GUI (see Advanced options) or pass -DCMAKE_CXX_FLAGS=-fpermissive
flag to cmake.

> Perhaps this should be changed (in master) for the time being before the
> goal of eliminating compiler errors is met so that people can compile with
> MinGW-w64.

Yes, good idea. Maybe add only this flag when compiling on win64.

> I haven't run any tests, but I have a simple program to create a simple STEP
> model which tests basic geometry and BOPs. MSVC 2012 32/64, MinGW 64, and
> GCC 32 (Linux) all produce the same shape with minor file differences (digit
> discrepancies starting at 1e-12). I have yet to compile this program with
> MinGW 32 and GCC 64, but I doubt they could be much different. I'll post
> here again if they are.

Ok, thanks.

Denis

C G

unread,
Aug 1, 2013, 12:19:56 PM8/1/13
to oce...@googlegroups.com
Hi,
 I am trying to compile the oce-0.12 with mingw32&msys, but there are some errors when compiling libTKOpenGL.dll
" E:\...\ftgl\lib\libftgl.a<libftgl_la-FTTextureGlyph.o>:In function 'ZN18FTTextureGlyphImp1C2EP16FT_GlyphSlotRec_iiiii':
e:\..\ftgl-2.1.3\src/FTGlyph/FTTextureGlyph.cpp:90:undefined reference to 'glPushClientAttrib@4'
e:\..\ftgl-2.1.3\src/FTGlyph/FTTextureGlyph.cpp:96:undefined reference to 'glTextSubIamage2D@36'
e:\..\ftgl-2.1.3\src/FTGlyph/FTTextureGlyph.cpp:90:undefined reference to 'glPopClientAttrib@0'
collect.exe:error:ld returned 1 exit status
make[2]:***[adm/cmake/TKOpenGL/win32/bin/Release/libTKOpenGL.dll] Error 1
make[1]:***[adm/cmake/TKOpenGL/CMakeFiles/TKOpenGL.dir/all] Error 2

could anyone help me , 
thanks
CG



D. Barbier

unread,
Aug 2, 2013, 3:31:50 AM8/2/13
to oce...@googlegroups.com
Hello,

No idea, this is not related to oce. Maybe you should try to build
and run ftgl demo applications, something seems to be wrong in your
ftgl build.

Denis

C G

unread,
Aug 3, 2013, 8:55:46 AM8/3/13
to oce...@googlegroups.com
hi
thank you ,Denis.As you said ,it was the problem of ftgl. I have rebulit it and  complied all the oce-0.12 except the component of oce-visualisation  successfully. when compiling the oce with the part of oce-visualisation,there are some errors as following:
E:\test\oce-OCE-0.12\src\Draw\Draw_Interpretor.cxx: In function 'FILE* {anonymous}::capture_start(int, int*)':
E:\test\oce-OCE-0.12\src\Draw\Draw_Interpretor.cxx:140:28: error: 'dup' was not declared in this scope
E:\test\oce-OCE-0.12\src\Draw\Draw_Interpretor.cxx:141:24: error: 'dup2' was not declared in this scope
E:\test\oce-OCE-0.12\src\Draw\Draw_Interpretor.cxx: In function 'void {anonymous}::capture_end(FILE*, int, int, Standard_OStream&, Standard_Boolean)':
E:\test\oce-OCE-0.12\src\Draw\Draw_Interpretor.cxx:148:26: error: 'dup2' was not declared in this scope
E:\test\oce-OCE-0.12\src\Draw\Draw_Interpretor.cxx:149:18: error: 'close' was not declared in this scope
make[2]: *** [adm/cmake/TKDraw/CMakeFiles/TKDraw.dir/__/__/__/src/Draw/Draw_Interpretor.cxx.obj] Error 1
make[1]: *** [adm/cmake/TKDraw/CMakeFiles/TKDraw.dir/all] Error 2
make: *** [all] Error 2

CG
Reply all
Reply to author
Forward
0 new messages