Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Fix for Rio U2 clang compile errors - C++ Builder

 Post Reply Post Reply
Author
Anthony View Drop Down
New Member
New Member
Avatar

Joined: 14 Aug 2019
Posts: 1
Post Options Post Options   Quote Anthony Quote  Post ReplyReply Direct Link To This Post Topic: Fix for Rio U2 clang compile errors - C++ Builder
    Posted: 14 Aug 2019 at 9:43pm
TMS VCL Chart package 4.4.0.0 will not compile in clang in Rio update 2 for C++ Builder. It might compile in classic 32 bit, if you are lucky, but your application will blow up on exit. If you are experiencing these problems, like we were, and you are getting errors like the below errors in clang, then read on for a work around:

[bcc64 Error] AdvOpenGLX.hpp(168): conflicting types for 'glAreTexturesResident'
  gl.h(1154): previous declaration is here
[bcc64 Error] AdvOpenGLX.hpp(172): conflicting types for 'glBitmap'
  gl.h(1158): previous declaration is here
[bcc64 Error] AdvOpenGLX.hpp(175): conflicting types for 'glCallLists'
  gl.h(1161): previous declaration is here
[bcc64 Error] AdvOpenGLX.hpp(654): functions that differ only in their return type cannot be overloaded
  wingdi.h(6209): previous declaration is here

The problem is caused by Embarcadero generating a bad HPP header for TMS Advanced Charts for C++ Builder. Follow these instructions to get your project back on track (at least as well as it can be with the extremely buggy C++ Builder Rio lol):

1) Open file for 32bit: AdvOpenGLX.hpp

2) Comment out all lines starting with ?extern ?C??. These functions exist in gl.h and the linker will find them and the compiler is happy without the externs.

3) Repeat for 64 bit.

4) Clang/classic should now compile and run. This also fixed the issue with classic blowing up when exiting the application.

Following the above solved our problem with 32bit classic blowing up on close, and solved the issue with Clang not compiling. I don't know if there are other problems, but at least we are running again.

Thank me later :)
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8379
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 15 Aug 2019 at 5:27pm
Thanks for sharing all these details Anthony.
We hope at the same time that Embarcadero will also address this.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down