Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:18 Go to next message
Stefan Wissenbach is currently offline Stefan WissenbachFriend
Messages: 1
Registered: March 2012
Junior Member
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 09:04 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
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().


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:iostream not recognized
Next Topic:libxml2
Goto Forum:
  


Current Time: Fri Apr 19 22:58:12 GMT 2024

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

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

Back to the top