Support Board
Date/Time: Mon, 25 Nov 2024 02:01:35 +0000
Get error during compilation
View Count: 2013
[2013-12-20 06:01:48] |
User52100 - Posts: 2 |
As per suggest of yours i disable code on my file. but still get below error please suggest it. Starting build of Custom Studies Source files: DeltaDivergence_Gilad-EXPLANATIONS_v5.cpp. -- 11:24:33 "C:\SierraChart\CPPCompiler\bin\g++.exe" "C:\SierraChart\ACS_Source\DeltaDivergence_Gilad-EXPLANATIONS_v5.cpp" -march=i686 -mtune=i686 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -o "C:\SierraChart\Data\DeltaDivergence_Gilad-EXPLANATIONS_v5.dll" In file included from C:\SierraChart\ACS_Source\DeltaDivergence_Gilad-EXPLANATIONS_v5.cpp:7:0: c:\sierrachart\cppcompiler\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h: In member function 'int std::basic_string<_CharT, _Traits, _Alloc>::compare(const std::basic_string<_CharT, _Traits, _Alloc>&) const': C:\SierraChart\ACS_Source\sierrachart.h:37:29: error: expected unqualified-id before '(' token #define min(a,b) (((a) < (b)) ? (a) : (b)) ^ c:\sierrachart\cppcompiler\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.tcc: In member function 'std::basic_string<_CharT, _Traits, _Alloc>::size_type std::basic_string<_CharT, _Traits, _Alloc>::rfind(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type) const': C:\SierraChart\ACS_Source\sierrachart.h:37:29: error: expected unqualified-id before '(' token #define min(a,b) (((a) < (b)) ? (a) : (b)) ^ c:\sierrachart\cppcompiler\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.tcc: In member function 'int std::basic_string<_CharT, _Traits, _Alloc>::compare(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const std::basic_string<_CharT, _Traits, _Alloc>&) const': C:\SierraChart\ACS_Source\sierrachart.h:37:29: error: expected unqualified-id before '(' token #define min(a,b) (((a) < (b)) ? (a) : (b)) ^ c:\sierrachart\cppcompiler\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.tcc: In member function 'int std::basic_string<_CharT, _Traits, _Alloc>::compare(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const std::basic_string<_CharT, _Traits, _Alloc>&, std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type) const': C:\SierraChart\ACS_Source\sierrachart.h:37:29: error: expected unqualified-id before '(' token #define min(a,b) (((a) < (b)) ? (a) : (b)) ^ c:\sierrachart\cppcompiler\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.tcc: In member function 'int std::basic_string<_CharT, _Traits, _Alloc>::compare(const _CharT*) const': C:\SierraChart\ACS_Source\sierrachart.h:37:29: error: expected unqualified-id before '(' token #define min(a,b) (((a) < (b)) ? (a) : (b)) ^ c:\sierrachart\cppcompiler\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.tcc: In member function 'int std::basic_string<_CharT, _Traits, _Alloc>::compare(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _CharT*) const': C:\SierraChart\ACS_Source\sierrachart.h:37:29: error: expected unqualified-id before '(' token #define min(a,b) (((a) < (b)) ? (a) : (b)) ^ c:\sierrachart\cppcompiler\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.tcc: In member function 'int std::basic_string<_CharT, _Traits, _Alloc>::compare(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type) const': C:\SierraChart\ACS_Source\sierrachart.h:37:29: error: expected unqualified-id before '(' token #define min(a,b) (((a) < (b)) ? (a) : (b)) ^ C:\SierraChart\ACS_Source\DeltaDivergence_Gilad-EXPLANATIONS_v5.cpp: In function 'void scsf_DeltaDivergence(SCStudyInterfaceRef)': C:\SierraChart\ACS_Source\DeltaDivergence_Gilad-EXPLANATIONS_v5.cpp:117:30: error: 'DRAWSTYLE_DONOTDRAW' was not declared in this scope tSetupSubgraph.DrawStyle = DRAWSTYLE_DONOTDRAW; ^ -- End of Build -- 11:24:39 |
[2013-12-20 06:10:11] |
Sierra Chart Engineering - Posts: 104368 |
Post the first 20 lines of the source code file here , so we can have a look.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2013-12-23 05:03:58] |
User52100 - Posts: 2 |
#include "sierrachart.h" #include <string> SCDLLName("Gilad") //SCDLLInit("Delta Divergence Gilad"); /***********************************************************************/ SCSFExport scsf_DeltaDivergence(SCStudyGraphRef sc) { SCSubgraphRef ddVolSubgraph = sc.Subgraph[0]; SCSubgraphRef ddBuySubgraph = sc.Subgraph[1]; SCSubgraphRef buyPriceSubgraph = sc.Subgraph[2]; SCSubgraphRef ddSellSubgraph = sc.Subgraph[3]; SCSubgraphRef sellPriceSubgraph = sc.Subgraph[4]; SCSubgraphRef ma1Subgraph = sc.Subgraph[5]; SCSubgraphRef ma2Subgraph = sc.Subgraph[6]; SCSubgraphRef tSetupSubgraph = sc.Subgraph[7]; SCSubgraphRef stSubgraph = sc.Subgraph[8]; SCSubgraphRef btSubgraph = sc.Subgraph[9]; SCSubgraphRef sslSubgraph = sc.Subgraph[10]; SCSubgraphRef bslSubgraph = sc.Subgraph[11]; SCSubgraphRef lossCntSubgraph = sc.Subgraph[12]; SCSubgraphRef winCntSubgraph = sc.Subgraph[13]; SCSubgraphRef lossPLSubgraph = sc.Subgraph[14]; SCSubgraphRef winPLSubgraph = sc.Subgraph[15]; SCSubgraphRef test = sc.Subgraph[16]; SCInputRef version = sc.Input[0]; SCInputRef useCumVolInput = sc.Input[1]; SCInputRef volTypeInput = sc.Input[2]; SCInputRef ddModeInput = sc.Input[3]; SCInputRef useCSTInput = sc.Input[4]; SCInputRef ddPeriodInput = sc.Input[5]; SCInputRef ma1Input = sc.Input[6]; SCInputRef ma2Input = sc.Input[7]; SCInputRef maTypeInput = sc.Input[8]; SCInputRef maInputDataInput = sc.Input[9]; SCInputRef ddOffsetInput = sc.Input[10]; SCInputRef maZoneInput = sc.Input[11]; SCInputRef sigZoneInput = sc.Input[12]; SCInputRef tradeModeInput = sc.Input[13]; //if to get in this bar(false) or when it's broken on next bar (true) SCInputRef tPriceInput = sc.Input[14]; if(sc.SetDefaults) { sc.GraphName="Delta Divergence Gilad"; sc.StudyDescription="Delta Divergence Gilad checking how to b.t."; ddVolSubgraph.Name = "Delta Volume"; /* ddVolSubgraph.DrawStyle = DRAWSTYLE_DONOTDRAW; */ //ddVolSubgraph.DrawStyle = DRAWSTYLE_TEXT; //ddVolSubgraph.DrawStyleText ="ddVolSubgraph"; //ddVolSubgraph.PrimaryColor = RGB(0, 255, 0); //ddVolSubgraph.Line Width = 10; ddVolSubgraph.TextDrawStyleText ="ddVolSubgraph"; ddVolSubgraph.LineWidth = 2; ddBuySubgraph.Name = "Delta Divergence Buy"; ddBuySubgraph.DrawStyle = DRAWSTYLE_ARROWUP; ddBuySubgraph.PrimaryColor = RGB(0, 255, 0); ddBuySubgraph.LineWidth = 2; buyPriceSubgraph.Name = "Buy Price"; buyPriceSubgraph.DrawStyle = DRAWSTYLE_DASH; buyPriceSubgraph.PrimaryColor = RGB(128,255,128); buyPriceSubgraph.LineWidth = 4; ddSellSubgraph.Name = "Delta Divergence Sell"; ddSellSubgraph.DrawStyle = DRAWSTYLE_ARROWDOWN; ddSellSubgraph.PrimaryColor = RGB(255, 0, 0); ddSellSubgraph.LineWidth = 2; sellPriceSubgraph.Name = "Sell Price"; sellPriceSubgraph.DrawStyle = DRAWSTYLE_DASH; sellPriceSubgraph.PrimaryColor = RGB(255,128,128); sellPriceSubgraph.LineWidth = 4; |
[2013-12-23 08:40:33] |
Sierra Chart Engineering - Posts: 104368 |
Refer to this section here: http://www.sierrachart.com/index.php?l=doc/doc_CreatingDLLs.html#UsingHeaderFiles Change the beginning of your source code file like the following: #include <string>
#include "sierrachart.h" SCDLLName("Gilad") Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: