Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Upgrading the project to API 25

Lk_
Participant
I'm trying to upgrade my existing add-on project to the newest API version but I'm getting some compilation errors.
The project originates from API 23 and I already have it upgraded to 24 by simply creating new build config and adjusting all the paths. I tried to do the same for API 25.
Also, I need to keep older versions for maintenance reasons.

The error I'm getting says:
Error C3668 'TE::FontFamily::GetClassInfo': method with override specifier 'override' did not override any base class methods ..\API Development Kit 25.3002\Support\Modules\TextEngine\FontFamily.hpp 42

These are the things I already rectified so far:
- added path to '../Modules/RS' headers and RSImp.lib (not sure if this is needed),
- removed references to utf8header.h which is no longer included with the SDK.

What do I do next?
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Kalloc Studios
Participant

Hello,

In regards to Error C3668 'IO::Name::GetClassInfo': method with override specifier 'override' did not override any base class methods ...


1. It looks to be WinUser.h defining GetClassName as GetClassNameA/W so GS::Object::GetClassName -> gets defined as GS::Object::GetClassNameA or W.
2. So Location DECLARE_CLASS_INFO macro was trying to find a GS::Object::GetClassName to override but fails because of the above.
3. I fixed the those compile errors by moving the windows api headers i.e. <Windows.h> to be after Archicad headers.

 

- Ian Tran

View solution in original post

3 REPLIES 3
Erenford
Booster
I'm also having compilation errors similar to yours, though it only occurs on a few cpps:
API Development Kit 25.3002\Support\Modules\TextEngine\FontFamily.hpp(42,2): error C3668: 'TE::FontFamily::GetClassInfo': method with override specifier 'override' did not override any base class methods
Addon Development\API Development Kit 25.3002\Support\Modules\InputOutput\Name.hpp(34,2): error C3668: 'IO::Name::GetClassInfo': method with override specifier 'override' did not override any base class methods
API Development Kit 25.3002\Support\Modules\InputOutput\Address.hpp(67,2): error C3668: 'IO::Address::GetClassInfo': method with override specifier 'override' did not override any base class Addon Development\API Development Kit 25.3002\Support\Modules\InputOutput\RelativeLocation.hpp(38,2): error C3668: 'IO::RelativeLocation::GetClassInfo': method with override specifier 'override' did not override any base class methods
API Development Kit 25.3002\Support\Modules\InputOutput\Location.hpp(52,2): error C3668: 'IO::Location::GetClassInfo': method with override specifier 'override' did not override any base class methods

The solution I found out for this is adding this define + include on the header file. Make sure this is first before other includes, doesn't work if its not
#define		ACExtension		// needed before ACAPinc.h
#include	"ACAPinc.h"

Hope this works for you too.
Solution
Kalloc Studios
Participant

Hello,

In regards to Error C3668 'IO::Name::GetClassInfo': method with override specifier 'override' did not override any base class methods ...


1. It looks to be WinUser.h defining GetClassName as GetClassNameA/W so GS::Object::GetClassName -> gets defined as GS::Object::GetClassNameA or W.
2. So Location DECLARE_CLASS_INFO macro was trying to find a GS::Object::GetClassName to override but fails because of the above.
3. I fixed the those compile errors by moving the windows api headers i.e. <Windows.h> to be after Archicad headers.

 

- Ian Tran

Sorry for the late reply, but indeed moving the headers fixed the problem.

Thanks!