Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User PC-Man's Avatar
    Join Date
    May 2010
    Posts
    1
    I like to use QBluetooth library for my project (Nokia 5800 app).

    I did these steps - http://wiki.forum.nokia.com/index.ph...etooth_library -> Including the library -> Use the binaries :

    1) I copied library files to epoc32 folder


    2) I copied this block to my .pro file

    Code:
    symbian{
           INCLUDEPATH += /epoc32/include/QBluetooth
           LIBS += -lQBluetooth
     
           customrules.pkg_prerules  = \
    	";QBluetooth" \
    	"@\"$(EPOCROOT)Epoc32/InstallToDevice/QBluetooth_selfsigned.sisx\",(0xA003328D)"\
    	" "	
     
    	DEPLOYMENT += customrules
    }

    And I have problem:

    If I use in code #include <QBluetooth>, Qt Creator show error: QBluetooth: No such file or directory...

    (Sorry for my english)

  2. #2
    Registered User favoritas37's Avatar
    Join Date
    May 2009
    Location
    Greece
    Posts
    191
    First of all make sure that you are building the project at Phone Debug (or Release) configuration. Any other configuration (Qt Simulator for instance) will not do. This will fix the include problem.

    Also in Qt Creator the following line:
    Code:
    "@\"$(EPOCROOT)Epoc32/InstallToDevice/QBluetooth_selfsigned.sisx\",(0xA003328D)"\
    must be changed into
    Code:
    "@\"$$(EPOCROOT)Epoc32/InstallToDevice/QBluetooth_selfsigned.sisx\",(0xA003328D)"\
    (we add one more '$')

    Now you should be fine!
    Last edited by favoritas37; 2011-02-20 at 19:49. Reason: visual edit

  3. #3
    Registered User favoritas37's Avatar
    Join Date
    May 2009
    Location
    Greece
    Posts
    191
    One more thing, to include the library write #include <QBluetooth.h>
    The .h is needed.


  4. #4
    Registered User colorfulFOOL's Avatar
    Join Date
    Mar 2011
    Posts
    3
    Hello.
    I've got a question: where exactly headers must be placed?
    I have builded QBluetooth for Windows and writed to the .pro file of my program:
    Code:
    LIBS += -lQBluetooth -L$$(QTDIR)/QBluetooth/bin
    INCLUDEPATH += ..\QBluetooth
    HEADERS += ..\QBluetooth\QBluetooth.h
    and got errors
    Code:
    In file included from ..\bluetooth-computer\main.cpp:2:
    
    ..\bluetooth-computer\/widget.h:6:24: error: QBluetooth.h: No such file or directory
    
    ..\bluetooth-computer\/widget.h:7:23: error: QBtDevice.h: No such file or directory
    
    In file included from ..\bluetooth-computer\main.cpp:2:
    
    ..\bluetooth-computer\/widget.h:24: error: 'QBtDevice' was not declared in this scope
    
    ..\bluetooth-computer\/widget.h:24: error: template argument 1 is invalid
    
    ..\bluetooth-computer\/widget.h:28: error: 'QBtDevice' has not been declared
    I tried to copy HEADERS and INCLUDEPATH from QBluetooth.pro and it did not help.
    Last edited by colorfulFOOL; 2011-03-11 at 18:44.

  5. #5
    Registered User colorfulFOOL's Avatar
    Join Date
    Mar 2011
    Posts
    3
    Well, I copied all QBluetooth .h files to the same directory as library file and errrors seems to disappear.
    But after building is finished, I got
    Code:
    Starting E:\Qt\Projects\bluetooth-computer-build-desktop\debug\bluetooth-computer.exe...
    The process could not be started!
    Last edited by colorfulFOOL; 2011-03-11 at 22:26.

  6. #6
    Nokia Developer Moderator ltomuta's Avatar
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,335
    Did anyone say that the QBluetooth library should work on desktop PC as well? Unless you have strong reasons to think that to be the case, I would suggest that you limit yourself to using it in Symbian targeted builds.

  7. #7
    Registered User colorfulFOOL's Avatar
    Join Date
    Mar 2011
    Posts
    3
    It is written here.
    And after several days of problems solving I got it working in Windows.

  8. #8
    Nokia Developer Moderator ltomuta's Avatar
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,335
    Nice. Apparently I stopped reading just before "... and Windows."

  9. #9
    Registered User eng.ahmad ali's Avatar
    Join Date
    Mar 2012
    Posts
    1
    i also have the same problem
    can any body help us ?

Similar Threads

  1. Replies: 7
    Last Post: 2010-07-14, 14:58
  2. trouble using QBluetooth library
    By anujk3 in forum Qt
    Replies: 2
    Last Post: 2010-07-10, 21:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved