0

I'm having some trouble, I'm using Dev C++ and I want to make my exe file and my dll file into one. So if i use my exe on another computer it tells me it's missing "libmySQL.dll" So I don't have to have two files.
My current code is:

#include <iostream>
#include <conio.h>
#include <string>
#include <fstream>
#include <windows.h>
#include <mysql.h>

//Beginging database connection
using namespace std;
int main()
   {
   MYSQL* conn;
   conn = mysql_init(NULL);
//Database information: Host, username, password, database...
   if (mysql_real_connect(conn,"213.171.200.49","4221joshua","4221dave","private",0,NULL,0) !=0)
   {
      cout << "Succesfully  Connected to database: PRIVATE..." << endl;  
   } 
   else 
   {
      cout << "Connection to the database failed!" << endl;
   }
   mysql_close(conn);
   system("PAUSE");    
   return 0;       
   }
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by sfuo
0

A .dll file is a dynamic linker file which has to be included with the .exe if you do not use the static linker file. If you add the .a or .lib file (static linker) then you do not need the .dll file but the size of the .exe will be much larger.

Might be able to find the .lib/.a file on the mysql website

Edited by sfuo: n/a

This topic has been dead for over six months. 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.