Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Link error when using polymorphism
Re: Link error when using polymorphism [message #15693 is a reply to message #15691] |
Sun, 04 May 2008 20:33 |
bytefield
Messages: 210 Registered: December 2007
|
Experienced Member |
|
|
Well, there are some problems.
You forgot to implement some functions
bool DBConnector::Disconnect()
{
}
bool DBConnector::Connect(String db)
{
}
int DBConnector::SQLExecDML(const String &request)
{
}
cResultSet DBConnector::SQLExecQuery(const String &request)
{
}
if you put these functions in DBConnector.cpp all thing goes normally, and program compiles without errors.
I've commented out
//#include <Toolkit/Tools.h>
//using namespace VirtualSofts::Tools;
in every file, because you didn't provided that package, and also included in your project Core package if you want to use u++ Strings.
The program compiles well, but there are memory leaks and guess that is because you mix Ultimate++ code (String which is moveable and implement pick concept) with std containers which use deep copy concept. So you should use U++ containers or use std::string with std containers instead of Upp::String with std containers.
As suggestion: never mix Ultimate++ with STL and use case sensitive package name, because it matter on Linux platform.
( you provided MySQLconnector instead of MySQLConnector)
P.S.: SQL is implemented in Ultimate++ so you may use it if you need.
Edit: it didn't implement a polymorphic type.
Andrei
-
Attachment: SQLTest.zip
(Size: 4.60KB, Downloaded 290 times)
cdabbd745f1234c2751ee1f932d1dd75
[Updated on: Sun, 04 May 2008 20:36] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue May 14 16:40:51 CEST 2024
Total time taken to generate the page: 0.01968 seconds
|