Skip to content

cargo build throws error - error: ISO C++ forbids comparison between pointer and integer [-fpermissive] in mp4v2-sys v0.1.0  #46

@davnav

Description

@davnav

I am getting below error when try to build the library using 'cargo build' . Please advise

System: Ubuntu 20.04.3 LTS

--- stderr
  In file included from ./src/src.h:28,
                   from ./src/impl.h:6,
                   from src/rtphint.cpp:22:
  ./src/mp4util.h:36:33: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
     36 |             throw new Exception("assert failure: "LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \
        |                                 ^
  src/rtphint.cpp: In member function ‘void mp4v2::impl::MP4RtpHintTrack::GetPayload(char**, uint8_t*, uint16_t*, char**)’:
  src/rtphint.cpp:342:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    342 |                     if (pSlash != '\0') {
        |                                   ^~~~
  make: *** [makefile.cargo:155: /home/naveen/Documents/Rustprojects/rust-media/target/debug/build/mp4v2-sys-13ad75970c243e76/out/src/rtphint.o] Error 1
  thread 'main' panicked at 'assertion failed: result.success()', /home/naveen/.cargo/git/checkouts/mp4v2-631e8f3a85428d68/a6d29cd/build.rs:17:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

rust-media

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions