Support Board
Date/Time: Thu, 06 Mar 2025 19:14:45 +0000
[Programming Help] - building dll from cpp; compile error
View Count: 665
[2022-01-30 18:09:29] |
User283743 - Posts: 38 |
This is the error message: -- Starting remote build of Custom Studies Source files: CustomStockIndexCreator.cpp. 64-bit -- 13:06:50 Allow time for the server to compile the files and build the DLL. The remote build did not succeed. Result: CustomStockIndexCreator.cpp: In function 'void scsf_CustomStockIndexCreator(SCStudyInterfaceRef)': CustomStockIndexCreator.cpp:453:52: error: invalid conversion from 'int' to 'HistoricalChartBarPeriodEnum' [-fpermissive] 453 | OpenChartParameters.HistoricalChartBarPeriod = pBarPeriod; | ^~~~~~~~~~ | | | int -- End of Build -- 13:06:54 |
[2022-01-31 18:11:08] |
John - SC Support - Posts: 38447 |
The variable HistoricalChartBarPeriod is of type "HistoricalChartBarPeriodEnum", but your variable pBarPeriod is an "int". So your assignment of OpenChartParameters.HistoricalChartBarPeriod = pBarPeriod; does not work.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2022-02-08 12:42:37] |
User283743 - Posts: 38 |
Thanks for your reply. When I roll back Sierra to the previous version, the .dll is built without error message. Would that change your diagnosis of the cause of the error message? |
[2022-02-08 19:11:47] |
1+1=10 - Posts: 270 |
@User283743, Perhaps SC changed the API between those versions but sc.SetBarPeriodParameters() no longer has an "HistoricalChartBarPeriod" field: ACSIL Interface Members - Functions: sc.SetBarPeriodParameters() It only has "HistoricalChartBarPeriodType" and "HistoricalChartDaysPerBar" |
To post a message in this thread, you need to log in with your Sierra Chart account: