Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Compiling error with UPP 4810
Re: Compiling error with UPP 4810 [message #36143 is a reply to message #36111] Thu, 03 May 2012 21:59 Go to previous messageGo to previous message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hello Koldo,

Just to make the point about the compilation issue. I just update my UPP to version 4874 and now all projects (including Controls4U_Demo) is compiling perfectly either in debug and release modes using either MSC9 (SDK 6.1) or MSC10 (SDK 7.1). I did not understand really why but I think some change(s) have been implemented between UPP 4705 and UPP 4874 as the same compilation issue occurred on 2 different computers (my personal PC at home and the machine I used in my company). Moving to UPP 4874 has solved the problem on both computers (!).

When compiling in release optimal mode a project including the MySql layer for direct connection to the server (native mode), I have noticed a "bug" in the MySql.cpp file (line 275) as shown hereafter:

	if(result) 
        {
	DDUMP(rows);// This is the problem in optimal mode
	int fields = mysql_num_fields(result);
	info.SetCount(fields);
	convert.Alloc(fields, false);
	for(int i = 0; i < fields; i++) {
	MYSQL_FIELD *field =    mysql_fetch_field_direct(result, i);
	SqlColumnInfo& f = info[i];
	f.name = field->name;
	switch(field->type) {
	case FIELD_TYPE_TINY:
	case FIELD_TYPE_SHORT:
	case FIELD_TYPE_LONG:
	case FIELD_TYPE_INT24:
		f.type = INT_V;
		break;
	case FIELD_TYPE_LONGLONG:
	case FIELD_TYPE_DECIMAL:
	case FIELD_TYPE_FLOAT:
	case FIELD_TYPE_DOUBLE:
	       f.type = DOUBLE_V;
	       break;
	case FIELD_TYPE_DATE:
		f.type = DATE_V;
		break;
	case FIELD_TYPE_DATETIME:
	case FIELD_TYPE_TIMESTAMP:
		f.type = TIME_V;
		break;
	case FIELD_TYPE_VAR_STRING:
	case FIELD_TYPE_STRING:
		convert[i] = true;
		default:
		f.type = STRING_V;
		break;
		}
		f.width = field->length;
		f.scale = f.precision = 0;
	}
        ....


I had to modify it as follows:

if(result) 
{
   #if DEBUG //new line
   DDUMP(rows);
   #endif //new line

   int fields = mysql_num_fields(result);
   ...


Hope this could be helpful

Regards

Biobytes
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: debugging speed exes
Next Topic: How do I set compiler/linker options for a specific project
Goto Forum:
  


Current Time: Mon May 06 10:47:08 CEST 2024

Total time taken to generate the page: 0.02552 seconds