Code: Select all
error C3861: 'visibility': identifier not found telldus-core.h line: 47 1 Main
error C2448: '__attribute__' : function-style initializer appears to be a function definition telldus-core.h line: 47 1 Main
Running latest beta driver: 2.1.2_beta10
C2448 - http://msdn.microsoft.com/en-us/library/s611x42d.aspx
If MSDN is right it seems the syntax used in the header is outdated?
Code: Select all
#define TELLSTICK_API __attribute__ ((visibility("default")))
Code: Select all
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream"
//#include "C:\\Program Files (x86)\\Telldus\\TelldusCore.dll"
#include "windows.h"
#include "telldus-core.h"
using namespace std;
//int getNumberOfDevices();
int _tmain(int argc, _TCHAR* argv[])
{
const wchar_t* dllPath = L"C:\\Program Files (x86)\\Telldus\\TelldusCore.dll";
cout << "Initializing\n";
HMODULE WINAPI tdCore = LoadLibrary(dllPath);
if (!tdCore) {
cout << "Unable to load TelldusCore.dll\n";
return -1;
}
tdInit();
//cout << getNumberOfDevices();
//tdClose();
return 0;
}
/*
int getNumberOfDevices() {
int num = tdGetNumberOfDevices();
return num;
}*/
I wanted to try removing: __attribute__ ((visibility("default")))
It removed the error, but caused other errors of course.. not unexpected
Tellstick Duo is my motivation to learn another programming language. I'm really looking forward to making software with c++ for tellstick