PDA

View Full Version : How to use a third party function library package with source codes in my QT Project?



TOM&Jerry
17th April 2014, 08:26
Hi, I am in trouble with how to use a third party function library package in my QT project.
This function library is based on MSVC in windows and GCC in Linux, also I have all the source codes edited by standard C language. I think i have three methods to use this function library in my QT project.

1. I can compile this function library in MSVC2005 and get the static library by using the solution included in the software package, also I can compile the function library with GCC ang get the static library by using the makefile included in the software package. So my question is Can I use these static libraries in my qt project? if can , how can i use ?

2. Because i have all source codes in C language. I want to transport this funcion library to QT environment. I have tried to do this using minGW32 compiler in Windows, but I found a fatal error in Windows is when the program call many times malloc() function to get memory, a NULL pointer can be returned that means the system has not empty memory, so the program exit. I don't the reason, but this error can't be happened in MSVC.

3. Also I tried to compile this source codes with MSVC compiler in QT environment, but I found a problem is all of souce files in my QT project is UTF-8 without BOM, the MSVC compiler can't compile these source file correctly because the MSVC compiler only can recognise the source file with UTF-8 BOM.

So want to get everyone's help.
Thanks!

ChrisW67
21st April 2014, 23:21
1. qmake Project Files: Declaring Other Libraries

2. If your program is exhausting memory then you have a memory leak. If that leak is unique to a version compiled with GCC then you only need to check the code paths that are unique to the program when compiled with GCC.

3. If the Microsoft compiler chokes on the source files from a library "based on MSVC in windows" then I suggest you take it up with the library author.