Login Page - Create Account

Support Board


Date/Time: Fri, 22 Nov 2024 12:57:58 +0000



Post From: ERRPR: Differing values for pack size within the same class (4, 8)

[2024-10-19 09:42:37]
skalaydzhiyski - Posts: 55
Hi guys,

I am building a trading system entirely using ACSIL + Visual Studio 2022 with C++20 standard features. I wanted to build it following modern C++ guidelines using modules.

This being said, whenever i try to import sierrachart.h in my module .ixx file I am getting
Severity  Code  Description  Project  File  Line  Suppression State  Details
Error  C3614  Differing values for pack size within the same class; previous was was '8', new value is '4'  phitech  C:\Users\spask\source\repos\phitech\paths.ixx  13    

my module file is the simplest possible file:

export module paths;
#include "sierrachart.h"

export namespace phitech
{
namespace paths
{

inline const SCString backtest_trade_stats_path = "C:\\trading\\backtest\\output";

} // namespace backtest
} // namespace phitech

From reading through teh code this is happening because internally for the struct s_SCInput_145 there are some unions with packing set to 4 bytes, but I didn't find any reasonable solution that doesn't include modifying the sierra source code (which I would reaaaaly like to avoid).

I can always revert back to headers worse comes to worst, but I just wanted to check if you have come across this before.

P.S. I am not a C++ guru, hence my post here.