cmake -E tar xf libxml2-xxx.tar.gz
cmake -S libxml2-xxx -B libxml2-xxx-build -D LIBXML2_WITH_PYTHON=OFF -D LIBXML2_WITH_ICONV=OFF -D LIBXML2_WITH_DEBUG=OFF
| import std.stdio : writeln; | |
| import std.conv : to; | |
| import std.windows.charset : toMBSz; | |
| import core.sys.windows.windows : GetConsoleOutputCP; | |
| void main() | |
| { | |
| auto currentCodePage = GetConsoleOutputCP(); | |
| writeln(currentCodePage); |
cmake -E tar xf libxml2-xxx.tar.gz
cmake -S libxml2-xxx -B libxml2-xxx-build -D LIBXML2_WITH_PYTHON=OFF -D LIBXML2_WITH_ICONV=OFF -D LIBXML2_WITH_DEBUG=OFF
| #ifndef UNICODE | |
| #define UNICODE | |
| #endif | |
| #include <stdio.h> | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <Windows.h> | |
| // types |
| const std = @import("std"); | |
| fn define_macros(raylib_module: *std.Build.Module) void { | |
| //------------------------------------------------------------------------------------ | |
| // Don't use the built in config.h | |
| //------------------------------------------------------------------------------------ | |
| raylib_module.addCMacro("EXTERNAL_CONFIG_FLAGS", "1"); |
| import x.json2 | |
| import os | |
| struct Tweets { | |
| tweet struct { | |
| created_at string | |
| full_text string | |
| } | |
| } |
| const std = @import("std"); | |
| const fmt = std.fmt; | |
| const mem = std.mem; | |
| const print = std.debug.print; | |
| const assert = std.debug.assert; | |
| const expect = std.testing.expect; | |
| // https://medium.com/@tharunappu2004/writing-a-lexer-in-c-a-step-by-step-guide-a1d5c55ac04d | |
| pub var allocator: std.mem.Allocator = undefined; |
| const std = @import("std"); | |
| const fmt = std.fmt; | |
| const mem = std.mem; | |
| const print = std.debug.print; | |
| const assert = std.debug.assert; | |
| const expect = std.testing.expect; | |
| pub var allocator: std.mem.Allocator = undefined; | |
| const S = struct { |
| const std = @import("std"); | |
| const fmt = std.fmt; | |
| const mem = std.mem; | |
| const print = std.debug.print; | |
| const assert = std.debug.assert; | |
| const expect = std.testing.expect; | |
| pub var allocator: std.mem.Allocator = undefined; | |
| pub fn main() !void { |
| package main | |
| import "core:c/libc" | |
| import "core:encoding/json" | |
| import "core:fmt" | |
| import "core:mem" | |
| import "core:os" | |
| import "core:path/filepath" | |
| import "core:strings" |
| cmake_minimum_required(VERSION 3.25) | |
| ### Debug mode | |
| # $ cmake -S . -B build-debug -GNinja -DCMAKE_BUILD_TYPE=Debug | |
| # $ cmake --build build-debug | |
| # $ cmake --install build-debug # SDL2.dllをコピー | |
| # $ cmake --build build-debug && build-debug\game.exe | |
| ### Release mode | |
| # $ cmake -S . -B build-release -GNinja -DCMAKE_BUILD_TYPE=Release |