Skip to content

Instantly share code, notes, and snippets.

@zuigon
Created July 1, 2010 15:26
Show Gist options
  • Save zuigon/460108 to your computer and use it in GitHub Desktop.
Save zuigon/460108 to your computer and use it in GitHub Desktop.
require "rubygems"
require 'inline'
class Test1
inline(:C) do |builder|
builder.include '<iostream>'
builder.add_compile_flags '-x c++', '-lstdc++'
builder.c '
using namespace std;
void zbroji(int a, int b){
cout << (a+b) << endl;
}'
end
end
t = Test1.new()
t.zbroji(2, 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment