I'm distributing a binary that users are required to install the following:

Microsoft Visual C++ 2005 Redistributable Package (x86)
Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)

If they don't have them the program puts up a ambiguous error message. I'm not really sure how static linking works, but I started compiling it with /MT instead of /MD. Will this include all the necessary stuff from those 2 packages?

Here is the include portion for the project

#ifdef _WIN32
#define UNIXWIN
#define socklen_t int
#define strcasecmp _stricmp
#pragma comment(lib,"wsock32.lib")
#include <windows.h>
#include <tchar.h>
#include <winsock.h>
#define WS_MAJOR  1
#define WS_MINOR  1

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <time.h>

#include <sys/types.h>

#ifndef __USE_XOPEN
#define __USE_XOPEN // Very important in RH 5.2 - gets proper signal support

#include <signal.h>

I'm just not really sure what libraries are included in windows normally. I googled the hell out of it and I found material saying I needed to add references for the #includes, but from what I understood those are only for .lib files. I also found material saying I just needed to use the /MT flag to get the thing to compile with static libraries.

6 Years
Discussion Span
Last Post by Ancient Dragon
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.