Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Failing to load VRPN Library
QtWS25 Last Chance

Failing to load VRPN Library

Scheduled Pinned Locked Moved Unsolved General and Desktop
vrpnvirtual realitylnk1104libraries
20 Posts 2 Posters 6.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • TurmoltT Offline
    TurmoltT Offline
    Turmolt
    wrote on last edited by
    #1

    Hello!

    I have been working on a project that integrates with the Virtual Reality Peripheral Network for a while now, and I recently learned how much easier it would be if I was using QT Creator to create my GUI instead of VS15 using C++/CLR. I went to start.. but when I try to load the VRPN.lib into the QT Creator project it tells me "LNK1104: cannot open file 'vrpn.lib'"

    I have linked it like so

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Lib/BuiltVRPN/release/ -lvrpn
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Lib/BuiltVRPN/debug/ -lvrpn
    else:unix: LIBS += -L$$PWD/../../Lib/BuiltVRPN/ -lvrpn
    
    INCLUDEPATH += $$PWD/../../Lib/vrpn
    DEPENDPATH += $$PWD/../../Lib/vrpn
    

    What am I doing wrong? I have the library working in my VS project so I am stumped as to why this isn't working..

    Any help would be greatly appreciated!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Does PWD contain an path with spaces ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      TurmoltT 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Does PWD contain an path with spaces ?

        TurmoltT Offline
        TurmoltT Offline
        Turmolt
        wrote on last edited by
        #3

        @SGaist no sir, it looks something like this:

        S:\Coding\Lib\BuiltVRPN\Release
        

        and the include/depend path is the same but BuiltVRPN is replaced with vrpn.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What's the exact name of the vrpn.lib file ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • TurmoltT Offline
            TurmoltT Offline
            Turmolt
            wrote on last edited by
            #5

            http://s28.postimg.org/4482tb0ql/Exact.png

            "vrpn.lib"

            Thank you for the quick replies! I am at a standstill with this project until I figure it out and I appreciate your help.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              What version of Visual Studio was used to build vrpn ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • TurmoltT Offline
                TurmoltT Offline
                Turmolt
                wrote on last edited by
                #7

                Visual Studio 12 2013 Win64.

                And I am using the QT version (if this is useful at all):
                Qt Creator 3.6.0
                Based on Qt 5.5.1 (MSVC 2013, 32 bit)

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  The Qt Creator version itself doesn't really matter. It can build Qt application with various compilers.

                  However in your original post you mention VS15 so I guess you meant 2015 otherwise it would be 14 (the version number doesn't match the year). So if that's indeed the case, you have to rebuild vrpn with it. Microsoft compilers are not compatible one with the other so you must ensure that all the libraries and application you are building are using the same version of it.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • TurmoltT Offline
                    TurmoltT Offline
                    Turmolt
                    wrote on last edited by
                    #9

                    Well, that was the case (compiled with VS 2013 and then recently updated to VS 2015), but I just recompiled in CMake using VS14 2015 and tried to include the library within my QT project with the same results..

                    I was super excited thinking that that the solution.. damn.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Then the silly question, are both the Release and Debug build of vrpn having the same name ? Not a trailing d or something like that ? I doubt it but some times there are surprises.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • TurmoltT Offline
                        TurmoltT Offline
                        Turmolt
                        wrote on last edited by
                        #11

                        The Debug libraries do indeed have a d at the end of them.

                        So since I remade the .lib file I can't get it to even open within my VS project so I am now thinking that the library is not compiling correctly... I tried to fix find a fix to this with no luck.. I am going to keep trying to fix it and then reimport it to QT and see if it works..

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          If it has a suffix then you have to modify your LIBS line for debug i.e. LIBS += -lvrpnd

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • TurmoltT Offline
                            TurmoltT Offline
                            Turmolt
                            wrote on last edited by
                            #13

                            I was building VRPN for Release. Do you think that I should be building it for Debug...?

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              Since you have the possibility build it for both so you can also debug if needed.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • TurmoltT Offline
                                TurmoltT Offline
                                Turmolt
                                wrote on last edited by
                                #15

                                Building in Debug did fix loading the vrpn library (I also had to make sure I recursively cloned the git repository and its submodules) but now I am getting a linker error for an unresolved external symbol.

                                I loaded up the library in an new project in Visual Studio and got the same error. When I moved the library into the directory of the project, the problem ceased and the library is working perfectly. I moved the library into the directory for the QT project, and I am still getting the external symbol error.

                                I am wondering if this has to do with INCLUDEPATH and DEPENDPATH? I have both of them linking to the vrpn directory I cloned from git which has the header files and is what I ran through CMAKE to get my 'BuiltVRPN' folder and content. I then compiled the 'BuiltVRPN' project in VS14, and the library is in my BuiltVRPN\Debug folder. Is that correct? Is there something else that could be going on?

                                Again, appreciate the help!

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  Just to be sure, what version of Qt did you install ?

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • TurmoltT Offline
                                    TurmoltT Offline
                                    Turmolt
                                    wrote on last edited by Turmolt
                                    #17
                                    Qt Creator 3.6.0
                                    Based on Qt 5.5.1 (MSVC 2013, 32 bit)
                                    
                                    Built on Dec 15 2015 01:01:38
                                    
                                    From revision b52c2f91f5
                                    

                                    I see that MSVC 2013 was used. This is the problem, isn't it.

                                    I am downloading QT 5.6 which seems to have a MSVC2015 binary. I am hoping that this will solve the problem!

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #18

                                      That's the Qt Creator version. And the Qt version used to build it has absolutely no influence on that matter. What's important is the Qt version you installed as in "What package did you choose ?"

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • TurmoltT Offline
                                        TurmoltT Offline
                                        Turmolt
                                        wrote on last edited by
                                        #19

                                        http://download.qt.io/development_releases/qt/5.6/5.6.0-rc/qt-opensource-windows-x86-msvc2015-5.6.0-rc.exe.mirrorlist

                                        that is the download I used to acquire QT5.6.0.

                                        The message I am getting is no longer failed to load vrpnd.lib, but now when I try to build while including the library I get a message saying "cannot open include file corecrt.h no such file or directory."

                                        It seems progress has been made at least a little bit.

                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #20

                                          This blog article might be of interest. Basically, you'll have to add the missing include path to the universal CRT.

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved