I have written a console application on Visual Studio C++ as below
#include <mathlink.h> //mathlink header
#include <stdio.h> //standard io header
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
/* initialising variables */
MLENV env = (MLENV)0;
MLINK link = (MLINK)0;
int errno;
int packet;
int input;
/* initialises MathLink environemnt object */
env = MLInitialize(0);
/* links the program to the MathKernel */
link = MLOpenString(env, "-linkmode launch -linkname 'C:\\Program Files\\Wolfram Research\\Mathematica\\9.0\\math.exe'", &errno);
MLActivate(link); //activates a MathLink connection with a mathlink program
/* send 42+137 using the full form Plus[42, 137] */
MLPutFunction(link, "Plus", 2); //integer 2 signifying 2 arguments passed to the MathLink program
cout << "Enter the first integer: ";
cin >> input;
MLPutInteger(link, input); //puts the integer to the MathLink connection
cout << "Enter the second integer: ";
cin >> input;
MLPutInteger(link, input); //puts the integer to the MathLink connection
MLEndPacket(link); //indicates that current expression is complete and ready to be sent
/* get packets until we find a ReturnPacket or error */
while ((packet = MLNextPacket(link)) && packet != RETURNPKT) MLNewPacket(link);
/* once the results is returned */
if (MLError(link)) printf("\nError Has Occured!\n"); //if an error is returned
else { //if an integer is returned
int result;
MLGetInteger(link, &result); //we know that the result is an integer in this case
printf("\nResult: %d\n", result);
}
printf("\nPress Enter to Exit...");
getchar(); //holds the console till users presses enter
getchar(); //holds the console till users presses enter
return 0;
}
Everything works fine. However, this uses MathLink, linking to math.exe. If I am to use the executable file of this code in a computer without Mathematica, it wouldnt work.
My solution explorer looks like:

Any advise on how to compile so that the file can be used in a computer without mathematica installed?