2015년 7월 22일 수요일

C / C++ Programming Environment

As Java is struggling between Oracle and Google since Sun has fallen into Oracle, its language status is not stable though Java itself has improved much. So I decided to move to C / C++ programming as my primary programming environment. Though during my work, I usually used C / C++, it still needs much practice to improve my skills.

The main IDE I selected is Code::Blocks, which is fine and cross-platform environment. I also considered eclipse CDT and netbeans, however they highly depend on Java language itself and since I decided to abandon Java, I'd prefer pure C / C++ environment. There is Visual Studio in Windows platform and XCode for Mac platform, which are very fine environment, but I want cross platform environment so I decide to use Code::Blocks.

The Code::Blocks is very good IDE, and provides easy way to aid programming, especially the GUI designer is also included. I always though GUI part of the programming is tricky part and is not so important, but in many occasions GUI helps people to use the program and command line is not easy for common people. So whenever GUI is required, I decided to use wxWidgets, whch is also cross platform GUI library. I first considered GTK+ as my library, however this library is so complicated and I failed to compile it on my environment (mingw on windows)

To avoid using commercial tools, I decide to use mingw as my primary compilers on windows. If I happen to buy mac book, I might move on to mac environment, but for the moment all the programming environment is mingw on windows.

Here are some libraries I intend to use on C environment; (Java is handy since these libraries are all included in JRE)

  • wxWidgets: GUI library
  • GMP: multi-precision library (used for computing big integers)
  • OpenSSL: crypto library
  • OpenSC: PC/SC library to access smartcard readers
To avoid operating system dependency, I compile those libraries as static library and make one executable.

The Code::Block provides Wizard for wxWidget programs, but it seems not working well. To make it correctly work, I need to adjust include path and library path and library list as follows;
  • include path 
    • <wxWidgets path>/include
    • <wxWIdgets path>/lib/wx/include/msw-unicode-static-3.0
  • library path
    • <wxWidges path>/lib
  • libraries
    • wx_mswu-3.0
    • wxpng-3.0
    • wxjpeg-3.0
    • wxtiff-3.0
    • wxzlib-3.0
    • gdi32
    • comdlg32
    • shell32
    • comctl32
    • ole32
    • uuid
    • oleaut32
    • winspool
The "msw-unicode-static-3.0" and "wx_mswu-3.0" may be different according to configuration of wxWidgets. Some windows libraries should also be specified to avoid missing symbols.