Skip to content

Instantly share code, notes, and snippets.

@SergXIIIth
Created November 3, 2015 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SergXIIIth/c5d6bcac4476ac09c0f8 to your computer and use it in GitHub Desktop.
Save SergXIIIth/c5d6bcac4476ac09c0f8 to your computer and use it in GitHub Desktop.
require "./sev/*"
module Sev
puts "Hello"
@[Link("m")]
@[Link("avcodec")]
@[Link("avformat")]
lib AvFormat
fun av_register_all
end
AvFormat.av_register_all
end
------
/usr/bin/ld: /opt/crystal/bin/../embedded/lib/../lib/libgc.a(os_dep.o): undefined reference to symbol '_end'
//usr/lib/x86_64-linux-gnu/librtmp.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc -o "/home/msa/prj/vid/sev/.crystal/crystal-run-sev.tmp" "${@}" -rdynamic -lavformat -lavcodec -levent -lrt -lpcl -lpcre -lgc -lpthread -ldl`
------
// gcc src/decoder.c -lavcodec -lavformat
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
// #include <ffmpeg/swscale.h>
int main(int argc, char *argv[]) {
av_register_all();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment