Page 1 of 1

Compilation error Telldus-core-2.1.1

Posted: Fri Mar 17, 2023 9:45 am
by houlalajaimal
HI,

I try to compile telldus-core-2.1.1 on archlinux but I get this error:

/telldus-core-2.1.1/common/Socket_unix.cpp: In destructor virtual TelldusCore::Socket::~Socket()
/telldus-core-2.1.1/common/Socket_unix.cpp:44:18: erreur: close was not declared in this scope

The code in Socket_unix.cpp

Socket::~Socket(void) {
if(d->socket){
close(d->socket);
}
delete d;
}


I'm on Archlinux 3.1.10-11-ARCH on armv5tel

any idea ?

Re: Compilation error Telldus-core-2.1.1

Posted: Fri Mar 17, 2023 9:45 am
by houlalajaimal
I found !!!

Need to add the include <unistd.h> for linux in the common/Socket.h

FROM

#ifdef _WINDOWS
7 #include <windows.h>
8 typedef HANDLE SOCKET_T;
9 #else
10 typedef int SOCKET_T;
11 #endif

TO


#ifdef _WINDOWS
7 #include <windows.h>
8 typedef HANDLE SOCKET_T;
9 #else
#include <unistd.h>
10 typedef int SOCKET_T;
11 #endif

Re: Compilation error Telldus-core-2.1.1

Posted: Fri Mar 17, 2023 9:45 am
by snis
Thanks houlalajaimal!!

Worked like a charm!

Re: Compilation error Telldus-core-2.1.1

Posted: Fri Mar 17, 2023 9:45 am
by micke.prag
Fixed in the next version:
http://developer.telldus.com/ticket/216