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 242 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: 117
Registered: March 2016
Senior 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: 1560
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: 199
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 messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

I moved the scokahnd.h arround. But couldn't see a difference.
Re: winsock2.h error when build FORTE [message #1816992 is a reply to message #1801333] Wed, 13 November 2019 13:39 Go to previous messageGo to next message
René Lindorfer is currently offline René LindorferFriend
Messages: 1
Registered: November 2019
Junior Member
Hello,

I have the same issue when building forte with open62541.

forte:
Revision: f435b4e3b34e2a240ef48e52f2c06cc890a5204c
Merge branch '1.11.x' for 1.11.0 release

open62541:
Revision: 280012ee016e2f42ab9b1386174a8c12e6b29821
Message:
Included plugin/log.h cleanup in UA_Client_delete(..).


Kind regards,
René


Re: winsock2.h error when build FORTE [message #1817207 is a reply to message #1816992] Mon, 18 November 2019 14:46 Go to previous message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi,

you're right. That's a problem that happens in VS. We managed once by moving the includes, but I couldn't handle with the OPC UA module.

Here another user experienced the same problem https://www.eclipse.org/forums/index.php/t/1101178/

Unfortunately the only solution now is to use with mingw-w64 https://sourceforge.net/projects/mingw-w64/

There's already a bug report for this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=551161
Previous Topic:OPC READ question
Next Topic:Calculate Time difference in 4diac
Goto Forum:
  


Current Time: Fri Mar 29 15:46:58 GMT 2024

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

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

Back to the top