cpp code ( nativedll.cpp )
#include <stdio.h>
extern "C" void __attribute__((visibility("default"))) HelloWorld()
{
printf("Hello world, invoked by F#!\n");
}Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]
| using System; | |
| using System.IO; | |
| static class RelativePath | |
| { | |
| private static string[] GetPathPart(string path) | |
| { | |
| return path | |
| .TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) | |
| .Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); |