Jump to content

Fraser

Members
  • Content Count

    43
  • Joined

  • Last visited

Posts posted by Fraser


  1. If I make a small console application without saving it I can build and run it once.  Than I get [ilink32 Error] Fatal: Could not open .\Win32\Debug\Project1.exe (error code 1224).  This always happens now with Builder 11.3.  If I use the Clean option I get [Delete Error] Unable to delete file ".\Win32\Debug\Project1.exe". Access to the path 'C:\Users\Fraser Ross\Documents\Embarcadero\Studio\Projects\Win32\Debug\Project1.exe' is denied.


  2. That would be laughed at.  It is probably itself or Delphi.  Does anyone have 10.1 Berlin installed?  I have been getting many script errors while starting it recently and after reinstalling it.  I also have a blank strip across the startup picture that is still there after reinstalling.


  3. Does the project option 'Show header dependencies in project manager' work with the community edition?  I was trying the option but my cbproj file got corrupted and I've had to retrieve a backup.


  4. When I run my program from the IDE of 11.3 I am finding that _argc is 0 when I have not set any parameters.  So _argv[0] is not the program name as is the documented functionality.  I've not seen this before with any other version of C++ Builder.  If I set a parameter then _argc will be 1 and _argv[0] will be the parameter so there is not an error in how I use these variables.  I made a small test program but the problem would not show up.


  5. I have discovered that the ability to run from the IDE and to set the icons are disabled together when I place any #include directives above #pragma hdrstop in the project source file.  Also the abilities are restored when I remove those extra include directives.


  6. The point where it becomes impossible to run is when the signature of WinMain is modified.  It is

    int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int) originally.

     

    I am using a utf8 code library that is here: https://www.codeproject.com/Articles/5252037/Doing-UTF-8-in-Windows I have changed '_TCHAR maps to' char in the belief that it is required for that library code.  I have had some use of that library although it takes some effort to make it compatible with C++ Builder.

     


  7. I created a new project with 11.3 that is equal to one I have for 10.4.  After getting everything done it wouldn't let me set the icons.  So I finally deleted the whole project and started again, this time setting the icons as soon as possible.  Now I have built it for 32-bit and 64-bit Windows and both debug and release but none of them allow me to run the program from the IDE.  I've had many versions of C++ Builder and many projects but this has not happened before.


  8. I have tried to install the newly available community edition which is 11.0.  The Embarcadero site tells me: Your download should begin immediately for
    C++Builder Community Edition 11.3 Alexandria installer.   My serial number does not seem to be matching to the installed software.  It says something about Delphi which is another incorrect thing when I try to register.  Has someone made a complete mess of things?  My e-mail with the serial number gives a link to an installation program for 11.3 : RADStudio_11_3_esd_28_13236.exe


  9. I had this kind of problem.  It is caused by Windows File Explorer having a cache of icons and not updating the cache.  I have checked my icons in the exe with PE Explorer and tried another file manager called Explorer++ and this confirms where the problem is.


  10. After my C++ Builder 10.4.2 Community edition license expired I got another.  Now some projects have lost support for Windows 32-bit and I could not add the Windows 32-bit target platform.  Strangely after trying some more I can add that platform again.


  11. Quote

    For obj's exception it is caught and the handler executes correctly and there is not another throw.

    Quote

    No, there is no explicit re-throw statement in the catch block.  But the catch block is performing an implicit re-throw, because you are using a function-try block instead of a normal try block:

    More than once I have said the AccessA() type of implementation works as expected and you say otherwise.  Thats ridiculous.

     

    You are the only person that has said anything about rethowing.  I have seen nothing.  For a start an object of one type, in my case std::logic_error, would be rethrown as the same object.  But the next exception I witness, for object a, has type EExternalException.

     

    I'm not aware of any difference between function-try-block and try-block other than a function-try-block is a like a try-block around a functions entire body, a shorter notation for that.  Even the standard states that where it says "try block" it can apply to either.

     

    Here is the rough mock-up of my program with some corrections;

     

    #include <vcl.h>
    #pragma hdrstop

    #include "Unit1.h"

     

    #pragma package(smart_init)
    #pragma resource "*.dfm"
    TForm1 *Form1;

     

    class A {
        A() noexcept try {
        throw std::logic_error("test");
        }
        catch (std::exception const &ex) {
            std::cout << "Caught an STL exception" << std::endl;

            std::exit("Done");
            }
        };

     

    A a;

     

    // Alternative implementation that works as expected;

    /*A & AccessA() {
        static A obj;
        return obj;
        }*/

     

    __fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
    {
    }


  12. Quote

    I would not have expected this code to compile, but if it does then it has undefined behavior.

    It is not my function, it's a mock-up.  My function calls exit so it does not throw again and can be declared noexcept.

    Quote

    You are constructing an A object in global scope before Winmain() is called, you are not waiting for AccessA() to be called first.

    I don't know what you are saying.  a and AccessA() are diferent implementations that I am trying out and never used together.

    Quote

    That global object is throwing an exception that is not being caught, thus aborting the process startup.

    It has a handler so why wouldn't it be caught?  It is caught when constructing obj.

    Quote

    But the exception is not being swallowed by the catch handler, it is being re-thrown.

    For obj's exception it is caught and the handler executes correctly and there is not another throw.

×