Skip to content

Instantly share code, notes, and snippets.

View HiImJulien's full-sized avatar
🏠
Working from home

Julian Kirsch HiImJulien

🏠
Working from home
View GitHub Profile
@HiImJulien
HiImJulien / 1.c
Last active August 13, 2020 22:49
A "pull request" for Apporva Joshi's [article](https://apoorvaj.io/creating-a-modern-opengl-context/), which simplifies the creation of an OpenGL 4.0 Context using GLX.
/* gcc this.c -lGL -lX11 */
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <GL/glx.h>
#include <X11/Xlib.h>
/*
License: Public domain
@HiImJulien
HiImJulien / clang_windows_cross.cmake
Created March 21, 2020 18:45
Toolchain file to cross-compile from clang (WSL-Ubuntu) to Windows.
# Cross toolchain configuration for using clang-cl.
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_VERSION 10.0)
set(CMAKE_SYSTEM_PROCESSOR AMD64)
set(CMAKE_C_COMPILER "/usr/bin/clang-cl-9")
set(CMAKE_CXX_COMPILER "/usr/bin/clang-cl-9")
set(CMAKE_LINKER "/usr/bin/lld-link-9")
@HiImJulien
HiImJulien / Swift Meets CCxx.md
Last active November 30, 2024 06:10
This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.

Swift Meets C/C++

This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.


In this example we're going to invoke a function called say_hello, which, as the name already suggests, prints "Hello, World!" to the terminal.