Created
November 9, 2014 02:34
-
-
Save larzconwell/fe5bd12d0ce70b014248 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
# _/Users/larz/Programming/random | |
duplicate symbol __Z3addii in: | |
/var/folders/kz/fgkgncp17mg8t84dm5jjvzvm0000gn/T//go-link-Vas0Gn/000000.o | |
/var/folders/kz/fgkgncp17mg8t84dm5jjvzvm0000gn/T//go-link-Vas0Gn/000001.o | |
ld: 1 duplicate symbol for architecture x86_64 | |
clang: error: linker command failed with exit code 1 (use -v to see invocation) | |
/usr/local/go/pkg/tool/darwin_amd64/6l: running clang failed: unsuccessful exit status 0x100 |
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 "main.hh" | |
int add(int first, int second) { | |
return first + second; | |
} |
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
package main | |
import "C" | |
func main() { | |
println(Add(1, 2)) | |
} |
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
#ifndef H_MAIN | |
#define H_MAIN 1 | |
int add(int, int); | |
#endif |
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
%module main | |
%{ | |
#include "main.hh" | |
%} | |
%include "main.hh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment