You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 29, 2025. It is now read-only.
I have written a Code::Blocks plugin to generate a premake5 script from a Code::Blocks workspace. There is an example with generated premake5 lua script at https://github.com/arnholm/pm5example1 . This example contains a static library, a shared library and a console application, all extremely small and simple.
It is possible to successfully build this example on linux or windows using premake5 generating makefiles or Visual Studion files:
cd build/cmake
cmake .
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /ssd1/codeblocks/gtk2-unicode-3.0/plugin_dev/pm5example1/build/cmake
So far so good, but build fails
make
Scanning dependencies of target staticlib1
[ 16%] Building CXX object CMakeFiles/staticlib1.dir/ssd1/codeblocks/gtk2-unicode-3.0/plugin_dev/pm5example1/long/path/staticlib1/staticlib1_class.cpp.o
[ 33%] Linking CXX executable long/path/staticlib1/bin/debug/staticlib1
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/staticlib1.dir/build.make:84: long/path/staticlib1/bin/debug/staticlib1] Error 1
make[1]: *** [CMakeFiles/Makefile2:108: CMakeFiles/staticlib1.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
I have written a Code::Blocks plugin to generate a premake5 script from a Code::Blocks workspace. There is an example with generated premake5 lua script at https://github.com/arnholm/pm5example1 . This example contains a static library, a shared library and a console application, all extremely small and simple.
It is possible to successfully build this example on linux or windows using premake5 generating makefiles or Visual Studion files:
Now I installed your premake-cmake under Kubuntu 20.04 to see if it would be possible to build the same via CMake, so I did
and then
So far so good, but build fails