Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » C/C++ MinGW debug problem(Can't find a source file at "../mingw/crt1.c")
C/C++ MinGW debug problem [message #819007] Mon, 12 March 2012 07:18 Go to next message
Eclipse UserFriend
Hi all,

I'm using Windows XP SP3, Eclipse Indigo Service Release 1, MinGW gcc 4.6.2 and
MySQLConnectorC for a simple Database Connection.

It builds fine and I can run it from console, also Debugging with gdb is no problem.
The issue is Eclipse, when I run the code the console shows

<terminated>Test.exe[C/C++ Application]


In the debug mode everithing is normal, the connection is established and all
outputs are shown in the console but at the end there is

__mingw_CRTStartup() at .../mingw/crt1.c:250 0x4010bb
Can't find a source file at "../mingw/crt1.c"
Locate the file or edit the source lookup path to include its location.

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <windows.h>
#include <mysql.h>

int main() {
	MYSQL *conn;
	MYSQL_RES *res;
	MYSQL_ROW row;
	char *server = "localhost";
	char *user = "root";
	char *password = ""; /* set me first */
	char *database = "systemsimulation";
	conn = mysql_init(NULL);
	/* Connect to database */
	if (!mysql_real_connect(conn, server, user, password, database, 0, NULL,
			0)) {
		fprintf(stderr, "%s\n", mysql_error(conn));

	}
	/* send SQL query */
	if (mysql_query(conn, "show tables")) {
		fprintf(stderr, "%s\n", mysql_error(conn));

	}
	res = mysql_use_result(conn);
	/* output table name */
	printf("MySQL Tables in mysql database:\n");
	while ((row = mysql_fetch_row(res)) != NULL)
		printf("%s \n", row[0]);
	/* close connection */
	mysql_free_result(res);
	mysql_close(conn);

	return EXIT_SUCCESS;
}


Any suggestions for this problem?

Re: C/C++ MinGW debug problem [message #819731 is a reply to message #819007] Tue, 13 March 2012 05:04 Go to previous message
Eclipse UserFriend
You can safely ignore this message.
I guess during debug you stepped through the whole code until the last line. When your code is finished (i.e. your main() routine) it will return to the system function that actually started your code. In your case this is __mingw_CRTStartup().
Previous Topic:iostream not recognized
Next Topic:libxml2
Goto Forum:
  


Current Time: Thu Jun 12 15:45:23 EDT 2025

Powered by FUDForum. Page generated in 0.03483 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top