Eclipse Cygwin C (libmysql) compile warnings and linkage problem
Posted by: aditya gameprogrammer
Date: April 28, 2011 05:03AM

I am Trying to compile a simple c program using eclipse cygwin gcc and the mysql c connector .I have a wamp server installed and updated it to the latest version of sql server.The only working way was to install the installer for windows to get the lib files. All my efforts to use the source -code were in vain with failed attempts to build the source in cygwin or mingw shells [make,cmake installed ofcourse].
The program worked when i removed the static of the function 'rint' in my_global.h

#include<stdio.h>
#include<stdlib.h>
#include <my_global.h>
#include <mysql.h>

int main(int argv, char* argc[]) {
	printf("\nSuccesfully Included SQL libraries in Project\n");
	printf("MySQL client version: %s\n", mysql_get_client_info());
	return 0;
}

There are two problems with this 

 1 Eclipse Compiler Warnings

C:\Program Files\MySQL\MySQL Connector C 6.0.2\include/my_global.h: In function ‘strtok_r’:
C:\Program Files\MySQL\MySQL Connector C 6.0.2\include/my_global.h:825: warning: implicit declaration of function ‘strtok’
C:\Program Files\MySQL\MySQL Connector C 6.0.2\include/my_global.h:825: warning: return makes pointer from integer without a cast
In file included from ../sql_test.c:9:
C:\Program Files\MySQL\MySQL Connector C 6.0.2\include/my_global.h:890:1: warning: "isnan" redefined
In file included from C:\Program Files\MySQL\MySQL Connector C 6.0.2\include/my_global.h:424,
                 from ../sql_test.c:9:
/usr/include/math.h:205:1: warning: this is the location of the previous definition
Question : How can i get rid of these warnings? Am i missing some configuration or setting? I can try remove these errors from the code but i assume they are valid and are present for some good reason.

2 The missing LIBMYSQL.dll : cannot open shared object :no such file or directory
I have included mysql libmysql and mysqlclient libraries in project library settings. despite this the output exe does not run without libmysql.dll being present near it.
Question :How can i solve this linkage error, What am i missing

Options: ReplyQuote


Subject
Views
Written By
Posted
Eclipse Cygwin C (libmysql) compile warnings and linkage problem
4383
April 28, 2011 05:03AM


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.