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 » Error C2466 when compiling
Error C2466 when compiling [message #1848228] Thu, 25 November 2021 13:38 Go to next message
Wolfgang Trischnigg is currently offline Wolfgang TrischniggFriend
Messages: 45
Registered: April 2016
Member
Hello,

first of all I'm using IDE and FORTE 2.0.0; CMAKE 3.22.0; VS 2022

I always get the error
"C2466 Zuordnung eines Arrays der konstanten Größe 0 nicht möglich"

When i click on the error it points to:
- const SCFB_FBParameter FORTE_AIT::scm_astParamters[] = {

- const SCFB_FBFannedOutConnectionData FORTE_AIT::scm_astFannedOutEventConnections[] = {};

- const SCFB_FBFannedOutConnectionData FORTE_AIT::scm_astFannedOutDataConnections[] = {};

Can you please give me a hint, what I can do?

Best regards,
Wolfgang

[Updated on: Thu, 25 November 2021 15:40]

Report message to a moderator

Re: Error C2466 when compiling [message #1848257 is a reply to message #1848228] Fri, 26 November 2021 07:33 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi Wolfgang,

I fear we have hear a bug in the C++ exporter. Could I have the fbt file of this CFB? As last time E-Mail is fine.

BR,
Alois
Re: Error C2466 when compiling [message #1848333 is a reply to message #1848257] Sun, 28 November 2021 15:15 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Thanks for providing your FB for tests. It seems we have here a difference between GCC (where I do most of my 4diac FORTE work with) and the MSVS C++ compiler. The problem is that we have some arrays where we very lately in the code generation process know if they have content or not. We so far made them empty and didn't use them. GCC was happy with that. MSVS C++ not. I would say the latter is correct and we shouldn't generate these empty initialization. I created a bug report [1] and a first fix [2] for the problem. As soon as it is merged we will finally do the long overdue 2.0.1 maintenance release.

In the mean-time, as work around you can just remove the three lines (including maybe the following line with the closing '};'). I would also be interested if this is then compiling with MSVS C++. Otherwise I would need to do more changes to our exporter.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=577503
[2] https://git.eclipse.org/r/c/4diac/org.eclipse.4diac.ide/+/188225
Re: Error C2466 when compiling [message #1848402 is a reply to message #1848333] Wed, 01 December 2021 10:34 Go to previous messageGo to next message
Martin Melik Merkumians is currently offline Martin Melik MerkumiansFriend
Messages: 117
Registered: March 2016
Senior Member
Hi Wolfgang,

this should now work (https://git.eclipse.org/r/c/4diac/org.eclipse.4diac.ide/+/188225) and is available on the 2.0.x branch.

Best regards,
Martin
Re: Error C2466 when compiling [message #1848663 is a reply to message #1848402] Mon, 13 December 2021 10:34 Go to previous message
Wolfgang Trischnigg is currently offline Wolfgang TrischniggFriend
Messages: 45
Registered: April 2016
Member
Hi Martin,

thank you! I will try.

Best reagrds
Wolfgang
Previous Topic:Run New basic FB in 4diac IDE and forte
Next Topic:lua51.dll not recognized
Goto Forum:
  


Current Time: Sat Apr 27 19:41:35 GMT 2024

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

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

Back to the top