Login Page - Create Account

Support Board


Date/Time: Sun, 22 Dec 2024 08:08:36 +0000



Issue with sc.TitleBarName

View Count: 1053

[2015-04-24 19:22:01]
Marek F - Posts: 244
I can't compile my studies because appears this error:

-- Starting build of Custom Studies Source files: My-System-DLL.cpp. -- 20:56:14

"D:\SierraChart\CPPCompiler\bin\g++.exe" "D:\SierraChart2\ACS_Source\My-System-DLL.cpp" -march=i686 -mtune=i686 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -o "D:\SierraChart2\Data\My-System-DLL.dll"

D:\SierraChart2\ACS_Source\My-System-DLL.cpp: In function 'void scsf_Reversal(SCStudyInterfaceRef)':
D:\SierraChart2\ACS_Source\My-System-DLL.cpp:7153:76: error: cannot pass objects of non-trivially-copyable type 'class SCString' through '...'
AlertText.Format("Reversal Long - %s", sc.TitleBarName);
^

-- End of Build -- 20:56:15

A code in CPP file is:
SCString AlertText;

AlertText.Format("Reversal Long - %s", sc.TitleBarName);
sc.SetAlert(AlertNumber, Index, AlertText);

I have no problem with compile it by Visual Studio. The issue is only if i use the compiler in Sierra Chart. How to fix it?

Best regards,
Marek


[2015-04-25 00:30:26]
Sierra Chart Engineering - Posts: 104368
Change to this:
AlertText.Format("Reversal Long - %s", sc.TitleBarName.GetChars());
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:

Login

Login Page - Create Account