creating dll question

Questions about MultiCharts and user contributed studies.
rst
Posts: 8
Joined: 19 Aug 2011
Has thanked: 2 times

creating dll question

Postby rst » 17 Mar 2012

Is it possible to link with PLkit.dll with mingw gcc?

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: creating dll question

Postby Dave Masalov » 19 Mar 2012

Is it possible to link with PLkit.dll with mingw gcc?
Hello rst,

Could you be more precise? What exactly are you trying to achieve?

rst
Posts: 8
Joined: 19 Aug 2011
Has thanked: 2 times

Re: creating dll question

Postby rst » 19 Mar 2012

Hi I follow the example in extension SDK for implementing an external function inside a dll.
For my reasons I want to compile with free windows compiler mingw-gcc that can creates essentially a dll with -shared flag.

The following line for mingw gcc seems to have a different behavior than Visual Studio env,
#import "c:\Program Files\TS\Program\PLkit.dll" no_namespace

It seems that in order to build a custom dll with gcc under Windows I would require a header file which I don't find inside MC installation and then link with PLkit.dll

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: creating dll question

Postby Dave Masalov » 19 Mar 2012

Hi I follow the example in extension SDK for implementing an external function inside a dll.
For my reasons I want to compile with free windows compiler mingw-gcc that can creates essentially a dll with -shared flag.

The following line for mingw gcc seems to have a different behavior than Visual Studio env,
#import "c:\Program Files\TS\Program\PLkit.dll" no_namespace

It seems that in order to build a custom dll with gcc under Windows I would require a header file which I don't find inside MC installation and then link with PLkit.dll
rst,

Please find attached the file that you were looking for.
Attachments
MC_x32_plkit.h
(23.34 KiB) Downloaded 572 times

rst
Posts: 8
Joined: 19 Aug 2011
Has thanked: 2 times

Re: creating dll question

Postby rst » 19 Mar 2012

Thanks a lot! Would you consider putting this .h file in future relases?

Fu510n
Posts: 22
Joined: 05 May 2011
Has thanked: 17 times
Been thanked: 7 times

Re: creating dll question

Postby Fu510n » 27 Mar 2012

Hi I follow the example in extension SDK for implementing an external function inside a dll.
For my reasons I want to compile with free windows compiler mingw-gcc that can creates essentially a dll with -shared flag.

The following line for mingw gcc seems to have a different behavior than Visual Studio env,
#import "c:\Program Files\TS\Program\PLkit.dll" no_namespace

It seems that in order to build a custom dll with gcc under Windows I would require a header file which I don't find inside MC installation and then link with PLkit.dll
rst,

Please find attached the file that you were looking for.
Is this the version of the .h/include we should use for x64 DLLs as well or is there a different one for that environment?

Thanks in advance,
-Guy

McGeorge
Posts: 49
Joined: 22 Jun 2018
Has thanked: 10 times
Been thanked: 6 times

Re: creating dll question

Postby McGeorge » 06 Feb 2022

Hi I follow the example in extension SDK for implementing an external function inside a dll.
For my reasons I want to compile with free windows compiler mingw-gcc that can creates essentially a dll with -shared flag.

The following line for mingw gcc seems to have a different behavior than Visual Studio env,
#import "c:\Program Files\TS\Program\PLkit.dll" no_namespace

It seems that in order to build a custom dll with gcc under Windows I would require a header file which I don't find inside MC installation and then link with PLkit.dll
rst,

Please find attached the file that you were looking for.
Is this the version of the .h/include we should use for x64 DLLs as well or is there a different one for that environment?

Thanks in advance,
-Guy
Dear MC Support Team,

This is a very old thread. Is the MC_x32_plkit.h header file provided still the latest version and be compatible with 64-bit DLL? Please provide a new one if any.

Since I use gcc/g++ compiler rather than vc++, I would like to know if any adjustments should be made to the header file to make my DLL work with PLKit.dll properly. Please advise.

Thanks,
McGeorge

User avatar
Tammy MultiCharts
Posts: 200
Joined: 06 Aug 2020
Has thanked: 6 times
Been thanked: 65 times

Re: creating dll question

Postby Tammy MultiCharts » 11 Feb 2022

Hello McGeorge,

Please download this archive that contains MC_x32_plkit.h and MC_x64_plkit.h.
UPD: TLH and TLI files were added.

McGeorge
Posts: 49
Joined: 22 Jun 2018
Has thanked: 10 times
Been thanked: 6 times

Re: creating dll question

Postby McGeorge » 15 Feb 2022

Hi Tammy,

The header file provided only contains declaration codes. Per the SDK, there should be two type library header files with .tlh and .tli file name extension. The former should contain declaration codes and the latter should contain implementation codes. These two files combined form the final header file that can be used by the client DLL. Could you please provide a version of header file that contains both parts?

Thanks,
McGeorge

User avatar
Tammy MultiCharts
Posts: 200
Joined: 06 Aug 2020
Has thanked: 6 times
Been thanked: 65 times

Re: creating dll question

Postby Tammy MultiCharts » 18 Feb 2022

Hello McGeorge,

Please use the updated link from my previous reply.


Return to “MultiCharts”