Support Board
Date/Time: Tue, 26 Nov 2024 09:52:28 +0000
Post From: Provided .cpp won't compile
[2023-12-17 00:54:22] |
j4ytr4der_ - Posts: 938 |
I'm trying to work with the Trading System Based On Alert Condition source code provided with SC. On attempting to compile it however (after I give it a DLL name), I get the following error: In file included from scstructures.h:109,
from sierrachart.h:22, from TradingSystemBasedOnAlertCondition.cpp:1: In constructor 'SCString::SCString(const char*)', inlined from 'void scsf_TradingSystemBasedOnAlertCondition(SCStudyInterfaceRef)' at TradingSystemBasedOnAlertCondition.cpp:272: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:735:36: note: length computed here 735 | const size_t StringLength = strlen(String); | ~~~~~~^~~~~~~~ -- End of Build -- 18:50:39 This appears to be an internal issue I can't do anything about. Is there some fix for this? I'm running build 2568. |