Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 18:30:33 +0000



Post From: Remote Build for GDIExample.cpp gives errors about use of deleted functions

[2023-11-05 02:51:27]
User719512 - Posts: 264
Hi Sierra Chart Engineering,

I noticed that your remote build service fails to compile GDIExample.cpp. Gives a many errors about use of deleted functions and such.

I even trimmed the study down to something trivial and got the following output.


-- Starting remote build of Custom Studies Source files: GDIExample.cpp. 64-bit -- 19:45:55

Allow time for the server to compile the files and build the DLL.

The remote build did not succeed. Result:

GDIExample.cpp: In function 'void DrawToChart(HWND, HDC, SCStudyInterfaceRef)':
GDIExample.cpp:28:27: error: use of deleted function 'n_ACSIL::s_GraphicsBrush::s_GraphicsBrush()'
28 | n_ACSIL::s_GraphicsBrush GraphicsBrush;
| ^~~~~~~~~~~~~
In file included from sierrachart.h:22,
from GDIExample.cpp:1:
scstructures.h:3383:8: note: 'n_ACSIL::s_GraphicsBrush::s_GraphicsBrush()' is implicitly deleted because the default definition would be ill-formed:
3383 | struct s_GraphicsBrush
| ^~~~~~~~~~~~~~~
scstructures.h:3383:8: error: use of deleted function 'n_ACSIL::s_GraphicsColor::s_GraphicsColor()'
scstructures.h:3337:8: note: 'n_ACSIL::s_GraphicsColor::s_GraphicsColor()' is implicitly deleted because the default definition would be ill-formed:
3337 | struct s_GraphicsColor
| ^~~~~~~~~~~~~~~
scstructures.h:3337:8: error: use of deleted function 'n_ACSIL::s_GraphicsColor::u_Color::u_Color()'
scstructures.h:3339:8: note: 'n_ACSIL::s_GraphicsColor::u_Color::u_Color()' is implicitly deleted because the default definition would be ill-formed:
3339 | union u_Color
| ^~~~~~~
scstructures.h:3349:5: error: union member 'n_ACSIL::s_GraphicsColor::u_Color::RGB' with non-trivial 'constexpr n_ACSIL::s_GraphicsColor::u_Color::<unnamed struct>::<constructor>()'
3349 | } RGB;
| ^~~

-- End of Build -- 19:46:00


This is the (modified) file I used for compliation: GDIExample.cpp


#include "sierrachart.h"

SCDLLName("GDI Example")

void DrawToChart(HWND WindowHandle, HDC DeviceContext, SCStudyInterfaceRef sc);


SCSFExport scsf_DrawToChartExample(SCStudyInterfaceRef sc)
{
  if (sc.SetDefaults)
  {
    // Set the configuration and defaults

    sc.GraphName = "Draw To Chart Example";
    sc.GraphRegion = 0;

    sc.AutoLoop = 0;
    return;
  }

  sc.p_GDIFunction = DrawToChart;


}

void DrawToChart(HWND WindowHandle, HDC DeviceContext, SCStudyInterfaceRef sc )
{
  n_ACSIL::s_GraphicsBrush GraphicsBrush;
  return;
}