OPNsense Forum

English Forums => Development and Code Review => Topic started by: aaronouthier on February 27, 2019, 03:03:59 am

Title: Requesting help compiling a simple program for use with OpnSense.
Post by: aaronouthier on February 27, 2019, 03:03:59 am
App source can be found at:
https://github.com/nomeata/udp-broadcast-relay

I have installed Git with
Code: [Select]
pkg install git
Make failed, since there is no GCC program. I edited the Makefile, and replaced
Code: [Select]
gcc -g with
Code: [Select]
cpp .

Now, it is failing with
Code: [Select]
main.c:52:10: fatal error: 'linux/if.h' file not found
#include <linux/if.h>
         ^~~~~~~~~~~~
1 error generated.
*** Error code 1

Stop.

Fixing this involves going deeper than I am comfortable.
Title: Re: Requesting help compiling a simple program for use with OpnSense.
Post by: aaronouthier on February 27, 2019, 03:13:31 am
Just found an updated project: https://github.com/sonicsnes/udp-broadcast-relay-redux (https://github.com/sonicsnes/udp-broadcast-relay-redux)
I still had to change the
Code: [Select]
gcc -g to
Code: [Select]
cpp , however, it compiled properly after that.
Title: Re: Requesting help compiling a simple program for use with OpnSense.
Post by: aaronouthier on February 27, 2019, 03:25:40 am
Well, that almost worked. The correct command was actually cc, not cpp or gcc.
Title: Re: Requesting help compiling a simple program for use with OpnSense.
Post by: fabian on February 27, 2019, 05:48:11 pm
the command is clang or clang++