Login Page - Create Account

Support Board


Date/Time: Sun, 06 Jul 2025 09:01:44 +0000



Why does this test cpp keep getting the same error?

View Count: 77

[2025-06-25 13:37:17]
User520975 - Posts: 6
Why does this cpp keep getting the same error?

#include "sierrachart.h"

SCDLLName("TestStudy")

SCSFExport int scsf_TestStudy(SCStudyInterfaceRef s_sc)
{
if (s_sc.SetDefaults)
{
s_sc.GraphName = "Test Study";
s_sc.Subgraph[0].Name = "Test Line";
s_sc.Subgraph[0].DrawStyle = DRAWSTYLE_LINE;
s_sc.Subgraph[0].PrimaryColor = RGB(0, 255, 0);
s_sc.AutoLoop = 1;
return 0;
}

for (int i = s_sc.UpdateStartIndex; i < s_sc.ArraySize; i++)
s_sc.Subgraph[0] = 100.0;

return 0;
}

Here is the error.



-- Starting remote build of Custom Studies Source files: Test.cpp. 64-bit -- 13:18:06

Allow time for the server to compile the files and build the DLL.

Server: https://build.sierrachart.com
The remote build is complete.
The build failed.
Test.cpp:6:55: error: two or more data types in declaration of 'scsf_TestStudy'
6 | SCSFExport int scsf_TestStudy(SCStudyInterfaceRef s_sc)
| ^

Failed to generate the dll file.

-- End of Build -- 13:18:09

Date Time Of Last Edit: 2025-06-25 13:38:50
[2025-06-25 14:38:43]
User431178 - Posts: 733
This is wrong, the "int" is screwing it up.


SCSFExport int scsf_TestStudy(SCStudyInterfaceRef s_sc)

should be

SCSFExport scsf_TestStudy(SCStudyInterfaceRef s_sc)

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account