ysbaddaden / crystal_library Goto Github PK
View Code? Open in Web Editor NEWStatic/Shared libraries written in Crystal (Proof of Concept)
Static/Shared libraries written in Crystal (Proof of Concept)
Hi :)
Now that crystal has support for not generating main
, would it be easier to do this with less steps ?
Tried your PoC with crystal 0.24.2 on linux 64 bits. Alas did not work, there is no compile option, only a build option. With the build option it does not work
user1 ~/download/try/crystal_library (master) $ make CRYSTAL_ROOT=/opt/crystal
CRYSTAL_PATH="src:/opt/crystal/share/crystal/src" /opt/crystal/bin/crystal build \
--release --cross-compile -o libcounter src/libcounter.cr
cc 'libcounter.o' -o 'libcounter' -rdynamic -lpcre -lgc -lpthread /opt/crystal/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib
ar rcs libcounter.a libcounter.o
user1 ~/download/try/crystal_library (master) $ make test
cc test/counter_test.c ./libcounter.a /opt/crystal/share/crystal/src/ext/libcrystal.a -lgc -ldl -levent -lpcre -o counter_test
./libcounter.a(libcounter.o): In function `main':
/opt/crystal/share/crystal/src/crystal/main.cr:134: multiple definition of `main'
/tmp/ccowU1tv.o:counter_test.c:(.text+0x0): first defined here
/usr/bin/ld: cannot find -lgc
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'counter_test' failed
make: *** [counter_test] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.