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. [SOLVED] Help request foreign library static linking
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Help request foreign library static linking

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.4k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    BorisSclauzero
    wrote on last edited by
    #1

    Hi all,
    I’m a beginner using Qt.
    Until now I’ve developed using mostly (VB | C#) & .Net Framework.

    I'm using the DLL version of this library in a VB+.Net project
    "Feitian – Rockey4nd":http://www.rockey.it/rockey4nd-download.htm
    I downloaded “ROCKEY4ND Windows SDK” (Note: This is gz compressed non zip)

    I'm trying to use it in a QtProject but I'm not able to understand which is the correct file to link and how to use the Rockey() funcion.

    Thanks in advance
    Boris

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bodzio131
      wrote on last edited by
      #2

      Hi,

      Which compiler do you use? static lib for mingw seems to be inside Api32\DEV_C++, dynamic for mingw/VS inside Api32\Dynamic, and static for VS inside Api32\Static.

      What is the problem with Rockey() ? the first pages in "Docs\Rockey4ND Developer Guide.pdf" are simple introduction into API convention. Main idea is that you use this function for everything, but you need to pass different arguments to achive particular effect.

      Best regards,
      Bogdan

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hardcodes.de
        wrote on last edited by
        #3

        Please don't open more than 1 thread for the "same topic":http://qt-project.org/forums/viewthread/27942/.

        while(!sleep){++sheep;}

        1 Reply Last reply
        0
        • B Offline
          B Offline
          BorisSclauzero
          wrote on last edited by
          #4

          AT hardcodes.de:
          I'm sorry. Is it possible to merge the two topics?

          AT bogdan:
          I've tryied all this Api32\DEV_C++ Api32\Dynamic and Api32\Static
          but I get the error: (!) undefined reference to 'Rockey'

          I've made a simple test project:

          Rockey4ndTest.pro
          @QT += testlib

          QT -= gui

          TARGET = tst_rockey4ndtest
          CONFIG += console
          CONFIG -= app_bundle

          TEMPLATE = app

          SOURCES += tst_rockey4ndtest.cpp
          DEFINES += SRCDIR=\"$$PWD/\"

          win32: LIBS += -L$$PWD/../../Libraries/Rockey/Static/ -lRockey4ND

          INCLUDEPATH += $$PWD/../../Libraries/Rockey/Static
          DEPENDPATH += $$PWD/../../Libraries/Rockey/Static

          win32: PRE_TARGETDEPS += $$PWD/../../Libraries/Rockey/Static/Rockey4ND.lib@

          tst_rockey4ndtest.cpp
          @void Rockey4ndTest::testRockeyFunc()
          {
          unsigned short retcode;
          unsigned short handle[16], p1, p2, p3, p4;
          unsigned long lp1, lp2;
          unsigned char buffer[1024];
          p1 = 0xf910;
          p2 = 0xf5ca;
          p3 = 0xf561;
          p4 = 0xca39;
          retcode = Rockey(RY_FIND, &handle[0], &lp1, &lp2, &p1, &p2, &p3, &p4, buffer);
          QVERIFY2(retcode, ERR_SUCCESS);
          }@

          Rockey4_ND_32.h (changed)
          @extern "C" unsigned short Rockey(unsigned short function,unsigned short *handle,unsigned long *lp1,unsigned long *lp2,unsigned short *p1,unsigned short *p2,unsigned short *p3,unsigned short *p4,unsigned char *buffer);
          @

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hardcodes.de
            wrote on last edited by
            #5

            [quote author="BorisSclauzero" date="1369060084"]AT hardcodes.de:
            I'm sorry. Is it possible to merge the two topics?
            [/quote]

            An admin should be able to do that. Maybe its best to copy the information from the other thread in here and change the topic to something like [please delete thread]

            while(!sleep){++sheep;}

            1 Reply Last reply
            0
            • B Offline
              B Offline
              BorisSclauzero
              wrote on last edited by
              #6

              If you are reading this thread and you need help
              send me a request :)

              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