This guide was created using CodeLite 10.0 IDE in Windows 10 x64 bit OS (but similar configuration also tested in Linux). CodeLite is free cross platform, open source C, C++, PHP and Node.js IDE developed by Eran Ifrah. It was created especially for wxWidgets GUI projects development, but it also could be used for IUP, IM, CD project.
To create a new project one would have to create a new "Workspace" using "File -> New -> New Workspace" and then create a new project in that workspace using "File -> New -> New Project" and select either "Executable GUI GTK 3.0/C" or "Executable GUI GTK 2.4/C" option:
You can choose which compiler to use, for this tutorial we will choose the MinGW_TDM x64 compiler (Please note that in CodeLite it would be listed as "MinGW ( TDM_GCC-32 )" even if you use x64 version of compiler !). Just use the respective IUP/CD/IM dynamic library package: "dllw4_64" or compile required libraries yourself (we will be using dynamic library linking - for static libraries things would be quite similar, but do not forget about proper library order in that case)
CodeLite would create default main.c file designed for GTK libraries usage. Remove default content of that file and replace it with required one for IUP/CD/Project or add your own file to the.
After creating the project you must configure it use IUP include files and libraries. Select your project and use option "Settings...", that would be available when one press right mouse button (MB3).
First of all configure "Compiler" options:
ˇ Remove: "; $(shell pkg-config --cflags gtk+-2.0)" in "C Compiler Option"
ˇ Add required IUP/CD/IM directories with include files:
Do not forget that same procedure would have to be repeated for both Debug and Release configurations. They got different settings !.
To configure library files location once again got to the project settings (MB3 on project and select option "Settings...") and then edit "Linker" options:
ˇ Remove "$(shell pkg-config --libs gtk+-2.0)" from Linker Options line
ˇ Add required path entries to the "Libraries Search Path"
ˇ Add required libraries that would be required for your project in "Libraries" line.
Another possible option is to add required libraries path and include files path in global CodeLite settings: "Settings -> Build Settings -> Compilers -> Advanced" and set required "Include Path" and "Libraries Path"
Additional hint:
ˇ In Windows steps mentioned above would allow you to build IUP/CD/IM applications. But if you would try to use "Run" option - system would unable to execute your new application because path to the required dll files would not be found. To overcame this problem one could put all required dll to the directory of your choice (in my case I use C:\Tools\IUP) and add this directory to the PATH Windows environment.