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. Building a shared library on Qt
QtWS25 Last Chance

Building a shared library on Qt

Scheduled Pinned Locked Moved Solved General and Desktop
libraryqt 5.4linuxheaderfile
4 Posts 3 Posters 1.6k 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.
  • VitAmineV Offline
    VitAmineV Offline
    VitAmine
    wrote on last edited by A Former User
    #1

    hi, guys

    I'm trying to build a library by using some classes I got (file .h and .cpp) , I have a problem to include the classes headers to use them to create easier functions to the client
    I hope it's clear for you.
    if you have an idea for the problem let me know
    thank you

    excellent day.

    qt code:

    .h file :

    #ifndef MOSTBIBLIO_H
    #define MOSTBIBLIO_H

    #include "./files/flie1.h"
    #include "./files/flie2.h"
    #include "./files/flie3.h"
    #include "./files/flie4.h"
    #include "./files/flie5.h"
    #include "./files/flie6.h"
    #include "./files/flie7.h"
    #include "./files/flie8.h"

    #include "mostbiblio_global.h"

    class MOSTBIBLIOSHARED_EXPORT MostBiblio
    {

    public:
    MostBiblio();
    // example :can't instantiate file1 .....

    };

    #endif // MOSTBIBLIO_H

    kshegunovK 1 Reply Last reply
    0
    • Diamond PlatypusD Offline
      Diamond PlatypusD Offline
      Diamond Platypus
      wrote on last edited by
      #2

      Try to use INCLUDEPATH in your .pro instead, maybe your program has problem dealing with relative paths.
      example:
      INCLUDEPATH=absolute path to directory of .files/include
      run qmake, and try to insert your .h files
      try both "include "files/flieX.h" and "flieX.h" to see if there's any kind of autocompletion, and if so, that should work

      1 Reply Last reply
      0
      • VitAmineV VitAmine

        hi, guys

        I'm trying to build a library by using some classes I got (file .h and .cpp) , I have a problem to include the classes headers to use them to create easier functions to the client
        I hope it's clear for you.
        if you have an idea for the problem let me know
        thank you

        excellent day.

        qt code:

        .h file :

        #ifndef MOSTBIBLIO_H
        #define MOSTBIBLIO_H

        #include "./files/flie1.h"
        #include "./files/flie2.h"
        #include "./files/flie3.h"
        #include "./files/flie4.h"
        #include "./files/flie5.h"
        #include "./files/flie6.h"
        #include "./files/flie7.h"
        #include "./files/flie8.h"

        #include "mostbiblio_global.h"

        class MOSTBIBLIOSHARED_EXPORT MostBiblio
        {

        public:
        MostBiblio();
        // example :can't instantiate file1 .....

        };

        #endif // MOSTBIBLIO_H

        kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by
        #3

        @VitAmine
        Also what is the exact error you're getting?

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply
        0
        • VitAmineV Offline
          VitAmineV Offline
          VitAmine
          wrote on last edited by
          #4

          hi, guys

          I fixed the problem, it was the path thank you.

          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