Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » winsock2.h error when build FORTE(error when build forte with open62541 using VS 2015)
winsock2.h error when build FORTE [message #1801333] Thu, 17 January 2019 05:00 Go to next message
Stefanus Yudi is currently offline Stefanus YudiFriend
Messages: 15
Registered: November 2018
Junior Member
Morning all i've some problem in building forte with open62541 for my project,

i have read the instruction on https://www.eclipse.org/4diac/en_help.php?helppage=html/communication/opc_ua.html about configuring forte, and follow step by step in Windows with Visual Studio part. Acctually i'm using VS 2015 Community edition right now.

But at step 15 i got stuck with error, i attach with this post.

Is there anyone could help me solve this error?

Many thanks
  • Attachment: Capture.PNG
    (Size: 77.04KB, Downloaded 115 times)
Re: winsock2.h error when build FORTE [message #1801350 is a reply to message #1801333] Thu, 17 January 2019 11:03 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 73
Registered: March 2016
Member
Hi,

try to undefine IN in the opcua_handler. Some windows header add the preprocessor symbols IN and OUT, which can clash with FORTE code.

Best regards,
Martin
Re: winsock2.h error when build FORTE [message #1804788 is a reply to message #1801350] Mon, 01 April 2019 09:35 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
As we stumbled across the same problem today and after a longer search the problem is not to add undefs for IN and OUT but to remove them. I had to remove the undefs from forte_config.h.in and from funcblock.h. Unfortunately I could not figure out how winsock2.h was included in opcua_handler to better narrow this down. Does anyone know how to get an include hierarchy out of Visual Studio?
Re: winsock2.h error when build FORTE [message #1804974 is a reply to message #1804788] Thu, 04 April 2019 07:11 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 136
Registered: February 2016
Senior Member
opcua handler includes sockhand.h if FORTE_COM_OPC_UA_CUSTOM_HOSTNAME is not defined, so the function "gethostname" can be used. IMHO the IN and OUT problem won't go away easily. A solution will be to restrict including of system headers to the arch folder and maybe to a single file there. This will create a bottle neck but also allow to take of the IN and OUT there. Any file who wants to use a system header, will just include this file.
Re: winsock2.h error when build FORTE [message #1805002 is a reply to message #1804974] Thu, 04 April 2019 12:52 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
I moved the scokahnd.h arround. But couldn't see a difference.
Previous Topic:compiling error with ev3dev parameters code
Next Topic:c++ SIFB code monitoring
Goto Forum:
  


Current Time: Thu Aug 22 00:41:25 GMT 2019

Powered by FUDForum. Page generated in 0.03229 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top