Hello,
I'm not an expert and I try to cross-compile linknx but I get this error:
i686-linux-gnu-g++-4.7.2: warning:/build.Generic.i386-devel/toolchain/i686-openelec-linux-gnu/sysroot/usr/include/: linker input file unused because linking not done
In file included from ioport.h:29:0,
from ioport.cpp:22:
ruleserver.h: In static member function 'static void RuleServer::reset()':
ruleserver.h:566:20: warning: deleting object of polymorphic class type 'RuleServer' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
ioport.cpp: In destructor 'virtual UdpIOPort::~UdpIOPort()':
ioport.cpp:237:23: error: 'close' was not declared in this scope
ioport.cpp: In destructor 'virtual TcpClientIOPort::~TcpClientIOPort()':
ioport.cpp:330:23: error: 'close' was not declared in this scope
ioport.cpp: In member function 'void TcpClientIOPort::disconnectFromServer()':
ioport.cpp:432:23: error: 'close' was not declared in this scope
ioport.cpp: In destructor 'virtual SerialIOPort::~SerialIOPort()':
ioport.cpp:448:19: error: 'close' was not declared in this scope
ioport.cpp: In member function 'virtual void SerialIOPort::exportXml(ticpp::Element*)':
ioport.cpp:649:39: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
ioport.cpp: In member function 'virtual void TxAction::importXml(ticpp::Element*)':
ioport.cpp:727:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ioport.cpp: In member function 'virtual void TxAction::exportXml(ticpp::Element*)':
ioport.cpp:763:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
make[2]: *** [ioport.o] Error 1
make[2]: Leaving directory `/build.Generic.i386-devel/linknx-0.0.1.30/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/build.Generic.i386-devel/linknx-0.0.1.30'
make: *** [all] Error 2
Does someone know this error and has an solution what I could try to fix?
with Greetings Axel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From the error message "error: 'close' was not declared in this scope", it seems that the function 'close' is not defined, but this function is defined in included file <sys/socket.h>.
There is also a strange message "linker input file unused because linking not done" reported for file ioport.h at line 29, which is very close to the #include <sys/socket.h> line.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm not an expert and I try to cross-compile linknx but I get this error:
Does someone know this error and has an solution what I could try to fix?
with Greetings Axel
Hi,
From the error message "error: 'close' was not declared in this scope", it seems that the function 'close' is not defined, but this function is defined in included file <sys/socket.h>.
There is also a strange message "linker input file unused because linking not done" reported for file ioport.h at line 29, which is very close to the #include <sys/socket.h> line.
Hi,
The problem is perhaps due to a change in GCC 4.7.
You can try to add the following line at top of file ioports.cpp :
#include <unistd.h>
and see if it fixes the problem (this bugfix is already in CVS and will be included in next release)
Last edit: jef2000 2013-02-17
I'm having the same compilation error on a debian amd64 platform.
I'v tried the fix, and it works, thanks
Last edit: Brecht 2013-09-14