login about faq

From your site, i can download .Net Dll and it works fine.

But in my case, i would like to have static version for .Net 4.5 library. Could you please provide me this one. I would like to import the lib directly into my App. I tried ILMerge for dll but no luck since the DLL was written in native C/C++.

asked Sep 05 at 09:26

chilkat's gravatar image

chilkat ♦♦
11.8k316358421


Unfortunately, it is not possible (but an alternative is to try using the Chilkat Mono build).

When linking (to produce the Chilkat .NET assembly) with the static runtime lib is attempted, this error occurs:

cl : Command line error D8016: '/clr' and '/MT' command-line options are incompatible

After Googling the subject, I find answers such as this:

Mixed-mode compilation won't allow static CRT linkage. Use /MD (which uses the DLL version of the CRT).
See https://msdn.microsoft.com/en-us/library/ffkc918h.aspx

You may instead try using the Chilkat Mono package. It can be used from Visual Studio just like any other assembly. The Chilkat Mono package is different in that it is comprised of 2 DLLs (not 1). The 1st is a 100% managed assembly that you build following the instructions at https://www.chilkatsoft.com/mono.asp (This is to build the chilkatMono.dll from the .cs sources provided.) The 100% managed assembly utilizes the unmanaged implementation via Interop. Therefore, it calls into ChilkatMono-9_5_0.dll via P/Invoke (see http://www.mono-project.com/docs/advanced/pinvoke/ ) The ChilkatMono-9_5_0.dll is a statically linked DLL. The difficulty you may encounter is making sure the .NET runtime can find the unmanaged DLL. For this, it helps to be aware of the existence of ChilkatConst.cs, which has this define:

public const string DllPath = "chilkatMono-9_5_0";

This DllPath is used in the DllImports of the .cs sources.

link

answered Sep 05 at 09:37

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×32
×14
×3
×1

Asked: Sep 05 at 09:26

Seen: 147 times

Last updated: Sep 05 at 09:37

powered by OSQA