×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    49

    problem with install for VC2008

    I want write somme app that wil be working on every device, so at the first i want to install whole enviroment. I have some problem with qt mobility and visual studio 2008. Qt and qt for winCE work fine with Visual.
    I have instaled Qt mobility using Qt prompt, unfortunalety the smallest example doesn't work in visual studio 2008.Probably I sholud use visual studio prompt and just type configure and nmake? Am I right?
    when I am using Visual studio prompt I have 2 kinds of problem

    1. When I use qmake for windows then qmake is found properly but after I have problem:
    Code:
    ... Unknown target environment project.
     "Cannot find 'nmake', 'mingw32-make' or 'make' in your PATH"
     "Aborting."
    2. when I use qmake from Qt for winCE configure is fine. When e I type "nmake" after some time of compilation there is problem something like this: 'x86' is in conflict with....
    I it is necessary i can past here the communicate from console.

    In documentation there is written, it is necessary to add two line in *.pro file

    CONFIG += mobility
    ......

    but where in visual studio is *.pro file?

  2. #2
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: problem with install for VC2008

    Case 2 (Qt for WinCE) is what you're after. If you pass the -vc option to Mobility's configure script it will create the project/solution files that you need in order to build Mobility from within Visual Studio.

    If you'd prefer to work from the command line you have to make sure that your paths are set up correctly. There should be a script that comes with the Qt for WinCE installation called setcepaths. Type it in with no arguments to see what it's expecting, then type it in with the argument describing your visual studio version in order to proceed. Then change directory to Mobility and nmake should work.

    The first time you do this you may need to run "nmake clean" first in order to reset things to a workable state.

    I don't know where you're [project name].pro file is - I normally create them by hand - if it's been auto generated I can imagine it's in the root directory of your project. Let me know when mobility is compiling and you've location your .pro file if you're still having trouble.

    Cheers,

    Dave

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    49

    Re: problem with install for VC2008

    I have starteed at the begining:
    from visual studio 2008 comand prompt
    nmake clean
    configure -vc //discovery qmake 4.6.1 (from Qt for winCE)
    nmake
    nmake install

    Then I create new project for winCE and in main.cpp put "#include <QSystemInfo> " and unfortunately compilator doesn't see this file. Error: "Cannot open include file: 'QSystemInfo': No such file or directory"

    Application write in visual studio for Windows and WinCe works excelent without any "include" from QtMobility.

    When You create *.pro by yourself, what do you do that visual studio use this file during compilation projet?

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    49

    Re: problem with install for VC2008

    I made some progress.
    I use qmake form Qt 4.6.1 for Windows. I have installed QtMobility and now I am trying to write first application in Visual Studio 2008.
    1.I created Qt4 Gui Application.
    2. create *.pro file from project and add to this file
    Code:
    CONFIG += mobility
    MOBILITY += systeminfo
    QT       += network
    3. Menu qt->open Qt projet file(*.pro) and i get file I edited

    My code is
    Code:
    #include <QtGui/QApplication>
    #include <QLabel>
    #ifdef Q_OS_SYMBIAN
    #include <qsysteminfo.h>
    #else
    #include <QSystemInfo> //(1)
    #endif
    using namespace QtMobility; //(2)
    int main(int argc, char *argv[])
    {
    	QApplication a(argc, argv);
            QLabel *label = new QLabel("test");
    	label->show();label->resize(100,30);
    	return a.exec();
    }
    To this point everything is fine and when I run app I can see smal window witch "test"
    But when I add one line:
    Code:
    #include <QtGui/QApplication>
    #include <QLabel>
    #ifdef Q_OS_SYMBIAN
    #include <qsysteminfo.h>
    #else
    #include <QSystemInfo> //(1)
    #endif
    using namespace QtMobility; //(2)
    int main(int argc, char *argv[])
    {
    	QApplication a(argc, argv);
    	QtMobility::QSystemInfo s;
    	QLabel *label = new QLabel("qwe");
    	label->show();label->resize(100,30);
    	return a.exec();
    }
    Then compilator says that it can't find "QtSystemInfo_tpd.dll"
    File "QtSystemInfo_tpd.dll" is in c:\QtMobility\lib. In project setting in Visual I added this path to "Additional Library Directories" and I have system variable LD_LIBRARY_PATH=c:\QtMobility\lib
    So anyone has idea when I made misteake?

  5. #5
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: problem with install for VC2008

    Maybe add a reference to the library in the .pro file using the LIBS variable?

    That's all I've got at the moment. If you post your full .pro file I can try it on my machine and see what happens.

    Cheers,

    Dave

  6. #6
    Registered User
    Join Date
    Oct 2008
    Posts
    49

    Re: problem with install for VC2008

    source code: source-link
    pro file: pro-link
    Visual studio also create *.pri
    Code:
    # ----------------------------------------------------
    # This file is generated by the Qt Visual Studio Add-in.
    # ------------------------------------------------------
    
    SOURCES += ./main.cpp
    Qt for Windows: 4.6.1
    QtMobility: qt-mobility-src-1.0.0-tp2

  7. #7
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: problem with install for VC2008

    Thanks for that - what you need to do is replace
    LIBS += c:/QtMobility/lib
    with
    LIBS += c:/QtMobility/lib/QtSystemInfod.lib
    in your pro file.

    Then it should compile and link, and it should run provided you have c:/QtMobility/lib in your path.

    You might then have issues with Qt for WinXP and Qt for WinCE clashing - Visual Studio should take care of most things for you, if you do anything from the command line (including compiling mobility) you might need to run setcepaths to make sure everything works.

    Hope this helps (and good luck),

    Dave

  8. #8
    Registered User
    Join Date
    Oct 2008
    Posts
    49

    Re: problem with install for VC2008

    Quote Originally Posted by dalaing View Post
    LIBS += c:/QtMobility/lib/QtSystemInfod.lib
    You think about?:
    Code:
    LIBS += c:/QtMobility/lib/QtSystemInfo_tpd.lib
    Unfortunately it does not help. Do you run it on Visual Studio?

  9. #9
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: problem with install for VC2008

    After you modify the .pro file you'll need to run qmake again.

    For building from the command line you can just use "qmake", however to set everything up for Visual studio you need to use "qmake -tp vc". I've tested both cases with your .pro, .pri and .cpp files and freshly configured Mobility and it's worked for me. I'm trying to think of exotic Visual Studio settings that might interfere with things, although none spring to mind immediately.

    Edit: I thought that needing the LIBS variable was a bit strange, so I removed it. The MOBILITY += SystemInfo line takes care of that for you, so it looks like all you needed to get past the link error was to run qmake (or qmake -tp vc in your case) before building.

    Hope this helps,

    Dave

  10. #10
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: problem with install for VC2008

    Unfortunately you cross posted in the "Installation of QtMobility on WinCE" thread, so anyone else reading will lose a bit of context.

    The new problem is a runtime error "An error occured that usually indicates a corrupt installation" at startup when SystemInfo was used in a test application.

    This normally means that a dependency is missing or can't be found.

    Since the deployment conatained
    2>C:\Qt\4.6.1\qt\lib\QtCored4.dll
    2>C:\Qt\4.6.1\qt\lib\QtGuid4.dll
    2>C:\Qt\4.6.1\qt\lib\QtNetworkd4.dll
    2>C:\QtMobility\lib\QtSystemInfo_tp.dll
    it looks like the odd one out is C:\QtMobility\lib\QtSystemInfo_tp.dll, as all of the others are debug libraries and that one isn't.

    If you have the file C:\QtMobility\lib\QtSystemInfo_tpd.dll somewhere, it's probably an alright idea to copy that across to the directory on the device containing your application (using ActiveSync, explore, etc). If that works you'll probably want to go into your project properties and make the necessary adjustments to the "Deployment" section, and possibly some others.

    Another thing you could try is doing a release build of your test app, which may also fix the problem. If you're going to need both debug and release builds of Mobility you can pass "-debug -release" to configure, which might also help.

    There are various pages on the web about using dependencywalker with WinCE if there are other missing dependencies, shouldn't take more than a minute of googling to find if you need them.

Similar Threads

  1. Problem with DLL install
    By 2gun in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 5
    Last Post: 2009-10-09, 09:40
  2. Installation Problem: Unable to install.....
    By BeirBear in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 30
    Last Post: 2009-09-05, 03:56
  3. Install problem with SDK Series 60 2nd Ed FP3
    By ygivenchy in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2006-08-01, 09:03
  4. Replies: 0
    Last Post: 2005-11-27, 02:11
  5. MIDlet install problem
    By climberz in forum Mobile Java General
    Replies: 1
    Last Post: 2004-08-06, 09:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •