Support Board
Date/Time: Tue, 13 May 2025 20:50:39 +0000
Error compiling Studies6.cpp
View Count: 1283
[2016-04-28 22:34:26] |
rhovega - Posts: 279 |
Tried to compile Studies6.cpp as is, without any modifications. I simply added an SCDLLName and attempted to compile from within Sierra. Get a series of errors. Is this within the scope of support? -- Starting build of Custom Studies Source files: Studies6.cpp. -- 18:30:40 "R:\SierraChart\CPPCompiler\bin\g++.exe" "R:\SierraChart\ACS_Source\Studies6.cpp" -march=i686 -mtune=i686 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -std=gnu++11 -o "R:\SierraChart\Data\Studies6.dll" R:\SierraChart\ACS_Source\Studies6.cpp: In function 'void scsf_WriteBarDataToFile(SCStudyInterfaceRef)': R:\SierraChart\ACS_Source\Studies6.cpp:3137:48: error: 'sprintf_s' was not declared in this scope sprintf_s(MillisecondsText,".%d",millisecond); ^ R:\SierraChart\ACS_Source\Studies6.cpp:3143:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] formatString = "%s %.2d:%.2d:%.2d%s %s %s %s %s %.0f %.0f %.0f %.0f\r\n"; ^ R:\SierraChart\ACS_Source\Studies6.cpp:3146:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] formatString = "%s, %.2d:%.2d:%.2d%s, %s, %s, %s, %s, %.0f, %.0f, %.0f, %.0f\r\n"; ^ R:\SierraChart\ACS_Source\Studies6.cpp:3151:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] formatString = "%s\t%.2d:%.2d:%.2d%s\t%s\t%s\t%s\t%s\t%.0f\t%.0f\t%.0f\t%.0f\r\n"; ^ R:\SierraChart\ACS_Source\Studies6.cpp: In function 'void scsf_InitialBalance(SCStudyInterfaceRef)': R:\SierraChart\ACS_Source\Studies6.cpp:4270:79: error: operands to ?: have different types 'int' and 'SCDateTime' SCDateTime PrevBarDateTime = sc.Index == 0 ? 0 : sc.BaseDateTimeIn[sc.Index-1]; ^ -- End of Build -- 18:30:44 |
[2016-04-29 04:45:39] |
|
Yes we can help with this. We already went through and fixed these errors which occur in the compiler you are using. This will be out in the next release in a couple of days. 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 Date Time Of Last Edit: 2016-04-29 04:46:30
|
[2016-05-01 01:53:10] |
rhovega - Posts: 279 |
I just updated Sierra to version 1402 and also reinstalled the compiler. Exact same error when trying to compile Studies6.cpp.
|
[2016-05-01 05:40:35] |
|
Either we have not yet released the changes or you are not working with the latest file. Otherwise, it is not possible to have these same errors because each and every one was solved for the compiler that you are using.
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 Date Time Of Last Edit: 2016-05-01 05:41:06
|
[2016-05-02 04:07:13] |
rhovega - Posts: 279 |
Downloaded 1403 and redownloaded compiler and it works now. Yet before I had to delete scsf_SwingHighAndLow from studies6.cpp. Otherwise it fails to compile with the following error: -- Starting build of Custom Studies Source files: Studies6.cpp. -- 00:04:04 "R:\SierraChart\CPPCompiler\bin\g++.exe" "R:\SierraChart\ACS_Source\Studies6.cpp" -march=i686 -mtune=i686 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -std=gnu++11 -o "R:\SierraChart\Data\Studies6.dll" C:\Windows\cclGYCRa.o:Studies6.cpp:(.text+0x9dfa): undefined reference to `IsSwingHighAllowEqual_S(s_sc&, int, int, int)' C:\Windows\cclGYCRa.o:Studies6.cpp:(.text+0xa09a): undefined reference to `IsSwingLowAllowEqual_S(s_sc&, int, int, int)' collect2.exe: error: ld returned 1 exit status -- End of Build -- 00:04:08 |
[2016-05-02 05:21:36] |
|
Yes you will need to remove scsf_SwingHighAndLow.
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: