Guidance Forums / wxWidgets (wxWindows) in C++ / error to  compile application in 2.6.0 version of wxwidget

Search 搜索
Home Home

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. error to  compile application in 2.6.0 version of wxwidget
Posted by: suhas 2005-06-15 19:53:32
hi i am new for this forum so if there is any mistake in this then sorry for that.
upto now i am using wxwindows 2.4.2 and now i am trying for 2.6.0 version, it runs all sample diven in the wxWindows directory, but when i am trying to run the application made by the me or any others, it gives me compile time errors. whenever i am trying to create the new application using wizard then it takes the all lib files and path for the wxWindows 2.4.2 version.

is it so that for 2.6 version i have to install new project wizard?
 please help me as soon as posible....
Message2. Re: error to  compile application in 2.6.0 version of wxwidget
Posted by: 2005-09-27 18:33:18
Hello Mr. Suhas.

I had the same problem while changing fom DEV C++ with wxWidgets 2.4.x to wxDEV C++ with 2.6.1.

You are right, to set up a new project will solve the problem. Please don't ask me why. Perhaps the new version has other lib-files. I gues so because the exe-file is 2-times bigger then with wsWidgets 2.4.x. Thus it is nessesary to change the parameters for the linker.

I think you shouldn't be wory about it. It's easier to setup a new project now. With the old DEV C++ I had the same trouble until I found a hint at that has a complite list of all linker-parameters you will need to setup your project for the old version. But the new version of DEV C++ seems allready to know them.
Only for the final release it is nessesarry to scib all unused lib-parameters to reduce the disc-space.

Kind Regards,
                           Eckard Klotz
Message3. problem with database
Posted by: sjoyous 2005-10-04 20:13:43
 i am using wxWindows-2.4.2 and i am developing the attendance system using smart card, i am using mysql as back hand. To connect with database i am using ODBC driver.
my problem:
 when i am trying to access the table having column with datatype as DATE.
for this table i am using the wxDbTable class to create the table object for the sql database table. by using this object i am specifying column information by using SetColDef() function of wxDbTable class. in this i have to specify all constraints of the column, in this for data type i have used the identifier SQL_C_DATE.
now when i am trying to delete any record using Delete() function of the wxDbTable class, in this it first build the where clause, in which according to the identifier it will build the where statement.
in source code it just like following

file name is : dbtable.cpp

for (i = 0; i < noCols; i++)
        // Determine if this column should be included  in the WHERE clause
        if ((typeOfWhere == DB_WHERE_KEYFIELDS && colDefs[i].KeyField) ||
             (typeOfWhere == DB_WHERE_MATCHING  && (!IsColNull(i))))
            // Skip over timestamp columns
            if (colDefs[i].SqlCtype == SQL_C_TIMESTAMP)
            // If there is more than 1 column, join them with the keyword "AND"
            if (moreThanOneColumn)
                pWhereClause += wxT(" AND ");
                moreThanOneColumn = TRUE;
            // Concatenate where phrase for the column
            if (qualTableName.Length())
                pWhereClause += pDb->SQLTableName(qualTableName);
//                pWhereClause += qualTableName;
                pWhereClause += wxT(".");
            pWhereClause += pDb->SQLColumnName(colDefs[i].ColName);
//            pWhereClause += colDefs .ColName;
            if (useLikeComparison && (colDefs[i].SqlCtype == SQL_C_CHAR))
                pWhereClause += wxT(" LIKE ");
                pWhereClause += wxT(" = ");
                case SQL_C_CHAR:
                    colValue.Printf(wxT("'%s'"), (UCHAR FAR *) colDefs[i].PtrDataObj);
                case SQL_C_SSHORT:
                    colValue.Printf(wxT("%hi"), *((SWORD *) colDefs[i].PtrDataObj));
                case SQL_C_USHORT:
                    colValue.Printf(wxT("%hu"), *((UWORD *) colDefs[i].PtrDataObj));
                case SQL_C_SLONG:
                    colValue.Printf(wxT("%li"), *((SDWORD *) colDefs[i].PtrDataObj));
                case SQL_C_ULONG:
                    colValue.Printf(wxT("%lu"), *((UDWORD *) colDefs[i].PtrDataObj));
                case SQL_C_FLOAT:
                    colValue.Printf(wxT("%.6f"), *((SFLOAT *) colDefs[i].PtrDataObj));
                case SQL_C_DOUBLE:
                    colValue.Printf(wxT("%.6f"), *((SDOUBLE *) colDefs[i].PtrDataObj));
				case SQL_C_DATE:
					 colValue.Printf(wxT("'%s'"), ((UCHAR FAR *) colDefs[i].PtrDataObj);
            pWhereClause += colValue;

so now my problem is that ther is no identifier available for the SQL_C_DATE type in the above case statement.
so is there any solution for this , if you find then please reply as soon as possible because it is very urgent.
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
© Tue 2024-7-16  Guidance Laboratory Inc. Hits:0