using plkit.dll with eclipse/mingw-x64 gcc ?

Questions about MultiCharts and user contributed studies.
mqsymth
Posts: 3
Joined: 25 Oct 2013

using plkit.dll with eclipse/mingw-x64 gcc ?

Postby mqsymth » 02 Apr 2015

eclipse is a front end visual c++ coder using mingw-x64 gcc vary similar to MC 2012 VC++

GCC impliments all the current C++11 whereas VC++ 2012,2013 does not. For instance in C++11,14 the static keyword is thread safe and thread_local is thread safe.

However "#import" has a different meaning in mingw then in VC++. GCC uses #import for different purposes. In order to use a DLL the way you would do this is to include the header file of the DLL(#include "PLKit.h") and the link to the DLL (-lPLKit.dll)

One caveat is that the DLL contains C++ classes and was not compiled with GCC then it might not work as MS and GCC use different name mangling algotithms so you might not be able to use classes compiled with each other.

My questions are:
1. can PLKit.dll be used with mingw gcc?
2. Is the MC_x32_plkit.h the correct header file to use with 64bit dlls?

mqsymth
Posts: 3
Joined: 25 Oct 2013

Re: using plkit.dll with eclipse/mingw-x64 gcc ?

Postby mqsymth » 05 Apr 2015

Here are the errors I encountered using minGW.

I included the file plkit.tlh in my compile includes because without it mingw eclipse/mingw doesn't recognize IEasyLanguageObject * pELObj.

I also put "C:\Program Files\TS Support\MultiCharts64\PLKit.dll" in the mingw linker library path because the compil hangs when I use the usual
#import "C:\Program Files\TS Support\MultiCharts64\PLKit.dll" no_namespace

Notice one of the errors is:
Description Resource Path Location Type
'sprintf_s' was not declared in this scope Working line 139, external location: C:\MinGW\x86_64-w64-mingw32\include\comdef.h C/C++ Problem.
Which is probably plkit.dll's attempt to write the files plkit.tlh and plkit.tli.

For the rest of the errors, I have no idea what mingw is looking for being that this works with VC2012 C++.
Attachments
MinGW-PLKIT-Errors.jpg
(285.54 KiB) Downloaded 528 times


Return to “MultiCharts”