Hello everyone , I m new to emcc.
Today I followed the user guide to install emcc and run the hello world
example successfully.
However, things went wrong when I tried to compile another c file to js
file.
At first, I got an error
testfiles/getip.c:10:17: fatal error: 'linux/if_link.h' file not
found
#include <linux/if_link.h>
^~~~~~~~~~~~~~~~~
1 error generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
The strange thing is that I compiled the c file early with gcc without
error. It can be run successfully.
So I changed my code and removed "<linux/if_link.h>". I got another
compile warning: warning:unresolved symbol: htons.
It s source c code can also be compiled with gcc.
Is there anything I missed or unconfigured?
Compile enviroment : ubuntu
head include:
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <linux/if_link.h>
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.