Compilation error Telldus-core-2.1.1

Moderator: Telldus

Post Reply
houlalajaimal
Posts: 2
Joined: Fri Mar 17, 2023 9:45 am

Compilation error Telldus-core-2.1.1

Post 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 ?
houlalajaimal
Posts: 2
Joined: Fri Mar 17, 2023 9:45 am

Re: Compilation error Telldus-core-2.1.1

Post 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
snis
Posts: 7
Joined: Fri Mar 17, 2023 9:45 am

Re: Compilation error Telldus-core-2.1.1

Post by snis »

Thanks houlalajaimal!!

Worked like a charm!
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: Compilation error Telldus-core-2.1.1

Post by micke.prag »

Fixed in the next version:
http://developer.telldus.com/ticket/216
Micke Prag
Software
Telldus Technologies
Post Reply