Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Fix compilation using CL #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Libraries/Otterkit.Native/nativelib/CASPAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#endif

#if !defined __STDC_VERSION__
// Will error on MSVC! It still seems to be stuck on C89, it doesn't define __STDC_VERSION__, and only runs on Windows.
// (Not worth the preprocessor gymnastics and compiler-specific hacks to support it in my opinion!)
#error "Standard C99 (or later) support is required. Consider upgrading your compiler, or using GCC or Clang instead."
#endif

Expand Down
4 changes: 2 additions & 2 deletions Libraries/Otterkit.Native/nativelib/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"

cl.exe /O2 /LD /Fe:..\build\nativelib.dll allocator.c u8console.c decNumber.c ..\decNumber\decContext.c ..\decNumber\decDouble.c ..\decNumber\decQuad.c ..\decNumber\decNumber.c ..\decNumber\decimal128.c ..\decNumber\decimal64.c
cl.exe /O2 /LD /Fe:..\build\nativelib.dll allocator.c u8console.c decNumbern.c ..\decNumber\decContext.c ..\decNumber\decDouble.c ..\decNumber\decQuad.c ..\decNumber\decNumber.c ..\decNumber\decimal128.c ..\decNumber\decimal64.c

## compile linux-x64:

clang -shared -Wl,-rpath -O3 -fPIC -Wall -W -o ../build/nativelib.so *.c decNumber.c ../decNumber/decContext.c ../decNumber/decDouble.c ../decNumber/decQuad.c ../decNumber/decNumber.c ../decNumber/decimal128.c ../decNumber/decimal64.c
clang -shared -Wl,-rpath -O3 -fPIC -Wall -W -o ../build/nativelib.so *.c decNumbern.c ../decNumber/decContext.c ../decNumber/decDouble.c ../decNumber/decQuad.c ../decNumber/decNumber.c ../decNumber/decimal128.c ../decNumber/decimal64.c

## compile macos-x64:

Expand Down