Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
CapQNX
Posts: 99
Registered: ‎01-11-2013
My Device: BlackBerry Curve
My Carrier: Docomo
Accepted Solution

ERROR:- undefined reference to vtable & undefined reference to QtSoapHttpTransport

Hello, Friends.. 

 

I am implementing SOAP WebServices.. Its successfully work in demo application. I got code from SourceCode, but when I implementing same code in my live project then it is give me error in .hpp file.

 

undefined reference to vtable  & undefined reference to QtSoapHttpTransport

 

Please use plain text.
Developer
simon_hain
Posts: 15,842
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: ERROR:- undefined reference to vtable & undefined reference to QtSoapHttpTransport

check the HEADERS and SOURCE section in the pro file if you added files in another folder. the sample adds the qtsoap classes in a separate folder, see the sample pro file.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
CapQNX
Posts: 99
Registered: ‎01-11-2013
My Device: BlackBerry Curve
My Carrier: Docomo

Re: ERROR:- undefined reference to vtable & undefined reference to QtSoapHttpTransport

Hey simon_hain, when I add HEADERS and SOURCE section in the pro file then getting error in all .cpp file like below..

multiple definition of 'main'

at this line.

int main(int argc, char **argv)
Please use plain text.
Developer
Zmey
Posts: 1,508
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: ERROR:- undefined reference to vtable & undefined reference to QtSoapHttpTransport

Seems you're added main.cpp among other files. There should be only one entry point in the application and your application already has main() function defined.

Copy only the library files (where QtSoapHttpTransport is defined) to your project and add them to .pro file.

Andrey Fidrya, @zmeyc on twitter
Please use plain text.
Developer
CapQNX
Posts: 99
Registered: ‎01-11-2013
My Device: BlackBerry Curve
My Carrier: Docomo

Re: ERROR:- undefined reference to vtable & undefined reference to QtSoapHttpTransport

[ Edited ]

I got same error in all .ccp file, I am sure that all functions declare at once in whole project.. as per your solution i add only that library file to .pro file. after that no any error in class but got error in project folder like http://208.74.204.192/t5/Cascades-Development/Error-In-project-when-trying-FilePicker-code/m-p/20897...

Please use plain text.
Developer
rcebryk
Posts: 84
Registered: ‎12-01-2012
My Device: 9790
My Carrier: Orange

Re: ERROR:- undefined reference to vtable & undefined reference to QtSoapHttpTransport

If the .pro file is correct then the issue can be solved by cleaning the project nad building it again.
Lublin BlackBerry Developer Group


---
If I helped you please mark my response as solution or "Like" it.
Please use plain text.
Developer
CapQNX
Posts: 99
Registered: ‎01-11-2013
My Device: BlackBerry Curve
My Carrier: Docomo

Re: ERROR:- undefined reference to vtable & undefined reference to QtSoapHttpTransport

I don't know my .pro file is correct or not, but I did many time clean & build.. still getting error on main folder of project
Please use plain text.
Developer
rcebryk
Posts: 84
Registered: ‎12-01-2012
My Device: 9790
My Carrier: Orange

Re: ERROR:- undefined reference to vtable & undefined reference to QtSoapHttpTransport

There is one workaround to make the .pro file correct, I could not find a shorter way but it should exist.

 

You can create new Project and add all the classes (.cpp .h files) to the project again. Please note that if you will just copy the cpp. (.h, .hpp) files into src directory it won't be correctly added to pro file. You need to use the: New -> Class and define all the classes that you would like to use, then just update the code.

Lublin BlackBerry Developer Group


---
If I helped you please mark my response as solution or "Like" it.
Please use plain text.
Developer
CapQNX
Posts: 99
Registered: ‎01-11-2013
My Device: BlackBerry Curve
My Carrier: Docomo

Re: ERROR:- undefined reference to vtable & undefined reference to QtSoapHttpTransport

[ Edited ]

Hey, rcebryk. I did same as your way.. created new project & create all new class, and copy/paste code inside class.. but still facing same error...

 

 

Update:

 

When I change this line CONFIG += qt warn_on debug_and_release cascades,  all error gone, also created binaries files but when I trying to run it give me error Launch Failed no binaries, 

 


I don't know why this error coming, becuase there are already created binaries files..

Please use plain text.
Developer
rcebryk
Posts: 84
Registered: ‎12-01-2012
My Device: 9790
My Carrier: Orange

Re: ERROR:- undefined reference to vtable & undefined reference to QtSoapHttpTransport

Hej CapQNX,

 

I have just downloaded the project from https://developer.blackberry.com/cascades/files/release/samples/platform/soapxml.zip

 

I have imported it into the workspace straight from archive, set build configuration to Device-Debug, built it and it's working. You must have changed something that broke the vtable.

 

Does you .pro file contain:

SOURCES += ../src/*.cpp ../src/qtsoap/*.cpp
HEADERS += ../src/*.hpp ../src/*.h ../src/qtsoap/*.h

Lublin BlackBerry Developer Group


---
If I helped you please mark my response as solution or "Like" it.
Please use plain text.