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 pkg install git

Make failed, since there is no GCC program. I edited the Makefile, and replaced gcc -g with cpp .

Now, it is failing with
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 gcc -g to 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++