Login Page - Create Account

Support Board


Date/Time: Sat, 04 Jul 2020 21:52:49 +0000



[User Discussion] - [SOLVED] Error Building locally with Visual C++ and personal .h files

[2020-06-30 19:57:19]
User106904 - Posts: 3 | Ending Date: 2020-07-24
hello

1/ I had to change the bat file in ACS_Source to add the "(x86)" to the "Program Files" dir - then it started the compiler.
2/ there is a warning for unknown CL option which presumably causes the ensuing errors.
3/ does not recognize the .h files.
4/ throws an error at the end.

5/ everything works fine with the remote compiler

thanks --
regards


D:\SierraChart\ACS_Source>call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
cl : Command line warning D9002 : ignoring unknown option '/std:c++17'
cl : Command line warning D9024 : unrecognized source file type 'D:\SierraChart\ACS_Source\__BarEncoder.h', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'D:\SierraChart\ACS_Source\__basics.h', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'D:\SierraChart\ACS_Source\__Bracketer.h', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'D:\SierraChart\ACS_Source\__StringScorer.h', object file assumed
___xs22Ib_06.cpp
d:\sierrachart\acs_source\__basics.h(85): warning C4244: 'initializing': conversion from 'uint64_t' to 'int', possible loss of data
d:\sierrachart\acs_source\__basics.h(97): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data
d:\sierrachart\acs_source\__Bracketer.h(32): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
d:\sierrachart\acs_source\__Bracketer.h(54): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
d:\sierrachart\acs_source\__Bracketer.h(99): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
d:\sierrachart\acs_source\__Bracketer.h(154): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
d:\sierrachart\acs_source\__Bracketer.h(228): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
d:\sierrachart\acs_source\__Bracketer.h(278): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
D:\SierraChart\ACS_Source\___xs22Ib_06.cpp(254): warning C4244: 'initializing': conversion from 'uint64_t' to 'int', possible loss of data
D:\SierraChart\ACS_Source\___xs22Ib_06.cpp(281): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data
D:\SierraChart\ACS_Source\___xs22Ib_06.cpp(343): warning C4244: 'initializing': conversion from 'uint64_t' to 'int', possible loss of data
D:\SierraChart\ACS_Source\___xs22Ib_06.cpp(548): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
D:\SierraChart\ACS_Source\__BarEncoder.h : fatal error LNK1107: invalid or corrupt file: cannot read at 0x5F6
[2020-07-01 16:35:19]
bradh - Posts: 325 | Ending Date: 2020-07-23
If you installed Visual Studio before you installed the Visual C++ Compiler in the Sierra Chart Analysis>>Build menu, then you need to uninstall Visual Studio, reinstall the Compiler in Sierra and then re-install Visual Studio. No editing of the bat file will be required. The Warnings can be suppressed with /W0 in the Additional Compiler Parameters field. Then do "Build with Visual C++ - Debug" and when it is working re-build with "Build with Visual C++ - Release".
[2020-07-02 15:07:16]
User106904 - Posts: 3 | Ending Date: 2020-07-24
I uninstalled and re-installed everything in all possible orders.
I think I have evidence of a problem: when .h files are used with VC

NOTE >>> I am only using SC codes here that comes with SC Installation. Nothing is mine <<<

>>> Scenario 1 - warnings but works - compiling ExampleCustomStudies.cpp
========================================================================
-- Starting build of Custom Studies Source files: ExampleCustomStudies.cpp. -- 16:58:36

C:\WINDOWS\system32\cmd.exe /C "C:\SierraChart\ACS_Source\VisualCCompile.Bat"


C:\SierraChart\ACS_Source>call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
cl : Command line warning D9002 : ignoring unknown option '/std:c++17'
ExampleCustomStudies.cpp
C:\SierraChart\ACS_Source\ExampleCustomStudies.cpp(168): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
C:\SierraChart\ACS_Source\ExampleCustomStudies.cpp(169): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
Creating library ExampleCustomStudies.lib and object ExampleCustomStudies.exp
Generating code
Finished generating code
-- End of Build -- 16:58:38

>>> Scenario 2 - does not work - compiling ExampleCustomStudies.cpp + IntradayRecord.h
======================================================================================

-- Starting build of Custom Studies Source files: ExampleCustomStudies.cpp IntradayRecord.h. -- 17:04:57

C:\WINDOWS\system32\cmd.exe /C "C:\SierraChart\ACS_Source\VisualCCompile.Bat"


C:\SierraChart\ACS_Source>call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
cl : Command line warning D9002 : ignoring unknown option '/std:c++17'
cl : Command line warning D9024 : unrecognized source file type 'C:\SierraChart\ACS_Source\IntradayRecord.h', object file assumed
ExampleCustomStudies.cpp
C:\SierraChart\ACS_Source\ExampleCustomStudies.cpp(168): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
C:\SierraChart\ACS_Source\ExampleCustomStudies.cpp(169): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
C:\SierraChart\ACS_Source\IntradayRecord.h : fatal error LNK1107: invalid or corrupt file: cannot read at 0x21B0
-- End of Build -- 17:04:59
[2020-07-02 16:13:10]
User106904 - Posts: 3 | Ending Date: 2020-07-24
solved - the problem was that with VC you dont need to specify all the (personal) .h files that are needed by the cpp -- you have to do that with the Remote compiler though.

Maybe a note somewhere would be beneficial. I have seen other userd falling in the same trap

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

Login

Login Page - Create Account