I have a large program, using C++Builder, that has been built over many years. Recently I compiled the program using RAD Studio 11.1 using the “traditional compiler” with no problems. I now need to compile using the latest Clang 32bit compiler. The problem is a compiler error relating to ...\windows\sdk/GdiplusPath.h.
The error message is in 2 parts. c:\program files (x86)\embarcadero\studio\22.0\include\windows\sdk/GdiplusPath.h(146,34): C++ error : reference to 'byte' is ambiguous
c:\program files (x86)\embarcadero\studio\22.0\include\windows\sdk\rpcndr.h(197,22): C++ error : > candidate found by name lookup is 'byte'
c:\program files (x86)\embarcadero\studio\22.0\include\windows\crtl\stddef.h(258,11): C++ error : > candidate found by name lookup is 'std::byte'
On checking Google the 2 lookups are functionally equivalent but nonetheless the Clang compiler sees it as an error.
The problem is almost certainly related to the TChart components, code not using TChart compiles without errors.
I am using TeeChart Pro v2022.35.220329 32bit VCL
Help please
Error compiling with the new Clang 32bit compiler
Re: Error compiling with the new Clang 32bit compiler
Hello,
I'm not able to reproduce the problem.
If you create a new project, it should use the Clang-enhanced compiler by default (ref).
I've created a new project, added a TChart to the form, and it seems to compile and run without issues.
Could you please specify it that happens with an old project or also with a new one?
I'm not able to reproduce the problem.
If you create a new project, it should use the Clang-enhanced compiler by default (ref).
I've created a new project, added a TChart to the form, and it seems to compile and run without issues.
Could you please specify it that happens with an old project or also with a new one?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Error compiling with the new Clang 32bit compiler
An old project. Developed incrementally over 15 plus years. If I had to rewrite from scratch I would be tempted to use Visual Studio.
I did build a toy project and didn't have the problem.
I can fix the error error on single components but it re-occurs on a project compile.
I did build a toy project and didn't have the problem.
I can fix the error error on single components but it re-occurs on a project compile.
Re: Error compiling with the new Clang 32bit compiler
Hello,
This is what I find regarding the issue: RSP-25898, RSP-27292.
I can't find any
I'm trying to reproduce the problem so we can see if there's anything wrong at our side.
This is what I find regarding the issue: RSP-25898, RSP-27292.
I can't find any
using namespace std
in TeeChart sources, so I'm not sure what can be wrong.I'm trying to reproduce the problem so we can see if there's anything wrong at our side.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Error compiling with the new Clang 32bit compiler
I have created a new Toy project derived from the original program with dependencies removed and basically only header files remaining. On compiling the error occurs. The toy program uses TeeChart Pro. I have sent the program to Embarcadero but they don't have access to TeeChart Pro.
I tried to attach the Toy project (compressed) but it was too large at 13MB. I have removed further files so I hope it still shows the error.
I tried to attach the Toy project (compressed) but it was too large at 13MB. I have removed further files so I hope it still shows the error.
- Attachments
-
- SE_TOY - Copy.zip
- (25.21 KiB) Downloaded 551 times
Re: Error compiling with the new Clang 32bit compiler
Hello,
Just found there's
Removing that line, that error doesn't appear for me.
Just found there's
using namespace std;
in "ENGINE\UNITS\_SeriesCache.h".Removing that line, that error doesn't appear for me.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Error compiling with the new Clang 32bit compiler
It looks a likely solution. I will have to try on the complete program. Any thoughts on what is happening? I will pass your idea on to Embarcadero, maybe they will have some thoughts.
Re: Error compiling with the new Clang 32bit compiler
Hello,
The best explanation I can find is in one of the comments in the issues above, here, from Bruneau Babet, dev at Embarcadero.
The best explanation I can find is in one of the comments in the issues above, here, from Bruneau Babet, dev at Embarcadero.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |