Support Board
Date/Time: Sat, 01 Feb 2025 03:45:39 +0000
including other header files in ACSIL study
View Count: 1441
[2019-06-22 17:13:46] |
cmb999 - Posts: 211 |
hi, i have a class in a header file that i would like to include in study.cpp file i include like this at the top of study.cpp : #include "sierrachart.h"
#include "line.h" here is line.h : #pragma once
enum LineTypeEnum {General, Extended, Ray}; class Line { public: Line(); Line(LineTypeEnum, float); ~Line(); LineTypeEnum LineType = General; float angle = 0.0f; }; when i compile from sierra, i get : Creating library study.lib and object study.exp system_4.obj : error LNK2019: unresolved external symbol "public: __cdecl Line::Line(enum LineTypeEnum,float)" (??0Line@@QEAA@W4LineTypeEnum@@M@Z) referenced in function scsf_TemplateFunction system_4.obj : error LNK2019: unresolved external symbol "public: __cdecl Line::~Line(void)" (??1Line@@QEAA@XZ) referenced in function "int `public: __cdecl std::pair<int const ,class Line>::pair<int const ,class Line><int &,class Line &,void,0>(int &,class Line &)'::`1'::dtor$0" (?dtor$0@?0???$?0AEAHAEAVLine@@X$0A@@?$pair@$$CBHVLine@@@std@@QEAA@AEAHAEAVLine@@@Z@4HA) C:\SierraChart_Test\Data\system_64.dll : fatal error LNK1120: 2 unresolved externals it compiles fine, but cannot link to anything that was in external header |
[2019-06-22 17:17:09] |
cmb999 - Posts: 211 |
contents of VisualCCompile.Bat, which have not modified call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 cl /JMC /MP /analyze- /Zc:wchar_t /Z7 /Od /GS /W3 /RTC1 /Zc:inline /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /Gd /Gy /GR- /GF /fp:precise /MTd /std:c++17 /LD /EHa /WX- /diagnostics:classic /nologo "C:\SierraChart_Test\ACS_Source\study.cpp" /link "Gdi32.lib" /DLL /DYNAMICBASE /DEBUG /INCREMENTAL:NO /OPT:REF /MACHINE:X64 /OUT:"C:\SierraChart_Test\Data\study_64.dll" |
[2019-06-22 17:42:28] |
cmb999 - Posts: 211 |
you can delete this thread. there was a line.cpp needed to move to ACS_source dir. still getting used to compilation within sierra vs a visual studio project
|
[2019-06-22 18:06:38] |
cmb999 - Posts: 211 |
although as a corollary i might add one quirk : if multiple *.cpp files are part of a study, when they are selected in sierra to compile, they are listed in alphabetical order so i selected study.cpp and line.cpp, in that order however despite SCDLLName("my_study") in study.cpp the dll ends up as line_64.dll in /data folder Date Time Of Last Edit: 2019-06-22 18:07:16
|
To post a message in this thread, you need to log in with your Sierra Chart account: