Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
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.
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?
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?
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?
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?
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.
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:
which sounds spanish to me...
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).
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...
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)
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.
"About shared library search paths":http://www.eyrie.org/~eagle/notes/rpath.html
copying to the same dir only works on windows, not on linux.
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
travertinclean last edited by
MinGW is a port of GCC - Gnu Compiler Collection to Microsoft Windows. Just Check your configuration process..
what is that? are u copying loladiro's answer? read my question pls or no better i start a new thread
the author told me that i dont need to link wheter static nor dynamic and hence no gpl problem....
"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."
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?
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.
that's what im looking at...
there are 3 possibilities:
you use plain C functions. Then you can use late binding and QLibbrary::resolve
you want to use C++ classes, then you must use early binding and link against the library
you combine them through the use of interfaces and creator functions. But then the interfaces must be pure interfaces.
now i simply want to compile/run the main.cpp in the root folder and get:
dlerror:/apps/X-Plane/Aircraft/General Aviation/Paa/alal/plugins/fmc/lin.xpl: undefined symbol: _ZN9FMSSystemC1Ev
Compilation is ok without linking. So i cannot link for GPL reasons but what am i doing then? And why do i get the above error if i don't have to link?
The lib is compiled and copied into the same folder as the plugin(main.cpp; x-plane plugin) above. Either the lib as the plugin are shared libs.