Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Lots of undefined reference to `_imp__ZN on windows qextserialport

Lots of undefined reference to `_imp__ZN on windows qextserialport

Scheduled Pinned Locked Moved 3rd Party Software
7 Posts 5 Posters 4.5k 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.
  • N Offline
    N Offline
    neutrino15
    wrote on last edited by
    #1

    Hello,

    I am linking to qextserialport statically. It works in Linux, but when I compile the project in Windows I get a bunch of linker errors that all look like:

    @
    error: undefined reference to _imp___ZN14QextSerialPort11setBaudRateE12BaudRateType' error: undefined reference to _imp___ZN14QextSerialPort5flushEv'
    error: undefined reference to `_imp___ZN14QextSerialPort11setBaudRateE12BaudRateType'
    @

    ... and so on. There are about 90 of them.

    All of the errors are complaining about things that are defined in qextserialport.h and used in qestserialport.cpp (I have not checked all of the errors, but about 10 of them are this way). It is curious that this is happening in the linker, as qextserialport seems to be compiling properly.

    All of my object files are being dumped into the source folder, so there should be no path issues. I am pretty sure that the linker is finding qextserialport.o

    It's also strange that it's working on Linux (same project) but not Windows.

    Can anybody point me in the right direction?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      Welcome to devnet

      Your problem might be missing macro definitions for windows.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • N Offline
        N Offline
        neutrino15
        wrote on last edited by
        #3

        I assume that any necessary macros are defined in the qextserialport header file. Are there other windows-specific files that I might be missing? Those _imp__ZN... strings don't look like standard windows macros.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          Is your project actually linking against QextSerialPort?

          1 Reply Last reply
          0
          • N Offline
            N Offline
            neutrino15
            wrote on last edited by
            #5

            First, thanks for the responses. It's nice to see that these forums are active!

            qextserialport is being compiled along with the rest of my source. The qextserialport object file being in the linker's path should take care of this. This works on Linux.

            I tried specifying -lqextserialport in the build options, the linker complains about there being no such system library (as expected). Users will not have this library, and I do not want to install the library with my application. It needs to be statically linked.

            Is it possible that I'm not linking to some Windows library that qexserialport relies on?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dbzhang800
              wrote on last edited by
              #6

              Hi,

              Maybe you are using an old version, if you still have such issues with latest qextserialport

              http://code.google.com/p/qextserialport/wiki/QextSerialPort_1_2_Beta1

              feel free to report bugs.

              Debao

              1 Reply Last reply
              0
              • L Offline
                L Offline
                lgeyer
                wrote on last edited by
                #7

                Judging from the symbol names I would say that you are trying to link dynamically against a static version of the library. Make sure QEXTSERIALPORT_BUILD_SHARED is not defined.

                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