MySQL Forums :: Connector/C (libmysql) :: 64bit connector vs 32bit connector

Advanced Search

64bit connector vs 32bit connector
Posted by: Manesh Patel ()
Date: January 30, 2011 11:41AM


I used the 32bit connector and I was able to compile with no problems. When I used the 64bit connector, I got the following linker error. What do you have to do different to get the 64bit connector working? I am using 64bit Windows 7 with Visual C++2010 express.

Linker ERROR:
1>------ Build started: Project: test_dll, Configuration: Debug Win32 ------
1> Creating library C:\Users\manesh\Documents\Visual Studio 2010\Projects\test_dll\Debug\test_dll.lib and object C:\Users\manesh\Documents\Visual Studio 2010\Projects\test_dll\Debug\test_dll.exp
1>test_dll.obj : error LNK2019: unresolved external symbol _mysql_init@4 referenced in function "int __stdcall testfunction(int)" (?testfunction@@YGHH@Z)
1>C:\Users\manesh\Documents\Visual Studio 2010\Projects\test_dll\Debug\test_dll.dll : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

#include <Windows.h>
#include <string.h>
#include <iostream>
//#include <my_global.h>
#include <mysql.h>
#include <stdio.h>

using namespace std;
MYSQL *connection, mysql;
MYSQL_RES *result;
int query_state;

int __stdcall testfunction(int chPrice)
if (chPrice == 3)

Options: ReplyQuote

Subject Views Written By Posted
64bit connector vs 32bit connector 3298 Manesh Patel 01/30/2011 11:41AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.