OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • Requesting help compiling a simple program for use with OpnSense.
« previous next »
  • Print
Pages: [1]

Author Topic: Requesting help compiling a simple program for use with OpnSense.  (Read 5018 times)

aaronouthier

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
    • View Profile
Requesting help compiling a simple program for use with OpnSense.
« 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.
Logged

aaronouthier

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
    • View Profile
Re: Requesting help compiling a simple program for use with OpnSense.
« Reply #1 on: February 27, 2019, 03:13:31 am »
Just found an updated project: 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.
Logged

aaronouthier

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
    • View Profile
Re: Requesting help compiling a simple program for use with OpnSense.
« Reply #2 on: February 27, 2019, 03:25:40 am »
Well, that almost worked. The correct command was actually cc, not cpp or gcc.
Logged

fabian

  • Moderator
  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Requesting help compiling a simple program for use with OpnSense.
« Reply #3 on: February 27, 2019, 05:48:11 pm »
the command is clang or clang++
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • Requesting help compiling a simple program for use with OpnSense.
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2