Support Board
Date/Time: Mon, 27 Oct 2025 16:12:42 +0000
[Programming Help] - Remote compiling issue
View Count: 383
| [2025-01-22 00:14:03] |
| User327556 - Posts: 7 |
|
Hi, I have been trying to code an indicator but for some reason this error message keeps popping up when I try to compile it. It seems to say that there is a string length overflow, however im not using any strings in the study. How do I fix this? Kind regards, Server: https://build3.sierrachart.com The remote build is complete. The build failed. In file included from scstructures.h:109, from sierrachart.h:22, from zigzag_period.cpp:1: In constructor 'SCString::SCString(const char*)', inlined from 'void scsf_TradingSystemBasedOnAlertCondition(SCStudyInterfaceRef)' at zigzag_period.cpp:562:54: SCString.h:174:11: warning: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Wstringop-overflow=] 174 | strncpy(m_String, SourceString, StringLength); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SCString.h: In function 'void scsf_TradingSystemBasedOnAlertCondition(SCStudyInterfaceRef)': SCString.h:772:36: note: length computed here 772 | const size_t StringLength = strlen(String); |
| [2025-01-22 21:16:02] |
| Sierra_Chart Engineering - Posts: 21231 |
|
We are looking this over and thinking about it.
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, use the Teton service: Sierra Chart Teton Futures Order Routing |
| [2025-01-22 21:31:04] |
| Sierra_Chart Engineering - Posts: 21231 |
|
In the Trading System Based on Alert Condition source code, there is a section of code like this and needs to be changed as follows: if (FormulaResult == r_PriorFormulaState)
{ TradeNotAllowedReason = "Formula state has not changed. Current state: "; if (FormulaResult != 0) TradeNotAllowedReason += "True"; else TradeNotAllowedReason += "False"; StateHasChanged = false; } 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, use 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:
