c icon indicating copy to clipboard operation
c copied to clipboard

freebsd support

Open dcou opened this issue 7 years ago • 3 comments

I got your script working on freebsd with multiple parameters using this as my first line

#!/usr/bin/env -S c "-I/usr/local/include/ -g -L/usr/local/lib/mysql/ -lmysqlclient --"

might be worth mentioning in the readme

dcou avatar May 25 '18 03:05 dcou

Interesting... does this apply for even simple scripts? Or only for scripts that link in external libraries, e.g. mysqlclient?

#!/usr/bin/c

#include <stdio.h>

int main(void) {
    printf("hello world\n");
    return 0;
}

ryanmjacobs avatar May 29 '18 17:05 ryanmjacobs

Yes even for simple scripts, on FreeBSD 11, it has to be

#!/usr/bin/env c

#include <stdio.h>

int main(void) {
    printf("hello world\n");
    return 0;
}

my other more complex example is required when using env with multiple arguments

dcou avatar May 30 '18 01:05 dcou

@ryanmjacobs You could add a CI FreeBSD test using https://github.com/vmactions/freebsd-vm

andy5995 avatar Sep 12 '22 21:09 andy5995