Login Page - Create Account

Support Board


Date/Time: Sun, 28 Apr 2024 01:25:05 +0000



[Programming Help] - Error when compiling

View Count: 846

[2019-06-11 18:42:37]
grantx - Posts: 244
I am trying to call this function from my code:

CalculateDailyOHLC();

But I am getting this error message during the compile:

The remote build did not succeed. Result:
Grant_Studies.cpp:3:30: fatal error: scstudyfunctions.h: No such file or directory
#include "scstudyfunctions.h" ^
compilation terminated.

I have included the following in the header:
#include "scstudyfunctions.h"

The file does exist. I have checked.

Why is it failing?
[2019-06-11 20:00:33]
grantx - Posts: 244
scstudyfunctions.h
SCStudyFunctions.h

Ok it is case sensitive, so I changed it to uppercase and now its telling me this:

The remote build did not succeed. Result:

/tmp/cc4FILCF.o:Grant_Studies.cpp:(.text+0x5dfd):
undefined reference to `CalculateDailyOHLC
(s_sc&, int, int, int, int, int, int, SCGraphData&, SCDateTimeArray&, int, float&, float&, float&, float&, float&, int)'
collect2: error: ld returned 1 exit status

-- End of Build -- 20:59:36

Date Time Of Last Edit: 2019-06-11 20:03:04
[2019-06-11 20:56:19]
Sierra Chart Engineering - Posts: 104368
You also need to include this file in the build:
SCStudyFunctions.cpp
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: 2019-06-11 20:56:48
[2019-06-12 07:31:10]
grantx - Posts: 244
I put this in the header:

#include "sierrachart.h"
#include "SCStudyFunctions.h"
#include "SCStudyFunctions.cpp"

And now the error message is back to this;

The remote build did not succeed. Result:

In file included from Grant_Studies.cpp:3:0:
SCStudyFunctions.cpp:2:30: fatal error: scstudyfunctions.h: No such file or directory
#include "scstudyfunctions.h"
^
compilation terminated.

-- End of Build -- 08:29:22

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

Login

Login Page - Create Account