Well tbscope, I'm not getting an error on the function call now, but on the things that precede it.
Yeah, I know, this is basic C++ stuff, but I'm a 66 year old dog trying to learn new tricks and my native language is pl/sql.
Here is the code from the library:
//from the header
typedef void * tQSL_Location;
//from the source
class TQSL_LOCATION {
public:
TQSL_LOCATION() : sentinel(0x5445), page(0), cansave(false), sign_clean(false) {}
~TQSL_LOCATION() { sentinel = 0; }
int sentinel;
int page;
bool cansave;
std::string name;
TQSL_LOCATION_PAGELIST pagelist;
std::vector<TQSL_NAME> names;
std::string signdata;
bool sign_clean;
std::string tSTATION;
std::string tCONTACT;
std::string sigspec;
};
DLLEXPORT int
tqsl_getStationLocation(tQSL_Location *locp, const char *name)
//from the header
typedef void * tQSL_Location;
//from the source
class TQSL_LOCATION {
public:
TQSL_LOCATION() : sentinel(0x5445), page(0), cansave(false), sign_clean(false) {}
~TQSL_LOCATION() { sentinel = 0; }
int sentinel;
int page;
bool cansave;
std::string name;
TQSL_LOCATION_PAGELIST pagelist;
std::vector<TQSL_NAME> names;
std::string signdata;
bool sign_clean;
std::string tSTATION;
std::string tCONTACT;
std::string sigspec;
};
DLLEXPORT int
tqsl_getStationLocation(tQSL_Location *locp, const char *name)
To copy to clipboard, switch view to plain text mode
So stumbling around in my usual way, in my application, I put in my LotwUpload class:
class TQSL_LOCATION;
LotwUpload
::LotwUpload(QWidget *parent
) : ui(new Ui::LotwUpload)
{
ui->setupUi(this);
TQSL_LOCATION tqslLocation = new TQSL_LOCATION();
tqslLocation = "K4ELO - K4ELO Farm";
int loc = tqsl_getStationLocation(tqslLocation, "my_name");
}
class TQSL_LOCATION;
LotwUpload::LotwUpload(QWidget *parent) :
QDialog(parent),
ui(new Ui::LotwUpload)
{
ui->setupUi(this);
TQSL_LOCATION tqslLocation = new TQSL_LOCATION();
tqslLocation = "K4ELO - K4ELO Farm";
int loc = tqsl_getStationLocation(tqslLocation, "my_name");
}
To copy to clipboard, switch view to plain text mode
And the compiler errors are:
C:/CPP/QT_Projects/HRLogger_Development/lotwupload.cpp:14: error: variable 'TQSL_LOCATION tqslLocation' has initializer but incomplete type
C:/CPP/QT_Projects/HRLogger_Development/lotwupload.cpp:14: error: invalid use of incomplete type 'struct TQSL_LOCATION'
C:/CPP/QT_Projects/HRLogger_Development/lotwupload.cpp:6: error: forward declaration of 'struct TQSL_LOCATION'
So, unless someone is kind enough to explain to me what I am doing wrong, I'll just keep researching and stumbling until I get it to work
Bookmarks