Giter VIP home page Giter VIP logo

Comments (3)

friedrich avatar friedrich commented on July 25, 2024

Did you run hans as administrator? Does it work with the binary provided?

from hans.

vabatta avatar vabatta commented on July 25, 2024

Yes. Binary provided works perfectly. Now, I did some change to the source, and I would like to recompile it but for windows.

from hans.

Anime4000 avatar Anime4000 commented on July 25, 2024

I trying to compile hans-1.0 with cygwin, no luck...
trying to using older gcc (5.4.0) still same error

anime4000@anime-pc ~/hans-master
$ make
mkdir -p build
i686-pc-cygwin-g++ -c src/tun.cpp -o build/tun.o -c -g -std=c++98 -pedantic -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -fpermissive `sh osflags c `
src/tun.cpp: In constructor ‘Tun::Tun(const string*, int)’:
src/tun.cpp:78:33: warning: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     winsystem(cmdline.str().data());
                                 ^
src/tun.cpp:44:13: note:   initializing argument 1 of ‘void winsystem(char*)’
 static void winsystem(char *cmd)
             ^
src/tun.cpp: In member function ‘void Tun::setIp(uint32_t, uint32_t)’:
src/tun.cpp:100:33: warning: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     winsystem(cmdline.str().data());
                                 ^
src/tun.cpp:44:13: note:   initializing argument 1 of ‘void winsystem(char*)’
 static void winsystem(char *cmd)
             ^
i686-pc-cygwin-g++ -c src/sha1.cpp -o build/sha1.o -c -g -std=c++98 -pedantic -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -fpermissive `sh osflags c `
i686-pc-cygwin-g++ -c src/main.cpp -o build/main.o -c -g -std=c++98 -pedantic -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -fpermissive `sh osflags c `
src/main.cpp: In function ‘int main(int, char**)’:
src/main.cpp:225:29: error: variable ‘main(int, char**)::addrinfo hints’ has initializer but incomplete type
             struct addrinfo hints = {0};
                             ^
src/main.cpp:229:44: error: ‘AI_ADDRCONFIG’ was not declared in this scope
             hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG;
                                            ^
src/main.cpp:231:72: error: ‘getaddrinfo’ was not declared in this scope
             int err = getaddrinfo(serverName.data(), NULL, &hints, &res);
                                                                        ^
src/main.cpp:234:68: error: ‘gai_strerror’ was not declared in this scope
                 syslog(LOG_ERR, "getaddrinfo: %s", gai_strerror(err));
                                                                    ^
src/main.cpp:238:72: error: invalid use of incomplete type ‘struct main(int, char**)::addrinfo’
             sockaddr_in *sockaddr = reinterpret_cast<sockaddr_in *>(res->ai_addr);
                                                                        ^
src/main.cpp:225:20: note: forward declaration of ‘struct main(int, char**)::addrinfo’
             struct addrinfo hints = {0};
                    ^
src/main.cpp:245:29: error: ‘freeaddrinfo’ was not declared in this scope
             freeaddrinfo(res);
                             ^
src/main.cpp:251:24: error: ‘daemon’ was not declared in this scope
             daemon(0, 0);
                        ^
make: *** [Makefile:41: build/main.o] Error 1

from hans.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.