-
-
Save elorest/2ae9fe3ef00024f4ac4894cb4bd715e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ld: library not found for -l./helloworld.o | |
clang: error: linker command failed with exit code 1 (use -v to see invocation) | |
Error: execution of command failed with code: 1: `cc -o "/Users/isaac/.cache/crystal/crystal-run-helloworld.tmp" "${@}" -rdynamic -l./helloworld.o -lpcre -lgc -lpthread /Users/isaac/.anyenv/envs/crenv/versions/0.21.0/src/ext/libcrystal.a -levent -liconv -ldl -L/usr/lib -L/usr/local/lib` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void hello( const char * name ) { | |
printf( "Hello, %s!\n", name ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#how would I got about linking to the above file? | |
@[Link("helloworld.o")] | |
lib Say | |
fun hello(name : LibC::Char*) : Void | |
end | |
puts Say.hello("isaac") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment