RSS
 

Archive for the ‘programming’ Category

Compiling Qt4.6 with OpenSSL Support on Windows with MingW

01 Dec

The Symbian port of Qt is a blessing, no more head banging. Work will be so much easier. The best thing about using Qt for Symbian development is that you dont need to use Carbide or the Emulator, you can use QtCreator to do most of your work. So I downloaded the 4.6 and before I can use it to continue my QFacebookConnect library, I need to compile it with OpenSSL support enabled. You have to do a lot of googling/binging to get that information. Well here is how you do it:

in the command prompt:
SET LIB=c:\openssl\lib\mingw;%LIB%
SET INCLUDE=c:\openssl\include;%INCLUDE%
SET PATH=c:\openssl;%PATH%

now go to the Qt source folder and execute the configure.exe like so:

configure.exe -openssl

and finally
mingw32-make

and here a nice demo of qt4.6 while it compiles for you.

 
 

c++ std::string

10 Jul

the c++ string or more specifically std::string is a great improvement over the c-strings which are null terminated. c++ strings use a length fields to keep track of how long the string is as compared to c-string which use the NULL ‘\0′ character to keep track of where the string ends.

The c-strings have been around for so long and are used in so many places that when people start to use the std::string they get confused. For example today i wanted to use std::string to hold binary data, i knew that this was possible but i couldn’t figure out how. Then stack overflow came to the rescue. This question is explained very well there.

Thanks Stack Overflow :)