Support Board
Date/Time: Tue, 25 Feb 2025 17:08:34 +0000
[User Discussion] - compiling a custom indicator for debugging
View Count: 944
[2021-04-24 00:09:17] |
BAT - Posts: 33 |
Hello, I am working on my first custom study and I am having difficulty setting up my debugger. Note: I already have a Visual Studio 2019 Community Edition installed on my laptop. As instructed, I tried to download / install visualcppbuildtools_full through the Analysis -> Build Custom Studies -> Build -> Install Visual C++ compiler. Unfortunately, when trying to install this, I get the error - 'A Setup Package is Missing or damaged'. Looks like it is looking for "BuildTools_MSBuild" - see screenshot below. Can someone help me fix this please? Alternatively, can i use my existing Visual Studio app? It has support for C++. Thanks in advance. |
[2021-04-24 06:26:41] |
UnixManiac - Posts: 46 |
Have a look here for a possible fix for your case: Update documentation to support latest version of Visual Studio | Post: 180504 Alternatively, can i use my existing Visual Studio app? It has support for C++.
yes you can. Having VS2019 community installed I use a simple batch file to do things on my own with VSCode, hope this helps a bit. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
@echo off if %1==debug ( echo "Compiling Debug version for %2" cl /I \include /I\Trading\SierraChart_DEV\ACS_Source /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 "%2" /link "Gdi32.lib" /DLL /DYNAMICBASE /DEBUG /INCREMENTAL:NO /OPT:REF /MACHINE:X64 /OUT:"%3" ) else ( echo "Compiling Release version for %2" cl /I \include /I\Trading\SierraChart_DEV\ACS_Source /Zc:wchar_t /GS /GL /W3 /O2 /Zc:inline /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /Oy /Gd /Gy /Oi /GR- /GF /Ot /fp:precise /MT /std:c++17 /LD /EHa /WX- /nologo "%2" /link "Gdi32.lib" /DLL /DYNAMICBASE /INCREMENTAL:NO /OPT:REF /OPT:ICF /MACHINE:X64 /OUT:"%3" ) |
[2021-04-24 14:51:18] |
BAT - Posts: 33 |
@UnixManiac - Thank You - will check this out today !
|
[2021-04-24 15:34:42] |
BAT - Posts: 33 |
Thanks again UnixManiac.. I tried this - but hit some snag... Assume the batch file is the VisualCCompile in SierraChart\ACS_Source directory - yes? if so, this file seems to be getting overwritten every time I try to compile locally using SierraChart->Analysis-> Build Custom Studies DLL -> Build -> Build with Visual C++ Debug.. the following is what it gets rewritten to... call "C:\Program Files\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\ACS_Source\Bat_Steve_RSI_Divergence.cpp" /link "Gdi32.lib" /DLL /DYNAMICBASE /DEBUG /INCREMENTAL:NO /OPT:REF /MACHINE:X64 /OUT:"C:\SierraChart\Data\Bat_Steve_RSI_Divergence_64.dll" |
[2021-04-24 16:18:52] |
UnixManiac - Posts: 46 |
Another workaround that I just now tried and works is to create a batch file to start sierra chart while executing the vcvarsall.bat first. Make sure though to run it as an administrator. When building it will still complain about the .bat missing, but the cl commands will execute just fine. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
call "C:\SierraChart\SierraChart_64.exe" |
[2021-04-24 16:49:43] |
BAT - Posts: 33 |
Whoa !!! Thank you so very much. This worked - I now have the debugger on ! MUCH appreciated ! |
To post a message in this thread, you need to log in with your Sierra Chart account: