Giter Site home page Giter Site logo

Comments (3)

Sibras avatar Sibras commented on May 28, 2024

Whats the command line you are passing to FFVS? What version of ffmpeg source code are you runing it against?

from ffvs-project-generator.

jmather-sesi avatar jmather-sesi commented on May 28, 2024

I found that Invalid switch - "" can be triggered by passing --disable-network to project_generate. The full error is:

$ ./ffvs/project_generate.exe --rootdir=ffmpeg-5.1.0 --projdir=ffmpeg-5.1.0/build.debug --disable-network;
[..snip..]
Invalid switch - "".
  Error: Errors detected during compilation :-
         error C2011: 'sockaddr': 'struct' type redefinition
         error C2059: syntax error: 'constant'
         error C2011: 'sockaddr_in': 'struct' type redefinition
         error C2011: 'fd_set': 'struct' type redefinition
         error C2011: 'timeval': 'struct' type redefinition
         error C2011: 'hostent': 'struct' type redefinition
         error C2011: 'netent': 'struct' type redefinition
         error C2011: 'servent': 'struct' type redefinition
         error C2011: 'protoent': 'struct' type redefinition
         error C2011: 'WSAData': 'struct' type redefinition
         error C2011: 'sockproto': 'struct' type redefinition
         error C2011: 'linger': 'struct' type redefinition
         error C2375: 'accept': redefinition; different linkage
         error C2375: 'bind': redefinition; different linkage
         error C2375: 'closesocket': redefinition; different linkage
         error C2375: 'connect': redefinition; different linkage
         error C2375: 'ioctlsocket': redefinition; different linkage
         error C2375: 'getpeername': redefinition; different linkage
         error C2375: 'getsockname': redefinition; different linkage
         error C2375: 'getsockopt': redefinition; different linkage
         error C2375: 'htonl': redefinition; different linkage
         error C2375: 'htons': redefinition; different linkage
         error C2375: 'inet_addr': redefinition; different linkage
         error C2375: 'inet_ntoa': redefinition; different linkage
         error C2375: 'listen': redefinition; different linkage
         error C2375: 'ntohl': redefinition; different linkage
         error C2375: 'ntohs': redefinition; different linkage
         error C2375: 'recv': redefinition; different linkage
         error C2375: 'recvfrom': redefinition; different linkage
         error C2375: 'select': redefinition; different linkage
         error C2375: 'send': redefinition; different linkage
         error C2375: 'sendto': redefinition; different linkage
         error C2375: 'setsockopt': redefinition; different linkage
         error C2375: 'shutdown': redefinition; different linkage
         error C2375: 'socket': redefinition; different linkage
         error C2375: 'gethostbyaddr': redefinition; different linkage
         error C2375: 'gethostbyname': redefinition; different linkage
         error C2375: 'gethostname': redefinition; different linkage
         error C2375: 'getservbyport': redefinition; different linkage
         error C2375: 'getservbyname': redefinition; different linkage
         error C2375: 'getprotobynumber': redefinition; different linkage
         error C2375: 'getprotobyname': redefinition; different linkage
         error C2375: 'WSAStartup': redefinition; different linkage
         error C2375: 'WSACleanup': redefinition; different linkage
         error C2375: 'WSASetLastError': redefinition; different linkage
         error C2375: 'WSAGetLastError': redefinition; different linkage
         error C2375: 'WSAIsBlocking': redefinition; different linkage
         error C2375: 'WSAUnhookBlockingHook': redefinition; different linkage
         error C2375: 'WSASetBlockingHook': redefinition; different linkage
         error C2375: 'WSACancelBlockingCall': redefinition; different linkage
         error C2375: 'WSAAsyncGetServByName': redefinition; different linkage
         error C2375: 'WSAAsyncGetServByPort': redefinition; different linkage
         error C2375: 'WSAAsyncGetProtoByName': redefinition; different linkage
         error C2375: 'WSAAsyncGetProtoByNumber': redefinition; different linkage
         error C2375: 'WSAAsyncGetHostByName': redefinition; different linkage
         error C2375: 'WSAAsyncGetHostByAddr': redefinition; different linkage
         error C2375: 'WSACancelAsyncRequest': redefinition; different linkage
         error C2375: 'WSAAsyncSelect': redefinition; different linkage
         error C2011: 'ip_mreq': 'struct' type redefinition
         error C2061: syntax error: identifier 'IPPROTO'
         error C2059: syntax error: '}'
         error C2061: syntax error: identifier 'IPPROTO'
         error C2059: syntax error: '}'
         error C2065: 'IPPROTO_IPV6': undeclared identifier
         error C2065: 'IPPROTO_IPV6': undeclared identifier
         error C2143: syntax error: missing ')' before '*'
         error C2081: 'ICMP_ERROR_INFO': name in formal parameter list illegal
         error C2143: syntax error: missing '{' before '*'
         error C2059: syntax error: ')'
         error C2054: expected '
         error C2065: 'IPPROTO_IPV6': undeclared identifier
         error C2065: 'IPPROTO_IPV6': undeclared identifier
         Unknown error detected. See ffvs_log.txt for further details.

It can also be generated by passing --enable-demuxer=mov:

$  ./ffvs/project_generate.exe --rootdir=ffmpeg-5.1.0 --projdir=ffmpeg-5.1.0/build.debug   --enable-demuxer=mov;
[..snip..]
Invalid switch - "".
  Error: Errors detected during compilation :-
         error C1083: Cannot open include file: 'unistd.h': No such file or directory
         Based on the above error(s) there are files required for dependency libraries that are not available
         Ensure that any required dependencies are available in 'OutDir' based on the supplied configuration options before trying again.
         Consult the supplied readme for instructions for installing varying dependencies.
         If a dependency has been cloned from a ShiftMediaProject repository then ensure it has been successfully built before trying again.
           Removing the offending configuration option can also be used to remove the error.

ffmpeg 5.1.0 with ffvs 1.11.4. This also occurs with a build of fbafd2f.

from ffvs-project-generator.

Sibras avatar Sibras commented on May 28, 2024

I found that Invalid switch - "" can be triggered by passing --disable-network to project_generate. The full error is:
Running the latest FFVS 1.11.5 on the latest ffmpeg master I cannot reproduce this issue
project_generate.exe --disable-network works without issue

It can also be generated by passing --enable-demuxer=mov:
project_generate.exe --enable-demuxer=mov also does not generate an error on my end

The error your mentioning is due to missing unistd.h which is because Visual Studio does not support it. Any code including unistd.h will not compile in VS so if your getting those errors then there is something wrong with the ffmpeg code your using. FFmpeg checks against msvc compiler support and as such shouldnt include unistd.h anywhere that is not within a preprocessor exclusion. I will also point out that the mov demuxer is enabled by default and there hasnt been any similar problems to what your describing.

from ffvs-project-generator.

Related Issues (20)

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.