Support Board
Date/Time: Sat, 04 Jan 2025 07:32:14 +0000
[User Discussion] - Calling a function from an external DLL
View Count: 1122
[2016-06-01 03:49:20] |
User754985 - Posts: 109 |
I need you support and recommendation on the following strange situation. My ACSIL study calls a function from a DLL, and I link to it via recommended typedef/LoadLibrary/GetProcessAddress approach at Run time. I develop on a dedicated i7-6700K server and deploy on a VPS with i7-980, both WinServer 2012R2, SC v1421. However: - if I deploy a DLL built on the development server, it works fine on a production one - if I build the same study on a VPS, it would cause a CPU exception at the instruction calling the function from the DLL (library loaded, handle to a function is obtained) Several days ago, even the first way would not work,- until I made sure that all VS c++ run-time libraries on both machines are identical, PATH to dependent dlls needed for the DLL with function are correct and same. But why would a final code - built on another machine -work but the "native" - would not work on a machine it had been built on? Would really appreciate your hypotheses that i can explore further myself to make it work.. |
[2016-06-01 05:42:04] |
Sierra Chart Engineering - Posts: 104368 |
Generally the best thing is to make sure the DLL statically links with all dependent libraries. Otherwise we really do not know. 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-06-01 05:57:50] |
User754985 - Posts: 109 |
I unfortunately cannot link statically since the DLL is from a 3rd party, as is. I noticed a compiler/linker flag "-static" used by default...can this be a source of instability? But in such case this would probably influence both machines.. |
To post a message in this thread, you need to log in with your Sierra Chart account: