..ok, just to give a bit more of insight for Codelite build under Windows.
As of today, the shortest way to get around build issue is:
1) Add the followings to pre-build step for SQLite3 project in SDK:
if not exist "$(WorkspacePath)\build-$(WorkspaceConfiguration)\lib" mkdir "$(WorkspacePath)\build-$(WorkspaceConfiguration)\lib"
Why ? This will create the folder for libraries delivery, since codelite/plugin require some libs to be present in $(WorkspacePath)\build-$(WorkspaceConfiguration)\lib
2) Append the following env variables with shift+ctrl+V to Codelite environment.
LibPath=$(LibraryPathSwitch)../Runtime $(LibraryPathSwitch)../../Runtime $(LibraryPathSwitch)$(WorkspacePath)/build-$(WorkspaceConfiguration)/lib $(LibraryPathSwitch)../sdk/libssh/lib
Why ? WorkspaceConfiguration
shall be defined somewhere at the beginning of the build. This is not the case, we just then supply the target build for the subsequent projects to build.
We also need to set IntermediateDirectory
as a folder for building objects, this is actually the folder of the project currently being built, otherwise, all objects would be created at the root of your disk (namely c:\). Why ? Because throughout the generated Makefiles, you'd see stuff like:
.. and if IntermediateDirectory
is not defined, you end up with objects at the root of your disk.
Why ArchiveOutputSwitch? It's just a trick to force the ar command to deliver to lib folder, directly.. no big deal.
Why LibPath ? Because each project being built, require some libs to be accessible for linking stage. Thus, I just append some libraries paths to -L option for the linker.. This way, the post-build step which states a copy of the library into ../Runtime
is just enough..
3) Set Makefile Generator to Default
for main Codelite project and Hit F7
The goal is to avoid adding extra steps for each of the projects.. so, I touched at global env. variable. But, maybe we may glance at builder_gnumake.cpp
to dig a bit.. and also do some little cleanings for each projects.
EDIT: I just saw your response, Eran, below my reply to yours
$(WorkspaceConfiguration) always has value (when a workspace is opened)
For some reason and tested over 3 OSWindows machine, WorkspaceConfiguration is broken.. I had paths like c:\src\codelite\build-\lib.. "build-" is not correct..
When you start a build and the compiler does not exists on your machine, CodeLite will prompt you and will ask you to choose a compiler to replace the one it needs.
Yes indeed, that's not a big deal and a convenient way to proceed