Reputation: 1511
I am coding for WinAPI in MinGW
One thing I still have not fully understood is the VC redistributable, I got a whole pack of question to it
Some say that such programs will need the msvcrt.dll
I see something wrong is here as I would like to produce no dependency small exes only calling the system WinAPI and if I use some like C standard library functions functions I would prefer it economically and statically compiled in, not any third-party dependencies
Upvotes: 5
Views: 5655
Reputation: 5582
Microsoft compilers can link with "static" libraries so that the resulting executable depends only on system DLLs like kernel32.dll, user32.dll, etc. MinGW cannot do this (yet).
EDIT: A concise description of the MSVCRT.DLL problem is here.
Upvotes: 5
Reputation: 129374
According to the MS White-paper here:
http://www.microsoft.com/en-gb/download/details.aspx?id=13350
you can redistribute certain parts of the Visual Studio components.
Some software, such as the Microsoft .NET Framework, can be distributed. Components of software products included in MSDN subscriptions that can be distributed (either within an application or as separate files) without royalty are identified in the REDIST.TXT file associated with the product. Components that can be distributed to non-Microsoft platforms are identified in the OTHER-DIST.TXT file associated with the product. Code identified as distributable that has the extension .lib cannot be directly distributed; it must be linked into the application. However, the resulting output can be distributed.
You may also:
- Modify and distribute source code and objects for code marked as “sample” or “Code Snippet”.
- Distribute the unmodified output of Microsoft Merge Modules for use with an application's .msi file.
- Distribute the MDAC_TYP.EXE file containing core data access components (such as the Microsoft SQL Server OLE DB provider and ODBC driver).
- Distribute the object version of C++ libraries (Microsoft Foundation Classes, Active Template Libraries, and C runtimes).
MS also produces a redistributable package specifically for the purpose of developers: http://www.microsoft.com/en-gb/download/details.aspx?id=40784
So, to answer your questions:
Upvotes: 2