bindgen icon indicating copy to clipboard operation
bindgen copied to clipboard

Windows support

Open docelic opened this issue 5 years ago • 3 comments

Trying to compile bindgen on Windows produces first error in find_clang.cr on:

UNAME_S = `uname -s`.chomp

docelic avatar May 16 '20 00:05 docelic

We need to replace this with a macro:

{% if flag?(:darwin) %} # :linux, :win32, :windows, :bits64, :bits32

docelic avatar May 18 '20 09:05 docelic

Updated in latest commit. Will keep the ticket open for further issues.

docelic avatar May 18 '20 16:05 docelic

find_llvm_config_binary - Need to use ENV["PATH"].split(Process::PATH_DELIMITER) also, in same function - need to account for file ext of ".exe" , not sure where to put this. Also replace the search_paths: in YAML to #{paths.try(&.map { |p| %(- '#{p}') }.join("\n ")) || ENV["PATH"].split(Process::PATH_DELIMITER).map { |p| %(- '#{p}') }.join("\n ")}

this is because "" in windows paths and this is escape character for YAML - replace double quote to single quote

Same thing for #find_clang_binary

dsisnero avatar Oct 18 '23 23:10 dsisnero