Skip to content

AvirukBasak/shsc-c-interop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shsc C Interop

This library is a static library that includes headers and functions to help with C interop in Shsc.

Compiling this library

You'll need to have the following dependencies installed:

  • gcc - the GNU C Compiler
  • make - the build system
  • ld - the linker
  • ar - the archiver

Run make and the static library will be generated at target/libshsc.a (builds target/libshsc.a on Windows as well).

Compile a shared library

To compile the add.c test library, run the following command:

gcc -Iinclude -shared -fPIC -o examples/add.so examples/add.c -Ltarget -lshsc
shsc examples/add.shsc

On windows, you can use the following command:

gcc -Iinclude -shared -fPIC -o examples/add.dll examples/add.c -Ltarget -lshsc
shsc examples/add.shsc

See examples for an example of how to use this library.

About

Library to enable C interoperability with Shsc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published