Has anyone ever gotten FastMM4BCB.cpp to compile and work successfully with C++ Builder 10.1 or later?
I am using 10.2.3 and I keep getting the following error when I try and compile it in my application:
[C++ Error] typeinfo.h(154, 2): E2367 Can't inherit RTTI class from non-RTTI base 'exception'
It has been this way for YEARS and I can't seem to find a fix. I am trying to track down a memory leak issue.
Related
I have always been able to compile a custom copy of mapbox-gl-native, but with the installation of Xcode 12 this has broken. I am getting the following errors:
No matching function for call to 'get'
How can I fix this C++ error that is showing? I am assuming this is happening because of updated Xcode tools.
When trying to compile and run the antlr4-cpp-demo with Xcode on macOS Sierra I get the following error:
TLexer lexer(&input); (!) Variable type 'antlrcpptest::TLexer' is an abstract class
As this is a demo I suppose it should work out of the box...
Any idea what is going wrong?
Check what exactly is causing the compiler to believe that TLexer is abstract. Probably it doesn't override a function that is abstract in one of its predecessors, which in turn indicates your are using a code generation jar and a C++ runtime that don't match. Did you download both from the ANTLR website?
When I try to compile my C++ program, I get an error when linking with the MongoDB new C++ driver (mongocxx) that there is an undefined reference.
The problem is easy to reproduce. Just try to compile the test example with in the quickstart guide (https://github.com/mongodb/mongo-cxx-driver/wiki/Quickstart-Guide-(New-Driver)). This is the error code:
hellomongo.cpp:(.text+0x3f): undefined reference to `mongocxx::v_noabi::uri::k_default_uri[abi:cxx11]'
I am using the newest 3.0.1 version of the C++ driver. The error was also there with 3.0.0.
I've replied to your identical question on the mongodb-user list:
https://groups.google.com/forum/#!topic/mongodb-user/BQvTonyD9pE
I'm trying to get an app working with a PLC. I'm using this library: https://github.com/FreeOpcUa/freeopcua
example code: https://github.com/FreeOpcUa/freeopcua/blob/master/src/examples/example_client.cpp
But when I include the header files(like in the example) from the library it gives an error:
Non-Virtual function 'DateTime::DateTime(const DateTime &)' declared pure.
When I search the specific line of this error it shows me this:
DateTime(const DateTime&) = default;
I already asked it on the github page, and they are saying it has something to do with my compiler. I never touched it, so it shouldn't be having odd options.
So how can I solve this? And if there is something wrong with my compiler, How can I change my compiler options to get it fixed?
Yes, bcc32 don't allow to create instance of abstract class. So you can change target platform to win64 and compile without errors.
Another way, as Thorsten Schöning said, you can use C++ Builder 10 with bcc32c based CLANG compiler and do it also without errors.
I have created a COM callable DLL in C# .NET 2.0 and created a TLB
from the assembly using the .NET regasm tool.
In Borland C++ Builder 4.0 I go to Project->Import Type Library-> and
find my DLL's type library there and click "Ok" to import it.
BCB creates an HardwareCheck_TLB.cpp & HardwareCheck_TLB.h file.
In a cpp file of the project I want to use the DLL I put:
#include "HardwareCheck_TLB.h"
at the top.
Then in code if I try to declare an object of that type in code:
IHardwareCheck hc = new IHardwareCheck();
I get the following compiler error:
[C++ Error] Unit1.cpp(22): E2352 Cannot create instance of abstract
class 'IHardwareCheck'.
[C++ Error] Unit1.cpp(22): E2353 Class 'IHardwareCheck' is abstract
because of '__stdcall IHardwareCheck::IsExpress(wchar_t * *,TOLEBOOL
*) = 0'.
Anybody have any ideas how to get rid of this error?
Thanks!
COM clasess cannot be created using new. You need to use the CoCreateInstance system call (see MSDN) or some wrapper provided by Borland (such as the one mentioned by zer0_ring).
It should generate some TCoClassCreatorT<> types that you can do a
CoHardwareCheck::Create(&hc)
You may have to look at the tlibimp.exe that Borland distributes with its products. I've gone through this before with that program but never was able to get the Co classes generated, maybe you'll have better luck.