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. Library's name
QtWS25 Last Chance

Library's name

Scheduled Pinned Locked Moved General and Desktop
22 Posts 4 Posters 8.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.
  • M Offline
    M Offline
    mike4
    wrote on last edited by
    #1

    hi
    how do i find out the libs name to include? I do alike in the pro file:

    LIBS += -L/apps/bla/blalal/
    LIBS += -lFMSSystem
    

    But FMSSystem is only a guess so no wonder i get an error.
    Thanks
    Michael

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      Hi mike4,

      if you know what you mean you can include it and link it, if you don't, you have a problem...
      If you have some header file and need the corresponding library for it, use google, perhaps you find it.

      For which functionality do you need the library names?

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mike4
        wrote on last edited by
        #3

        i can compile the lib and include the headers. but i need to link the lib without having it's name. So maybe i can see somewhere in the lib's files it's name to link? Where's the lib's name defined?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          Mike4, I don't understand the problem.

          if you craete a lib, and build it, you will not lik this lib in the project as you can't link yourselfe
          If you use a library, you have to link it and have to know the name.
          Or are you searching for a way to add some autolink feature so the lib is automatically linked when you includ ethe headers?

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mike4
            wrote on last edited by
            #5

            no as lib with a different licence. GPL but the main project is closed source. so i first compile the lib and then do as above?

            1 Reply Last reply
            0
            • L Offline
              L Offline
              loladiro
              wrote on last edited by
              #6

              The -l option is what ever the library is called. Eg if your library is called MyLib.dll or libMyLib.so or libMyLib.dylib (I hope I got the mac naming convention right ;) never used it) then you have to use -lMyLib. Also the GPL will not allow yoiu to link the library to closed source projects. The LGPL however will.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mike4
                wrote on last edited by
                #7

                I get a dlerror so I try:
                LIBS += -L/apps/blbl/dfslsdflsdf\ fdfdfs/

                LIBS += -llin.so
                

                but it says to not find the lib.
                The author said it's ok to close source and on win i should do alike:
                http://msdn.microsoft.com/en-us/library/0b9xe492.aspx

                which sounds spanish to me...
                Thanks again
                Michael

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  loladiro
                  wrote on last edited by
                  #8

                  The link you posted is only for MSVC (and for libary creation, not linking it), MinGW handles it like gcc on linux/mac. If you do not know the name you can just add the dynamic library WITHOUT the -l option, e.g. LIBS += lin.so although this is not cross platform. In your case (I guess, if it's not then you are not using standard naming conventions and you can't use -l) the library file is called liblin.so. In that case the -l option would be LIBS += -llin. Also, even though the author of the library said you could use it, he'll either have to license it to you under the LGPL or give you a written exception to the GPL (the latter would be quite difficult without involving a lawyer), because otherwise you're still violationg licensing terms (never good - imagine he changes his mind after a year and sues you).

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mike4
                    wrote on last edited by
                    #9

                    Thanks now linking and compiling is ok. but executing at another place I get:
                    liblin.so => not found
                    even tough I've copied it into the same folder as the executable. Which leads to another question:
                    1- how to link statically
                    2- " dynamic ( having the lib in the same folder )

                    2-would not allow closed source if the lib is gpl2? So i probably will go something else...

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      loladiro
                      wrote on last edited by
                      #10

                      You mean concerning the licensing issues?
                      You have three options:

                      Don't do it

                      Get the author to give you a proper license that allows closed source apps

                      Make your project open source (and GPL)

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mike4
                        wrote on last edited by
                        #11

                        Thanks now linking and compiling is ok. but executing at another place I get: liblin.so => not found
                        even tough I’ve copied it into the same folder as the executable. Which leads to another question:
                        1- how to link statically
                        2- “ dynamic ( having the lib in the same folder )

                        2-would not allow closed source if the lib is gpl2? So i probably will go for something else…
                        Thanks again, you're very helpful.

                        1 Reply Last reply
                        0
                        • L Offline
                          L Offline
                          loladiro
                          wrote on last edited by
                          #12

                          "About shared library search paths":http://www.eyrie.org/~eagle/notes/rpath.html

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            giesbert
                            wrote on last edited by
                            #13

                            copying to the same dir only works on windows, not on linux.

                            Nokia Certified Qt Specialist.
                            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              mike4
                              wrote on last edited by
                              #14

                              I saw that below with another project. What exactly is that? shared would need some *.so? But there's only the executable shipped.

                              LNFLAGS+=-shared -rdynamic -nodefaultlibs -m32 -ggdb -L/usr/lib32 -L../libavionics -L../libogl -L$(LUAJIT)/lib

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                travertinclean
                                wrote on last edited by
                                #15

                                MinGW is a port of GCC - Gnu Compiler Collection to Microsoft Windows. Just Check your configuration process..

                                [url=http://www.heavensentfloorcare.com/travertine.html]Travertine sealing Dallas|Frisco|Plano[/url]

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  mike4
                                  wrote on last edited by
                                  #16

                                  what is that? are u copying loladiro's answer? read my question pls or no better i start a new thread

                                  1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    mike4
                                    wrote on last edited by
                                    #17

                                    the author told me that i dont need to link wheter static nor dynamic and hence no gpl problem....

                                    http://www.osnews.com/story/24557/Torvalds_Android_GPL_Claims_Totally_Bogus_

                                    "It seems totally bogus. We've always made it very clear that the kernel system call interfaces do not in any way result in a derived work as per the GPL, and the kernel details are exported through the kernel headers to all the normal glibc interfaces too. ... If it's some desperate cry for attention by somebody, I just wish those people would release their own sex tapes or something, rather than drag the Linux kernel into their sordid world."

                                    1 Reply Last reply
                                    0
                                    • L Offline
                                      L Offline
                                      loladiro
                                      wrote on last edited by
                                      #18

                                      So, you want to use the kernel system call interface? Or what do you want to tell us with the link? In the case of the linux kernel headers, the (legal) situation is kinda special, because they contain merely the definition of an interface to interact with the kernel. Is the library you want to use a headers only library?

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        mike4
                                        wrote on last edited by
                                        #19

                                        have a look at the link to vascore below. I was told that no linking is needed as communication would be alike the link posted above.

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          mike4
                                          wrote on last edited by
                                          #20

                                          https://github.com/PhilippMuenzel/vascore-embedded

                                          that's what im looking at...

                                          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