2023-12-11 08:44 PM - last edited on 2023-12-17 10:55 PM by Laszlo Nagy
I have a plugin that compiles and works fine in AC26. I am upgrading it to AC27. I have installed the AC27 API kit and changed all references in the project file to the 27.3001 folder.
I now get about 6000 errors, many of them like these:
Code:
CParameter* Factory(const API_AddParType ¶meter);
Errors:
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2143 syntax error: missing ',' before '&'
The Visual Studio IDE is able to identify the type API_AddParType and can navigate to the .h file if I press F12 on the type, but the compiler doesn't seem to be able to find it. (See attached image)
Could someone help with what I need to change to resolve this issue?
2023-12-12 11:16 AM
Did you specify C++17 for your Project when compiling for AC27? The AC27 DevKit assumes the use of C++17.
2023-12-12 07:20 PM
Hi Bernd, yes I had already set C++17 as the language standard, thanks, but that did not resolve these issues.
2023-12-12 09:21 PM
Hm.. I took a closer look. API_AddParType is defined for the AC27 DevKit. But CParameter is not.
In fact, when I copy your code line into one of my projects, I get the exact same errors and Visual Studio highlights CParameter as missing. So I think it's very likely that somehow you are not properly including the headers which define CParameter. Where do you get this type from?
Best,
Bernd
2023-12-12 09:50 PM - last edited on 2023-12-17 10:56 PM by Laszlo Nagy
Hi Bernd,
It is one of our own classes defined in Parameter.hpp, which is included in the file. here is a large snippet showing the original code and the include. What is peculiar is that the VS IDE happily identifies CParameter, (no red squiggle) and I can navigate to it by pressing F12 on it in the IDE
Regards,
Nick
#ifndef _PARAMETERCOLLECTION_HPP_
#define _PARAMETERCOLLECTION_HPP_
#include "Definitions.hpp"
#include <vector>
#include "WString.hpp"
#include <Parameter.hpp>
using namespace std;
class CParameterCollection
{
protected:
vector<CParameter*> m_collection;
protected:
void ClearCollection();
void CopyCollection(const CParameterCollection &src);
CParameter* Factory(const API_AddParType ¶meter);
2023-12-14 09:07 AM
Hi Nick,
It's a tough one. I don't see anything obviously wrong with the code.
A few questions:
Best,
Bernd