Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Hi, I used the codeblocks cmake generator to generate a cbp for my cmake monorepo. It almost works flawlessly! However there are 2 issues.

1. Headers in the subprojects include/ directories are not listed under "Headers" in the codeblocks UI.
2. Some CMake tasks such as copying a resources folder do not pass successfully because presumably the directories get messed up by the codeblocks generator.

Is there anything I should be doing specifically so the project just works? I am generating the cbp in MY_PROJECT_ROOT/build-codeblocks/myproject.cbp. I would like to still have the CMake setup since it seems more portable than CodeBlocks own build system. Honestly, surprised it doesn't support CMake projects out of the box or have a good plugin for this.

Out of curiousity, is there any standard approach for having a cross platform IDE-independent build system that works out of the box with CodeBlocks?

Here's my root CMakeLists:
Code
cmake_minimum_required(VERSION 3.19)
project(myproj)

set(CMAKE_C_STANDARD 90)
set(CMAKE_C_STANDARD_REQUIRED ON)

# Add debug information
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_C_FLAGS_DEBUG "-g -O0")

if(DEFINED ENV{VCPKG_ROOT})
    set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
endif()

add_subdirectory(libraries/libfoo)
add_subdirectory(apps/myapp)



And here is the libfoo CMakeLists
Code
cmake_minimum_required(VERSION 3.19)

project(libfoo)

# Define implementation-specific options for libfoo
option(USE_VULKAN "Use Vulkan implementation in libfoo" OFF)
option(USE_OPENGL "Use OpenGL implementation in libfoo" ON)

# Ensure only one implementation is selected
if(USE_VULKAN AND USE_OPENGL)
    message(FATAL_ERROR "Cannot use both Vulkan and OpenGL implementations in libfoo at the same time.")
endif()

add_library(libfoo STATIC
    src/libfoo.c
)

# Include the platform-specific source folder
if(WIN32)
    target_sources(libfoo PRIVATE src/win/libfoo_win.c)
elseif(APPLE)
    target_sources(libfoo PRIVATE src/mac/libfoo_mac.c)
elseif(UNIX)
    target_sources(libfoo PRIVATE src/linux/libfoo_linux.c)
endif()



# Include the implementation-specific source folder
if(USE_VULKAN)
    message(STATUS "Including Vulkan source files in libfoo")
    target_sources(libfoo PRIVATE src/vulkan/libfoo_vulkan.c)
elseif(USE_OPENGL)
    message(STATUS "Including OpenGL source files in libfoo")
    target_sources(libfoo PRIVATE src/opengl/libfoo_opengl.c)
else()
    message(FATAL_ERROR "Neither USE_VULKAN nor USE_OPENGL is defined in libfoo!")
endif()

# Include the public headers
target_include_directories(libfoo PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/include
)

# Define LIBFOO_EXPORTS for the libfoo target
target_compile_definitions(libfoo PRIVATE LIBFOO_EXPORTS)

find_package(glfw3 CONFIG REQUIRED)
target_link_libraries(libfoo PRIVATE glfw)

# Setup tests
enable_testing()

# Find all .c files in tests/
file(GLOB TEST_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/tests/*.c")

foreach(test_src ${TEST_SOURCES})
    get_filename_component(test_name ${test_src} NAME_WE)
    add_executable(${test_name} ${test_src})
#    target_link_libraries(${test_name} PRIVATE libfoo libbar)
    add_test(NAME ${test_name} COMMAND ${test_name})
endforeach()



folder structure:
MY_PROJECT_ROOT/libraries/libfoo
2 folders inside - src & include
2
Nightly builds / Re: The 27 May 2026 build (13855) is out.
« Last post by Pecan on May 29, 2026, 11:53:42 pm »
I've found that deleting the .conf file just one time solved this for me.

Yes. But I customized my default.conf in the last 5 years. To re-build manually all the cutomizations and settings is boring and time consuming. I do hope a workaround exists. Is there any other possible modification of the default.conf to fix the issue?

Another point. My understanding was that with wx332 the dak mode is available. But I don't find any setting to enable it, using both my and new defautl.conf. Is the dark mode available is this nightly?

Thx

Max

Try deleting all the .layout files to see if that fixes the problem.
3
Nightly builds / Re: The 27 May 2026 build (13855) is out.
« Last post by luisalberto on May 29, 2026, 11:23:19 pm »
You can change the colors using Environment Settings, Select Colours Image or Icon, Below is a comBoBox that say select application appearance if(supported by platform) and you can change the combobox to 3 options system default, Light , Dark theme.
4
Nightly builds / Re: The 27 May 2026 build (13855) is out.
« Last post by MaxGaspa on May 29, 2026, 01:37:48 pm »
I've found that deleting the .conf file just one time solved this for me.

Yes. But I customized my default.conf in the last 5 years. To re-build manually all the cutomizations and settings is boring and time consuming. I do hope a workaround exists. Is there any other possible modification of the default.conf to fix the issue?

Another point. My understanding was that with wx332 the dak mode is available. But I don't find any setting to enable it, using both my and new defautl.conf. Is the dark mode available is this nightly?

Thx

Max
5
Nightly builds / Re: The 27 May 2026 build (13855) is out.
« Last post by eckard_klotz on May 29, 2026, 12:27:56 pm »
Hello All

If got a detection with Norton 360 while downloading the file "CB_20260527_rev13855_win64.7z" also:
  • The mentioned thread is called: Maleware-gen
  • The file detected as infected inside the archive is: cb_console_runner.exe

I don't get this detection if I download the files provided by Xaviou.
But after running a system-test on my laptop the same file "cb_console_runner.exe" was detected in the decompressed nightly from 9th of April 2026 (revision 13831).

I have reported this as a wrong detection and I've got the response that the case will be checked and I should try it in 24 hours again.

Best regards,
                      Eckard.

6
Development / Re: Force X11 compatibility mode
« Last post by Miguel Gimenez on May 29, 2026, 11:13:21 am »
You need r13775, r13841 and r13842.

For AUI docking, r13848.
7
Development / Re: Force X11 compatibility mode
« Last post by unixpro1970 on May 29, 2026, 11:08:31 am »
Can someone please update AUR with a new codeblocks (with all required patches)?  The latest AUR codeblocks from 2025 hangs when launched on Manjaro.  I am unsure what patches are needed to make it work.

https://archlinux.org/packages/extra/x86_64/codeblocks/
8
Nightly builds / Re: The 27 May 2026 build (13855) is out.
« Last post by Pecan on May 29, 2026, 06:45:25 am »
I Check this nightly and When I close codeblocks.exe this debug alert messageBox appear. Ctrl + C to copy the messgeBox

[Window Title]
wxWidgets Debug Alert

[Main Instruction]
A debugging check in this application has failed.

[Content]
../../src/aui/auibook.cpp(2756): assert "page_idx < m_tabs.GetPageCount()" failed in GetPage().

[ ] Don't show this dialog again  [Stop] [Continue]
[Window Title]
wxWidgets Debug Alert

[Main Instruction]
A debugging check in this application has failed.

[Content]
../../src/aui/auibook.cpp(2856): assert "Assert failure" failed in FindTab(): Window unexpectedly not found in any tab control

[ ] Don't show this dialog again  [Stop] [Continue]

I've found that deleting the .conf file just one time solved this for me.
9
Development / Re: which standard to use, both for building wx and CB
« Last post by christo on May 28, 2026, 03:17:13 pm »
@Miguel Gimenez, no, I just mentioned that for reference, can be committed when someone update c++ version
10
Development / Re: which standard to use, both for building wx and CB
« Last post by Miguel Gimenez on May 28, 2026, 01:09:01 pm »
@christo, do you plan to commit the file from autoconf-archive?
Pages: [1] 2 3 4 5 6 ... 10