Results 1 to 8 of 8

Thread: Using libs built in VS2008?

  1. #1
    Join Date
    May 2009
    Location
    Columbia, MD. USA
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Using libs built in VS2008?

    Hello,
    I have built some library files for portaudio using VS 2008 and the msvc compiler so that I could use them with my Qt GUI application in Creator. but my application doesn't start and i don't get any build errors.
    When i go straight to the executable's directory and try to launch the .exe, i get the message
    and if i try to click the executable it says 'this program cant start because mingwm10.dll is missing from your computer try reinstalling the program to fix this problem.'
    But doesn't the installation of Qt take care of this for you? I've not had this problem before.
    can someone please help? below is the output when i build my application

    Thanks

    Running build steps for project SawUI...
    Starting: D:/Qt/2009.04/qt/bin/qmake.exe C:/Users/Laserbeak/Documents/SawUI/SawUI.pro -spec win32-g++ -r
    Exited with code 0.
    Starting: D:/Qt/2009.04/mingw/bin/mingw32-make.exe -w
    mingw32-make: Entering directory `C:/Users/Laserbeak/Documents/SawUI'
    D:/Qt/2009.04/mingw/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `C:/Users/Laserbeak/Documents/SawUI'
    gcc -c -g -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\Qt\2009.04\qt\include\QtCore" -I"d:\Qt\2009.04\qt\include\QtGui" -I"d:\Qt\2009.04\qt\include" -I"d:\source\portaudio\include" -I"d:\source\portaudio\src\os\win" -I"d:\Qt\2009.04\qt\include\ActiveQt" -I"debug" -I"." -I"d:\Qt\2009.04\qt\mkspecs\win32-g++" -o debug\patest_saw.o d:\source\portaudio\test\patest_saw.c
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\SawUI.exe debug/main.o debug/mainwindow.o debug/patest_saw.o debug/moc_mainwindow.o -L"d:\Qt\2009.04\qt\lib" -lmingw32 -lqtmaind D:\source\portaudio\build\msvc\Win32\Debug\portaud io_x86.lib D:\source\portaudio\build\msvc\Win32\Release\porta udio_x86.lib -lQtGuid4 -lQtCored4
    mingw32-make[1]: Leaving directory `C:/Users/Laserbeak/Documents/SawUI'
    mingw32-make: Leaving directory `C:/Users/Laserbeak/Documents/SawUI'
    Exited with code 0.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using libs built in VS2008?

    Qt Creator uses a MinGW environment, so any app compiled in it will need the MinGW DLL. You can copy the dll from the installed Qt directory.

  3. #3
    Join Date
    May 2009
    Location
    Columbia, MD. USA
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using libs built in VS2008?

    Quote Originally Posted by fatjuicymole View Post
    Qt Creator uses a MinGW environment, so any app compiled in it will need the MinGW DLL. You can copy the dll from the installed Qt directory.
    Thanks for that, but it's asking for all kinds of .dlls ones that i've included a path to in my .pro file and even qt ones. shouldn't creator take care of this ?

    -edit-
    I even put the QtCore4.dll in the directory since it asked for it and it still asks for it.

  4. #4
    Join Date
    May 2009
    Location
    Columbia, MD. USA
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using libs built in VS2008?

    ok, it runs when i click run in creator, but asks for QtCore4.dll when i click the actual executable. AND, when it runs, only the portaudio portion runs. The GUI i've with Creator/Designer, doesn't show up.

  5. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using libs built in VS2008?

    Yes, it'll ask for all the DLLs, QtCore4, QtGUI4, etc, all the modules you've asked for, unless those DLLs are in the system PATH.

    Secondly, whilst you can use a DLL written in Visual Studio in QtCreator, you can't link to the appropriate .lib file, as GCC and MSVC uses incompatible formats.

    Compile the entire thing in MSVC, or in QtCreator, not both.

    If you don't want the DLL dependency, then recompile Qt statically, but read the license first.

  6. #6
    Join Date
    May 2009
    Location
    Columbia, MD. USA
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using libs built in VS2008?

    Quote Originally Posted by fatjuicymole View Post
    Secondly, whilst you can use a DLL written in Visual Studio in QtCreator, you can't link to the appropriate .lib file, as GCC and MSVC uses incompatible formats.

    Compile the entire thing in MSVC, or in QtCreator, not both.
    I've always wondered that. Thing is, I don't know if i can build these libs with gcc. or at least there's no documentation to do it.

    -edit- and if i can't link the third party lib, then why is it that the third party part of the app is the only thing that's working?

  7. #7
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using libs built in VS2008?

    Without seeing exactly how you are building & linking it all together, I couldn't say.

  8. #8
    Join Date
    May 2009
    Location
    Columbia, MD. USA
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using libs built in VS2008?

    Quote Originally Posted by fatjuicymole View Post
    Without seeing exactly how you are building & linking it all together, I couldn't say.
    just built qt again with msvc this time. added my msvc build to creator. ran it and i got what should be a ui, but it doesn't show up for some reason. I'll do my best to make a self contained project and post it in a bit.

Similar Threads

  1. qmake absolute vs relative LIBS path
    By TheShow in forum Newbie
    Replies: 7
    Last Post: 12th October 2010, 14:40
  2. Plugin LIBS path not found
    By vieraci in forum Qt Programming
    Replies: 7
    Last Post: 5th August 2009, 14:32
  3. Replies: 9
    Last Post: 15th April 2009, 06:23
  4. using third party libs
    By jay in forum Qt Programming
    Replies: 13
    Last Post: 14th April 2009, 15:52
  5. Bad relink libs on QT4 Mac OSX (install_name_tool)
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 7th April 2007, 09:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.