Fraser
Members-
Content Count
57 -
Joined
-
Last visited
Everything posted by Fraser
-
It appears to unresolved with 11.3. There is a few duplicate reports so it has been noticed by many people.
-
My program works as expected outside of the IDE. There is clearly a bug with C++ Builder 11.3.
-
The standard says when argc>0 argv[0] holds the program name or is empty. What I see is my parameter, which is neither of those.
-
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.
-
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.
-
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.
-
I have followed instructions from Embarcadero support and it is now working. I still had to run the installer twice becuase it found a previous trial license even though I had deleted it.
-
Ok. The message I get when registration fails is: "No valid license information found for Embarcadero Delphi 11. You must provide a valid serial number in order to use Embarcadero Delphi 11."
-
The community edition has been an older version that the current one for many years. Are you sure this has changed?
-
I would like to have Rename As... under Save As.. on the File menu. I wasn't aware that F2 had any use until now.
-
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.
-
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.
-
If I have an object with static storage duration that throws an exception while constructing it is not caught by the expected catch statement. Instead there is an external exception EEFACE and 'Abnormal program termination' is reported. This only happens with a VCL application. The code would work otherwise. I have to have my object declared static in a function that returns it by reference in order that its construction will be delayed until after something clearly VCL related. This must be something that is known about. I am not providing example code because the requirements for this are described adequately. BTW this is not the undeterminable order of construction of objects of static storage duration problem.
-
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) { }
-
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. I don't know what you are saying. a and AccessA() are diferent implementations that I am trying out and never used together. It has a handler so why wouldn't it be caught? It is caught when constructing obj. For obj's exception it is caught and the handler executes correctly and there is not another throw.
-
I am not sure what is happening when I export functions with __cdecl. When I build with 32-bit clang there is one prefixed underscore on all function names. When I build with 64-bit clang there is no prefixed underscore on function names. The documentation says this about cdecl: "Note: This feature is available only for the classic bcc32 compiler, not for the modern Clang-enhanced compiler." It also says:"Note: The __cdecl form is the only one supported by C++Builder 64-bit Windows (BCC64)." Is this not a contradiction? The compiler option "Generate underscores on symbol names" made no difference to my 32-bit builds. I have not found any way of using cdecl with 32-bit builds and to not get leading underscores which means I cannot build zlib1.dll which specifies no underscores.
-
I had discovered some of this. The documentation needs some correcting.
-
For obj the initial message is Project X.exe raised exception class $std@logic_error with message 'Exception Object Address:0x2EAAE98'. For a the initial message is similar. Next there is Project X.exe raised exception class EExternalException with message 'Extrenal Exception EEFACE'. Next there is another before 'Abnormal program termination.'
-
#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; } }; A a; A & AccessA() { static A obj; return obj; } //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- The throw is placed there as a deliberate test. The object a throws an exception and it gets caught by the handler but the CPU view shows that a function called clang terminate is called. The object obj throws an exception and it gets caught by the handler and the correct code is executed.
-
Are there any open source projects for C++ Builder that could be used for this kind of problem?
-
I've tried that and the bug has not materialised. Probably it requires a large project to appear.
-
What appears to be required is a VCL project with an object declared at global scope that throws during construction and an appropriate catch statement in the constructor that will not catch the exception.
-
An object is declared in a cpp file at namespace scope.
-
I am using C++ Builder 10.4 with Dinkumware 8.03. The non-member function std::cbegin sometimes returns an iterator when it should always be a const_iterator. The following program will not compile due to b1 being deduced as iterator and b2 a const_iterator. There is no problem with c1 and c2. The fix is to add const to the parameter _Container & as described in the book. int _tmain(int argc, _TCHAR* argv[]) { std::vector<int> a1(100, 2); std::vector<int> const a2(100, 3); auto const b1= std:: cbegin(a1), b2= std::cbegin(a2); /*auto const c1= a1.cbegin(), c2= a2.cbegin(); */ // See item 13 of Effective Modern C++ for explanation. return 0; } /* line 1672 of xiter template<class _Container> _CONST_FUN auto inline cbegin(_Container& _Cont) _NOEXCEPT_OP(_NOEXCEPT_OP(_STD begin(_Cont))) -> decltype(_STD begin(_Cont)) { // get beginning of sequence return (_STD begin(_Cont)); } */
-
I've not had any reply from Dinkumware.