Login Page - Create Account

Support Board


Date/Time: Sat, 27 Apr 2024 07:20:20 +0000



Visual Studio C++ vs MingW

View Count: 3454

[2016-12-04 20:55:37]
Guilherme - Posts: 66
Hi. Is it still possible to compile my studies with MingW or Sierra just converted everything to VSC++ ? The download compiler button now brings VSC++ installer. If MingW is still possible, is there a procedure to compile using it?
[2016-12-04 21:21:30]
Sierra Chart Engineering - Posts: 104368
If you are on the current version of Sierra Chart you can use the "Remote Build" button on the Build Custom Studies DLL window. This will use MinGW.
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
[2016-12-06 10:40:29]
Guilherme - Posts: 66
That would not be usefull in my case. I have an IDE that only supports MingW and Cygwin (Jetbrains) and as I'm used to it, I'd like to debug using this tool. Any hint such as a compile script and what compiling options and settings for Mingw whould I use so I can mimic it in my IDE? I mean something lik VisualCCompile.bat or even BuildProgramOutput.txt when using MingW, and the versions of the compiler are compatible with Sierra.
Date Time Of Last Edit: 2016-12-06 10:48:45
[2016-12-06 17:32:08]
Sierra Chart Engineering - Posts: 104368
Here are the commandline parameters you should use with the compiler:

i686-w64-mingw32-g++ -march=i686 -mtune=i686 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -std=gnu++11 SourceFileName.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: 2016-12-06 17:32:24
[2017-10-25 06:47:38]
ganz - Posts: 1048
SC Support


i686-w64-mingw32-g++ -march=i686 -mtune=i686 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -std=gnu++11 -fpermissive -Wno-deprecated -c D:\devel\sc\sot4.cpp

In file included from C:/Users/ganz/Apps/SierraChart/ACS_Source/scstructures.h:82:0,
from C:/Users/ganz/Apps/SierraChart/ACS_Source/sierrachart.h:15,
from D:\devel\sc\sot4.cpp:1:
C:/Users/ganz/Apps/SierraChart/ACS_Source/VAPContainer.h: In member function 'void c_VAPContainerBase<t_VolumeAtPrice>::Swap(c_VAPContainerBase<t_VolumeAtPrice>&)':
C:/Users/ganz/Apps/SierraChart/ACS_Source/VAPContainer.h:453:2: warning: there are no arguments to 'swap' that depend on a template parameter, so a declaration of 'swap' must be available [-fpermissive]
swap(m_NumElementsAllocated, r_That.m_NumElementsAllocated);
^~~~
C:/Users/ganz/Apps/SierraChart/ACS_Source/VAPContainer.h:454:2: warning: there are no arguments to 'swap' that depend on a template parameter, so a declaration of 'swap' must be available [-fpermissive]
swap(m_NumElementsUsed, r_That.m_NumElementsUsed);
^~~~
C:/Users/ganz/Apps/SierraChart/ACS_Source/VAPContainer.h:456:2: warning: there are no arguments to 'swap' that depend on a template parameter, so a declaration of 'swap' must be available [-fpermissive]
swap
^~~~
C:/Users/ganz/Apps/SierraChart/ACS_Source/VAPContainer.h:460:2: warning: there are no arguments to 'swap' that depend on a template parameter, so a declaration of 'swap' must be available [-fpermissive]
swap(m_NumBarsAllocated, r_That.m_NumBarsAllocated);
^~~~
C:/Users/ganz/Apps/SierraChart/ACS_Source/VAPContainer.h:461:2: warning: there are no arguments to 'swap' that depend on a template parameter, so a declaration of 'swap' must be available [-fpermissive]
swap(m_NumberOfBars, r_That.m_NumberOfBars);
^~~~
C:/Users/ganz/Apps/SierraChart/ACS_Source/VAPContainer.h:463:2: warning: there are no arguments to 'swap' that depend on a template parameter, so a declaration of 'swap' must be available [-fpermissive]
swap(m_LastSortedBarIndex, r_That.m_LastSortedBarIndex);
^~~~
C:/Users/ganz/Apps/SierraChart/ACS_Source/VAPContainer.h:464:2: warning: there are no arguments to 'swap' that depend on a template parameter, so a declaration of 'swap' must be available [-fpermissive]
swap(m_LastSortedBarSize, r_That.m_LastSortedBarSize);
^~~~
All done.

what do you think?

*.dll works fine but it has the huge size ~1M vs 72k on ms vc++

Thnx.
[2017-10-25 09:54:37]
ganz - Posts: 1048
SC Support


C:\Users\ganz>g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=C:/Users/ganz/Apps/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.2.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../gcc-7.2.0/configure --prefix=/mingw32 --with-local-prefix=/mingw32/local --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i68
6-w64-mingw32 --with-native-system-header-dir=/mingw32/i686-w64-mingw32/include --libexecdir=/mingw32/lib --enable-bootstrap --with-arch=i686 --with-tune=
generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite
--enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --ena
ble-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-
libiconv --with-system-zlib --with-gmp=/mingw32 --with-mpfr=/mingw32 --with-mpc=/mingw32 --with-isl=/mingw32 --with-pkgversion='Rev1, Built by MSYS2 proje
ct' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld --disable-sjlj-exceptions --with-dwarf2
Thread model: posix
gcc version 7.2.0 (Rev1, Built by MSYS2 project)

[2017-10-25 17:15:46]
Sierra Chart Engineering - Posts: 104368
You can safely disregard those warnings. We will see if we can do something about them.

We would not be concerned about the generated DLL size. Must have something to do with static linking to the libraries:
-static-libgcc -static-libstdc++
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: 2017-11-19 00:56:24
[2017-10-26 01:07:51]
ganz - Posts: 1048
SC Support

fyi: it's -static-libstdc++ linking libs from 17k to 952k
[2017-10-26 20:01:01]
Sierra Chart Engineering - Posts: 104368
Yes, this does make sense.
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
[2017-11-15 23:34:42]
ganz - Posts: 1048
SC Support
Yes, this does make sense.
It looks like a compiler's cheat.
iostream was not added by g++ statically that days we were using it as the basic tool
now ms c++ compiler does that trick and it is not working for g++ and *.dll will be increased by adding iostream lib because of an enemy environment :)
so it happens on windows and it doesn't on linux since you are now ms fans again :)
[2017-11-17 22:47:47]
ganz - Posts: 1048
SC Support
Not a big deal but is it make sense to set
RecordSize = sizeof(s_IntradayRecord);
for struct s_IntradayHeader{}; as it is the docs?
[2019-09-12 06:19:11]
Guilherme - Posts: 66
Is it possible to use the 64 bit version of MinGW ?
[2019-09-12 15:10:00]
ganz - Posts: 1048
Guilherme
Sure.
[2019-09-12 18:41:45]
ganz - Posts: 1048
Guilherme

Remote Build - Error SC version 1689 | Post: 141378

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

Login

Login Page - Create Account