Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 07:46:24 +0000



Post From: Error in building DLL

[2013-09-17 02:54:48]
gabby alindogan - Posts: 49
Hi. I am a new paid user and am trying to graph a closing price. I followed the example in one of the tutorials "Step by step instruction to create an adv custom study" and am getting DLL build errors.

Here is the code.

#include "sierrachart.h"
#include "scstudyfunctions.h"
SCDLLName("Fx Trading Studies DLL")
SCSFExport scsf_TestBars(SCStudyInterfaceRef sc)
{
  if (sc.SetDefaults)
  {
    sc.GraphName = "My first Graph" ;
    sc.SubGraph[0].Name = " Test of array";
    sc.AutoLoop=1;
    sc.FreeDLL = 1;
    return;
  }
   sc.SubGraph[0][sc.Index] = sc.Close[sc.Index];
   return;
}

Here is DLL error message.
- Starting build of Custom Studies Source File: Fx.cpp. -- 22:52:27
"C:\SierraChart\CPPCompiler\bin\g++.exe" "C:\SierraChart\ACS_Source\Fx.cpp" -march=i686 -mtune=i686 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -o "C:\SierraChart\Data\Fx.dll"

C:\SierraChart\ACS_Source\Fx.cpp: In function 'void scsf_TestBars(SCStudyInterfaceRef)':
C:\SierraChart\ACS_Source\Fx.cpp:18:6: error: 'struct s_sc' has no member named 'SubGraph'
sc.SubGraph[0].Name = " Test of array";
^
C:\SierraChart\ACS_Source\Fx.cpp:25:6: error: 'struct s_sc' has no member named 'SubGraph'
sc.SubGraph[0][sc.Index] = sc.Close[sc.Index];
^
-- End of Build -- 22:52:28

THANKS!