Support Board
Date/Time: Fri, 22 Nov 2024 13:29:29 +0000
Compile output error question
View Count: 2011
[2013-05-06 13:31:02] |
User22396 - Posts: 191 |
I am trying to learn how to modify some existing studies but i keep getting some build errors... 1) I create a new cpp file called 'TestOHLC.cpp' via the analysis> New/Open Custom Studies File 2) Copy the existing 'DailyOHLC' code from the studies7.cpp (line7398-7613) 3) #include "sierrachart.h" along with SCDLLName("TestOHLC") 4) save and close 5) Analysis> Build Custom Studies DLL 6) Build Output: -- Starting build of Custom Studies Source File: TestOHLC.cpp. -- 16:00:10 "C:\SierraChart\CPPCompiler\bin\g++.exe" "C:\SierraChartTESTING\ACS_Source\TestOHLC.cpp" -march=i686 -mtune=i686 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -o "C:\SierraChartTESTING\Data\TestOHLC.dll" C:\SierraChartTESTING\ACS_Source\TestOHLC.cpp: In function 'void scsf_DailyOHLC(SCStudyInterfaceRef)': C:\SierraChartTESTING\ACS_Source\TestOHLC.cpp:161:5: error: 'CalculateDailyOHLC' was not declared in this scope -- End of Build -- 16:00:11 I have succesfully built some easy custom studies by modifying some examples but here i am not modifying anything? What am i doing wrong? Am i missing some references which i have seen in some more advanced code? #include <iterator> #include <windows.h> #include "scstudyfunctions.h" I was able to create and modify a test study by copying the 'round tick' study from studies6.cpp (lines 3053-3078) and it complied just fine... so not sure where i am going wrong on these more complex studies? thanks b |
[2013-05-06 13:32:36] |
User22396 - Posts: 191 |
if i add "#include "scstudyfunctions.h" to the header i get this error instead... C:\Windows\ccDifEK5.o:TestOHLC.cpp:(.text+0x1d19): undefined reference to `CalculateDailyOHLC(s_sc&, int, int, int, int, int, int, SCGraphData&, SCDateTimeArray&, int, float&, float&, float&, float&)' collect2.exe: error: ld returned 1 exit status -- End of Build -- 07:31:50 what am i missing? thanks b |
[2013-05-07 00:55:03] |
Sierra Chart Engineering - Posts: 104368 |
You need to open the SCStudyFunctions.cpp file and take a copy of the CalculateDailyOHLC function and put it into your own source code cpp file and put it above your study function.
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-05-07 02:58:16] |
User22396 - Posts: 191 |
thanks for the reply...will give it a go
|
To post a message in this thread, you need to log in with your Sierra Chart account: