Support Board
Date/Time: Wed, 27 Nov 2024 20:32:56 +0000
[Programming Help] - compiling error scstudyfunctions.h
View Count: 1485
[2020-10-20 06:30:09] |
jomo88 - Posts: 47 |
I am trying to compile a test copy of DailyOHLC found in Studies8.cpp. I cant seem to get it to work. I've played around with changing file names to be case sensitive, adding some extra includes, or taking them away. I think I've tried all the permutations. This error seems to think my code says something it doesn't, you can see on line 2 in my file (see attached) it is written with capital letters, here it shows all lower case. All files are in ACS_Source. Please assist. Thank you -- Starting remote build of Custom Studies Source files: TestDailyOHLC.cpp. 64-bit -- 02:21:41 Allow time for the server to compile the files and build the DLL. The remote build did not succeed. Result: In file included from TestDailyOHLC.cpp:2: SCStudyFunctions.cpp:2:10: fatal error: scstudyfunctions.h: No such file or directory 2 | #include "scstudyfunctions.h" | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. -- End of Build -- 02:21:43 |
scstudyfunctions.jpg / V - Attached On 2020-10-20 06:28:59 UTC - Size: 178.88 KB - 324 views |
[2020-10-20 11:30:52] |
Sierra Chart Engineering - Posts: 104368 |
Remove this: #include "scstudyfunctions.h"
And then you need to compile again and see what error you receive. Provide that error here. 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 Date Time Of Last Edit: 2020-10-20 11:31:00
|
[2020-10-20 15:53:19] |
jomo88 - Posts: 47 |
I removed #include "SCStudyFunctions.h" from TestDailyOHLC.cpp and got the same. -- Starting remote build of Custom Studies Source files: TestDailyOHLC.cpp. 64-bit -- 11:32:54 Allow time for the server to compile the files and build the DLL. The remote build did not succeed. Result: In file included from TestDailyOHLC.cpp:2: SCStudyFunctions.cpp:2:10: fatal error: scstudyfunctions.h: No such file or directory 2 | #include "scstudyfunctions.h" | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. -- End of Build -- 11:32:56 |
removefromTEST.jpg / V - Attached On 2020-10-20 15:52:52 UTC - Size: 218.21 KB - 284 views |
[2020-10-20 15:56:21] |
jomo88 - Posts: 47 |
Also tried removing #include "SCStudyFunctions.h" from BOTH TestDailyOHLC.cpp and SCStudyFunctions.cpp. Still the same output.
|
[2020-10-20 16:08:50] |
jomo88 - Posts: 47 |
Most interestingly though, I removed it from ONLY SCStudyFunctions.cpp, and the compile log still shows the line as in my code. Is it even using the files? -- Starting remote build of Custom Studies Source files: TestDailyOHLC.cpp. 64-bit -- 12:02:27 Allow time for the server to compile the files and build the DLL. The remote build did not succeed. Result: In file included from TestDailyOHLC.cpp:3: SCStudyFunctions.cpp:2:10: fatal error: scstudyfunctions.h: No such file or directory 2 | #include "scstudyfunctions.h" | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. -- End of Build -- 12:02:29 |
removefrom_studyfunctionscpp.jpg / V - Attached On 2020-10-20 16:07:27 UTC - Size: 207.49 KB - 270 views |
[2020-10-20 17:00:00] |
Ackin - Posts: 1865 |
1) The included files need to have the proper case. 2) Only if you really need to refer to it for some reason (scstudyfunctions.h). Otherwise it doesn't have to be, the header files are linked and running in the background as needed. On the contrary, it can cause a problem. What version of Sierrachart do you have? 3) In all files, include only #include "sierrachart.h" 4) Find out if there are invisible characters at the end of the line behind the #include "sierrachart.h"(in older compilers this could also be a source of problems) Date Time Of Last Edit: 2020-10-20 17:14:13
|
[2020-10-20 17:31:45] |
jomo88 - Posts: 47 |
Ackin, I renamed all files as lowercase, and only used #include "sierrachart.h". See attached for the setup. I am on version 2168. After renaming all files I closed Sierra and reopened. My error is now... -- Starting remote build of Custom Studies Source files: TestDailyOHLC.cpp. 64-bit -- 13:23:20 Allow time for the server to compile the files and build the DLL. The remote build did not succeed. Result: TestDailyOHLC.cpp: In function 'void scsf_TestDailyOHLC(SCStudyInterfaceRef)': TestDailyOHLC.cpp:222:5: error: 'CalculateDailyOHLC' was not declared in this scope 222 | CalculateDailyOHLC( | ^~~~~~~~~~~~~~~~~~ -- End of Build -- 13:23:24 |
lowercase.jpg / V - Attached On 2020-10-20 17:30:54 UTC - Size: 151.49 KB - 295 views |
[2020-10-20 18:04:06] |
Ackin - Posts: 1865 |
It is strange that this error has been discussed here several times. Similar threads: #include Remote Build Compile error in latest SC version (post #33) Compiling Error |
[2020-10-20 18:26:58] |
jomo88 - Posts: 47 |
The first link solved it for me! Just placed the function itself in the file. Thank you Ackin
|
[2021-03-11 16:17:45] |
InvestmentCLB - Posts: 11 |
Jomo88, when you say just place the function itself in the file, what does that mean? And how do I place the function in the file? Thanks
|
[2021-03-11 16:24:38] |
Ackin - Posts: 1865 |
Copy the block of code (the attached fix.jpg file above) from one and paste it into the cpp file
|
To post a message in this thread, you need to log in with your Sierra Chart account: