Jump to content

Roger Cigol

Members
  • Content Count

    397
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Roger Cigol

  1. My mistake ! sorry for confusion. The correct link is.... https://cigolblog.wordpress.com/2022/05/12/using-google-tests-with-classic-compiler-projects/
  2. Hi Camilo, It is entirely possible (and maybe advantageous) to write your main (typically legacy) project using the Classic compiler but to write your unit tests using clang32 and the Google Tests framework. See https://cigolblog.wordpress.com/2022/05/12/using-google-tests-with-classic-compiler-projects/ The big advantages of using GoogleTests over DUnit are a) There is good documentation provided by Google out on the web b) it supports all commonly used unit testing techniques (including building mocks) c) if/when you move your Classic based project to Clang32 your unit tests will all still be valid / useful I've ditched DUnit completely in favour of using GoogleTests - even though many of my existing projects for customers are still based on the Classic compiler
  3. Roger Cigol

    code completion?

    Hi David P - can you remind me how to switch off the Code insight indexing in 11.2 - I can't find the check box " Index for C++ Insights" that is referred to on this help page: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Code_Insight_Reference#Error_Insight
  4. Roger Cigol

    11.2 now doesn't link my Windows VCL C++ Clang64 project

    Interesting - I seem when I successfully compile and link my GoogleTests unit tests for this project I get this line in the console output Linking... Target _PerformLink: Target _PerformBCCILink: d:\program files (x86)\embarcadero\studio\22.0\bin\ilink64.exe -G8 -L. < all my google test files are listed here> Build succeeded. 0 Warning(s) 0 Error(s) The fact that the error messages for the main project (previosuly reported) are referring to "ILINK32" makes me wonder if the 11.2 has got mixed up and is trying to call the 32 bit linker....
  5. Roger Cigol

    11.2 now doesn't link my Windows VCL C++ Clang64 project

    I don't know if this helps (it looks like more of the same...). The TwineCompile "console output" shows all 354 file compile ok and the resource compilation goes ok. It then reports the following for the linker error.... Done building target "MakeObjs" in project "MyProjectNameHere.cbproj". Linking... Target _PerformLink: Target _PerformBCCILink: d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: The "ILINK32" task failed unexpectedly. d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: System.FormatException: Input string was not in a correct format. d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.Metadata.Option.ParseInt64(String value) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.Metadata.Option.IsDefaultValue(BaseTask task) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.Metadata.Option.AppendCommandLineSwitch(BaseTask task, CommandLineBuilder b) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.BaseTask.AddOptionString(CommandLineBuilder b) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Cpp.ILINK32.AddOptionString(CommandLineBuilder b) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.BaseTask.GetCommandLine() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Cpp.ILINK32.GetCommandLine() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.BaseTask.GenerateCommandLineCommands() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Microsoft.Build.Utilities.ToolTask.Execute() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.BaseTask.Execute() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Cpp.ILINK32.Execute() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) Done building target "_PerformBCCILink" in project "MyProjectNameHere.cbproj" -- FAILED. Done building target "_PerformLink" in project "MyProjectNameHere.cbproj" -- FAILED. Done building project "MyProjectNameHere.cbproj" -- FAILED. Build FAILED. D:\MyProjectNameHere\C code\Utility classes\Computer.cpp(348,7): C++ warning : 'GetVersionExW' is deprecated [-Wdeprecated-declarations] d:\program files (x86)\embarcadero\studio\22.0\include\windows\sdk\sysinfoapi.h(383): C++ warning : > 'GetVersionExW' has been explicitly marked deprecated here D:\MyProjectNameHere\C code\LabelPrinterPcb Thread\LabelPrinterPcbControl.cpp(967,6): C++ warning : '/*' within block comment [-Wcomment] D:\MyProjectNameHere\C code\LabelPrinterPcb Thread\LabelPrinterPcbControl.cpp(1018,18): C++ warning : '/*' within block comment [-Wcomment] d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: The "ILINK32" task failed unexpectedly. d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: System.FormatException: Input string was not in a correct format. d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.Metadata.Option.ParseInt64(String value) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.Metadata.Option.IsDefaultValue(BaseTask task) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.Metadata.Option.AppendCommandLineSwitch(BaseTask task, CommandLineBuilder b) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.BaseTask.AddOptionString(CommandLineBuilder b) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Cpp.ILINK32.AddOptionString(CommandLineBuilder b) d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.BaseTask.GetCommandLine() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Cpp.ILINK32.GetCommandLine() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.BaseTask.GenerateCommandLineCommands() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Microsoft.Build.Utilities.ToolTask.Execute() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Common.BaseTask.Execute() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Borland.Build.Tasks.Cpp.ILINK32.Execute() d:\program files (x86)\embarcadero\studio\22.0\Bin\CodeGear.Cpp.Targets(3984,5): error MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) 4 Warning(s) 1 Error(s) Time Elapsed 00:10:07.58 Finished Build.
  6. Roger Cigol

    Delphi 10.4.2 won't open a specific .PAS file

    Beta testers are not magicians (at least none of the ones I've ever met are). If you don't file an RSP it is much less likely that the bug you vaguely describe here ("problems with ctrl+click to open files") will be fixed.....Please do file an RSP.
  7. Roger Cigol

    Delphi 10.4.2 won't open a specific .PAS file

    That's a little lazy.... Here's the link https://quality.embarcadero.com/browse/RSP-38884?jql= It would be interesting to know if the same problem exists on 11.1 - does anyone have time to check this ?
  8. Roger Cigol

    Delphi 10.4.2 won't open a specific .PAS file

    It would be really valuable to everyone if you could file this bug on the Embarcadero Quality Portal https://quality.embarcadero.com/secure/Dashboard.jspa
  9. Roger Cigol

    exceptions and static storage duration objects

    Can you give a brief sample code of the kind of thing that you think fails sometimes, even though it "works" in your brief sample. This could well be an example of doing something that C++ is allowed to use the "undefined behaviour" get out (undefined behaviour often tends to one of either "a complete crash" or "sometimes works and sometimes doesn't"
  10. Roger Cigol

    exceptions and static storage duration objects

    A strange question to ask. You are the person who can generate the fault you are trying to describe. So only you can really judge if the same problem exists when the correct set of circumstances are made to exist in another (eg open source) project....
  11. I would be wary here. The field defaults to read only because it is a calculated field. Why would you want to change the value (unless you are trying something very dodgy?) of a calculated field. This strikes me as the sort of thing that should ring an "alarm bell" with the question: "am I designing my code the best way ?"
  12. Roger Cigol

    .gitignore file for Embarcadero C++

    I can see a sample .gitignore file for Delphi at https://github.com/Embarcadero/RADStudio11Demos. But I can't find an equivalent for Embarcadero C++ projects. Does anyone know of one up there (or anywhere else) (and is it up to date to include ignoring the _astcache folder contents)?
  13. RAD Studio, C++Builder 11.1.5 is released today (15th July 2022). Can anyone find installation instructions for this ? ie do I need to uninstall RAD Studio 11.1 first and then do a complete reinstall or does the install need to go "on top" of my existing installation? I am sure this must be on the Embarcadero wwww site somewhere but I can't find it ! Send us a URL if you know better than me, please....
  14. Roger Cigol

    Install of RAD Studio, C++Builder 11.1.5

    I did read David's blog : I am not sure that the line you emphasise should be interpreted to mean uninstall the old version and then install the new one. I thought it means only that you don't have to worry about if you have got the other hot fixes in or not. Actually I tried to install it "over the top" of 11.1 and the installer detected the existence of 11.1 and uninstalled it (keeping registry settings) and then installed 11.1.5 - The installation went smoothly.
  15. If you have RAD Studio (ie you also have C++ Builder) then the C++ FMX header files may be useful here.... Not sure about copyright / license restrictions on their use though....
  16. I have a C++ Builder (10.4.2) Windows 64 bit VCL application (clang64). Whilst it is running I want to start an external (third party) windows 64 bit exe console application and whilst this runs to completion I want my VCL application to capture (and I will write code to process) the) text output that the third party exe file sends to "standard output". Ideally I want to do this without the user being aware that it is happening. It's easy to run an external console application in it's own shell, but how do I redirect the output from this external console application into my (already running) VCL application?
  17. Thanks Remy - as you rightly say, it's not too difficult to get the console interface working. Slightly harder to write a unit test to prove that unicode chars are handled ok. But I got there in the end. Thanks for pointing me in the right direction.
  18. Roger Cigol

    C++Builder 11 - any way of compiling .PAS?

    If you want to compile Delphi you have to get RAD Studio 11.1
  19. Roger Cigol

    How is text being saved to the database?

    or is the TEdit bound to the data source by LiveBindings ? (Right click on the TEdit and select BindVisually....)
  20. Roger Cigol

    TortoiseGit with Delphi 10 Seattle

    Frost.Brutal : Thanks for this instant manual on "how to configure tools" ! I had never really looked into this feature of the IDE and I can immediately see how it can be useful !
  21. Has anyone else compared compile times for Embarcadero clang C++ 17 vs other C++ 17 compilers? The compile times between clang and GNU C++ are supposed to be roughly the same (some say clang is often slightly faster) but if you compile a single C++ 17 unit using Clang 64 (Windows 64 bit, VCL) in Rad studio IDE (Alexandria 11.1) it still seems to take a lot longer than a similar length unit in other systems. It's almost as if it is recompiling the VCL headers every time....
  22. Roger Cigol

    TortoiseGit with Delphi 10 Seattle

    Frost.Brutal : how do you get this to work ? I don't have any tortoise git in my Tools menu (RAD Studio 11.1 patch 1 Enterprise)
  23. Roger Cigol

    TortoiseGit with Delphi 10 Seattle

    I use Tortoise Git outside of the IDE. I work with private repositories on GitLab using SSL communications and found that the IDE support for Git would not support this transfer. I reported this https://quality.embarcadero.com/browse/RSP-26560 So I now work on the cycle. 1) develop code using the IDE 2) Close project in the IDE 3) Commit and push using TortoiseGit (or do other actions - create merge request, check out different branch etc) 4) Reopen the project in the IDE 5) go back to item 1.... I find this works well for me. To some extent I can't see the point of Embarcadero trying to replicate the Git interface (in effect all the convenient things that TortoiseGit allows you to do) within the IDE. Unless they do a lot of work (ie handle all that TortoiseGit does) there are still going to be instances where you need to come out of the IDE to do Git related actions. So you might as well always use the cycle I have described.....
  24. It is entirely possible (and maybe advantageous) to write your main (typically legacy) project using the Classic compiler but to write your unit tests using clang32 and the Google Tests framework. See https://wordpress.com/post/cigolblog.wordpress.com/409
  25. Roger Cigol

    How make benchmark?

    I think doing a benchmark test(s) and then taking an informed decision is always a wise approach. Letting other forum users see your results is always helpful.....
×