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. Sample example for control Galil motion controller Using Qt Programs
Forum Updated to NodeBB v4.3 + New Features

Sample example for control Galil motion controller Using Qt Programs

Scheduled Pinned Locked Moved Unsolved General and Desktop
19 Posts 5 Posters 5.2k Views 3 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.
  • jsulmJ jsulm

    @Vijay-Lamkane said in Sample example for control Galil motion controller Using Qt Programs:

    galilPCI

    See here: http://www.galilmc.com/downloads/api
    You can use their gclib C library to access the controller. There are examples.
    See here how to use shared libraries with QtCreator: http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html

    Vijay LamkaneV Offline
    Vijay LamkaneV Offline
    Vijay Lamkane
    wrote on last edited by
    #5

    @jsulm thanks
    but i fail to downlod gclib library ,i used http://www.galilmc.com/sw/pub/all/doc/gclib/html/ubuntu.html
    but the url is not working

    1 Reply Last reply
    0
    • Vijay LamkaneV Offline
      Vijay LamkaneV Offline
      Vijay Lamkane
      wrote on last edited by
      #6

      currently i am using Galil.h file
      but stuck here
      #include <QCoreApplication>
      #include <Galil.h>

      int main(int argc, char *argv[])
      {
      QCoreApplication a(argc, argv);

      Galil g("192.168.1.100");
      
      return a.exec();
      

      }

      gives errors like
      error: undefined reference to `Galil::Galil(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

      /home/system/Qt_Programs/galilConnection3/main.cpp:8: error: undefined reference to `Galil::~Galil()'

      how can i solve it

      jsulmJ 1 Reply Last reply
      0
      • Vijay LamkaneV Vijay Lamkane

        currently i am using Galil.h file
        but stuck here
        #include <QCoreApplication>
        #include <Galil.h>

        int main(int argc, char *argv[])
        {
        QCoreApplication a(argc, argv);

        Galil g("192.168.1.100");
        
        return a.exec();
        

        }

        gives errors like
        error: undefined reference to `Galil::Galil(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

        /home/system/Qt_Programs/galilConnection3/main.cpp:8: error: undefined reference to `Galil::~Galil()'

        how can i solve it

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #7

        @Vijay-Lamkane The URL is working for me.
        It is not enough to include the header file: you have to link against the library (*.so).

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        Vijay LamkaneV 1 Reply Last reply
        0
        • jsulmJ jsulm

          @Vijay-Lamkane The URL is working for me.
          It is not enough to include the header file: you have to link against the library (*.so).

          Vijay LamkaneV Offline
          Vijay LamkaneV Offline
          Vijay Lamkane
          wrote on last edited by
          #8

          @jsulm

          .pro file

          QT += core
          QT -= gui

          TARGET = galilConnection3
          CONFIG += console
          CONFIG -= app_bundle

          TEMPLATE = app

          SOURCES += main.cpp

          unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lGalil

          INCLUDEPATH += $$PWD/../../../../usr/include
          DEPENDPATH += $$PWD/../../../../usr/include

          :-1: error: skipping incompatible /home/system/Qt_Programs/galilConnection3/../../../../usr/lib//libGalil.so when searching for -lGalil
          :-1: error: skipping incompatible /usr/lib/../lib/libGalil.so when searching for -lGalil
          :-1: error: cannot find -lGalil

          jsulmJ 1 Reply Last reply
          0
          • Vijay LamkaneV Vijay Lamkane

            @jsulm

            .pro file

            QT += core
            QT -= gui

            TARGET = galilConnection3
            CONFIG += console
            CONFIG -= app_bundle

            TEMPLATE = app

            SOURCES += main.cpp

            unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lGalil

            INCLUDEPATH += $$PWD/../../../../usr/include
            DEPENDPATH += $$PWD/../../../../usr/include

            :-1: error: skipping incompatible /home/system/Qt_Programs/galilConnection3/../../../../usr/lib//libGalil.so when searching for -lGalil
            :-1: error: skipping incompatible /usr/lib/../lib/libGalil.so when searching for -lGalil
            :-1: error: cannot find -lGalil

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #9

            @Vijay-Lamkane Are you building for x86 or x86_64? Is the library built for x86 or x86_64? You can check calling

            file /usr/lib/../lib/libGalil.so
            

            on the command line.
            Post here what file /usr/lib/../lib/libGalil.so prints.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            Vijay LamkaneV 1 Reply Last reply
            0
            • Vijay LamkaneV Offline
              Vijay LamkaneV Offline
              Vijay Lamkane
              wrote on last edited by
              #10

              ile /usr/lib/../lib/libGalil.so

              /usr/lib/../lib/libGalil.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=43f20bd8e5cbb6aff96819c8376887d030ac4f19, stripped

              1 Reply Last reply
              0
              • jsulmJ jsulm

                @Vijay-Lamkane Are you building for x86 or x86_64? Is the library built for x86 or x86_64? You can check calling

                file /usr/lib/../lib/libGalil.so
                

                on the command line.
                Post here what file /usr/lib/../lib/libGalil.so prints.

                Vijay LamkaneV Offline
                Vijay LamkaneV Offline
                Vijay Lamkane
                wrote on last edited by
                #11

                @jsulm
                is there need of controller to be connected while testing the given program ?

                jsulmJ 1 Reply Last reply
                0
                • Vijay LamkaneV Vijay Lamkane

                  @jsulm
                  is there need of controller to be connected while testing the given program ?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #12

                  @Vijay-Lamkane For testing yes but not to build it. You're current problem isn't related to connected/not connected controller.

                  The lib is x86, so I guess you're building for x86_64, is that correct? In this case you should either build for x86 or check whether this library is available as x86_64.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  Vijay LamkaneV 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @Vijay-Lamkane For testing yes but not to build it. You're current problem isn't related to connected/not connected controller.

                    The lib is x86, so I guess you're building for x86_64, is that correct? In this case you should either build for x86 or check whether this library is available as x86_64.

                    Vijay LamkaneV Offline
                    Vijay LamkaneV Offline
                    Vijay Lamkane
                    wrote on last edited by
                    #13

                    @jsulm
                    i had reinstalled lib file

                    #include <QCoreApplication>
                    #include <Galil.h>

                    #include <iostream> //cout
                    #include <sstream> //ostringstream istringstream
                    #include <vector>
                    #include <iostream>.h>
                    using namespace std;
                    int main(int argc, char *argv[])
                    {

                    //string address = "";
                    Galil g();
                    Galil *q;

                    cout << Galil::libraryVersion() << endl;

                    }

                    Output Error

                    /home/system/Qt_Programs/galilConnection3/main.cpp:17: error: undefined reference to `Galil::libraryVersionabi:cxx11'

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

                      Hi,

                      Looks like you are not linking to the library.

                      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
                      • Vijay LamkaneV Offline
                        Vijay LamkaneV Offline
                        Vijay Lamkane
                        wrote on last edited by
                        #15

                        after building only galilConnection4.pro file

                        :-1: error: No rule to make target 'galilConnection4.o'. Stop.

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

                          What's in that .pro file ?

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

                          Vijay LamkaneV 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            What's in that .pro file ?

                            Vijay LamkaneV Offline
                            Vijay LamkaneV Offline
                            Vijay Lamkane
                            wrote on last edited by
                            #17

                            @SGaist

                            QT += core
                            QT -= gui

                            TARGET = galilConnection3
                            CONFIG += console
                            CONFIG -= app_bundle

                            TEMPLATE = app

                            SOURCES += main.cpp

                            unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lGalil

                            INCLUDEPATH += $$PWD/../../../../usr/include
                            DEPENDPATH += $$PWD/../../../../usr/include

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

                              Where's galilConnection4.cpp ?

                              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
                              • N Offline
                                N Offline
                                nhat
                                wrote on last edited by
                                #19

                                thanks for sharing !

                                [url=http://www.axaengineers.com/] Civil Engineering Outsourcing[/url]

                                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