Here is the lib file that was installed on my machine.
Attachment 31981
Regards,
Paul McKenzie
Printable View
Here is the lib file that was installed on my machine.
Attachment 31981
Regards,
Paul McKenzie
Well, I downloaded the installer last night, and didn't do anything beyond that except make the installer run.
Make sure that you are pointing to the proper directory. Maybe the installer can detect what system you're running, and install both 32 and 64 bit versions. If that is the case, then usually 32-bit versions are installed in "Program Files (x86)" and not "Program Files". I am running a 32-bit only system, and installing caused no issues.
Regards,
Paul McKenzie
Hey was just reading through this thread, i am in the same situtation now, i downloaded the x86 mysql installer and picked developer enviroment, now the directories path is C:\Program Files\MySQL\MySQL Server 5.6, and i changed my project from x86 to x64 and it compiled fine, now why would it compile with x64 if i downloaded x86 installer?, how would i get the x86 version of the mysql library so i can use it with an x86 project, thanks if you can help...
Looks like the x86 installer detected the 64-bit system and installed the 64-bit version. If it had installed the 32-bit version, it would have installed to C:\Program Files (x86)\etc, not C:\Program Files\etc.
You might try checking if the installer installed to both locations (C:\Program Files\MySQL & and C:\Program Files (x86)\MySQL), otherwise, I'd post a question to the MySQL forum directly.
ive got it compiled by installing the x86 package on a vmware x86 and copying the x86 files over to this pc, its clear to me the x86 installer installs x64 library even those they say x86 package..
Now when i run the program its crashing and i cannot understand why
The source code as follows
Thanks if you can helpCode:#include "stdafx.h"
//#include "my_global.h" // Include this file first to avoid problems
#include <mysql.h> // MySQL Include File
#define SERVER "127.0.0.1"
#define USER "root"
#define PASSWORD "letmein"
#define DATABASE "test"
#pragma comment(lib,"libmysql.lib")
#pragma comment(lib,"mysqlclient.lib")
int main()
{
MYSQL *connect; // Create a pointer to the MySQL instance
connect = mysql_init(NULL); // Initialise the instance
/* This If is irrelevant and you don't need to show it. I kept it in for Fault Testing.*/
if (!connect) /* If instance didn't initialize say so and exit with fault.*/
{
fprintf(stderr, "MySQL Initialization Failed");
return 1;
}
/* Now we will actually connect to the specific database.*/
connect = mysql_real_connect(connect, SERVER, USER, PASSWORD, DATABASE, 0, NULL, 0);
/* Following if statements are unneeded too, but it's worth it to show on your
first app, so that if your database is empty or the query didn't return anything it
will at least let you know that the connection to the mysql server was established. */
if (connect){
printf("Connection Succeeded\n");
}
else{
printf("Connection Failed!\n");
}
MYSQL_RES *res_set; /* Create a pointer to recieve the return value.*/
MYSQL_ROW row; /* Assign variable for rows. */
mysql_query(connect, "SELECT * FROM TABLE");
/* Send a query to the database. */
unsigned int i = 0; /* Create a counter for the rows */
res_set = mysql_store_result(connect); /* Receive the result and store it in res_set */
unsigned int numrows = mysql_num_rows(res_set); /* Create the count to print all rows */
/* This while is to print all rows and not just the first row found, */
while ((row = mysql_fetch_row(res_set)) != NULL){
printf("%s\n", row[i] != NULL ?
row[i] : "NULL"); /* Print the row data */
}
mysql_close(connect); /* Close and shutdown */
return 0;
}
... and using the debugger, the crash occurs where?Quote:
Now when i run the program its crashing and i cannot understand why