Qt-interest Archive, July 2007
Qt library.a lib file
Message 1 in thread
Hello,
I compiled a library in Cygwin and I'd like to use it in QT.
Only problem is the fact that it's a .a file, is it possible to include it in the project file ?
Thank you.
Message 2 in thread
bunjee wrote:
> Hello,
>
> I compiled a library in Cygwin and I'd like to use it in QT.
> Only problem is the fact that it's a .a file, is it possible to include it in the project file ?
A trivial Google search will tell you the answer to your question, which
has nothing to do with qt. For example:
http://www.google.com.au/search?q=mingw+library+%22visual+studio%22
turns up things like:
http://www.mail-archive.com/gnuwin32-users@xxxxxxxxxxxxxxxxxxxxx/msg01072.html
There are some limitations though:
- It probably won't work if you used the Cygwin gcc rather than the
version of MinGW's gcc available for cygwin. Standalone MinGW+msys can
be simpler for this reason.
- It won't work if there's any C++ in the library link interface, or
pointers/references to C++ classes with virtual methods or certain other
features. VC++ and gcc are not ABI-compatible for C++.
- You must ensure that MinGW and VC++ use the same runtime library. If
they use different runtime libraries, you will run into problems like
heap corruption unless your library is designed so that all memory
allocated in the library is freed by the library, never by the caller.
You'd also have to ensure that you never free memory passed to you from
outside, and there are other issues to watch out for too.
--
[ signature omitted ]