darealshinji / delaycut

cuts and corrects delay in ac3 and dts files
GNU General Public License v3.0
33 stars 4 forks source link

compile fails with msvc #5

Closed Selur closed 7 years ago

Selur commented 7 years ago

a. trying to compile the source I get:

cl : Command line error D8021 : invalid numeric argument '/Wno-unused-but-set-variable'

changing: QMAKE_CXXFLAGS += -std=c++11 -Wno-unused-but-set-variable -Wno-unused-variable to

msvc:CONFIG += c++11 # C++11 support
gcc:QMAKE_CXXFLAGS += -std=c++11 -Wno-unused-but-set-variable -Wno-unused-variable

makes it work again when using msvc instead of gcc

b. running qmake (Qt 5.8.0) I get:

Project WARNING: CONFIG-=import_qpa_plugin is deprecated. Use QTPLUGIN.platforms=- instead. some differentiation between different QT version

greaterThan(QT_MAJOR_VERSION, 4) { # QT5+

} else {

}

might be a good idea for the future

Selur commented 7 years ago

just realized the normal pro already has the needed adjustments, just the nogui one hasnt' ;)

also the nogui version crashes when called with:

delaycut_nogui -startdelay 2000 -o "H:\Output\iId_2_aid_1_13_57_26_5910_02.ac3" -i "H:\Output\iId_2_aid_1_DELAY_2000ms_13_57_26_5910_01.ac3"

=> seems like the nogui version is broken in different places

darealshinji commented 7 years ago

Yeah, the no-gui version is very experimental (I may move it to a different branch). Can you make a PR for the .pro file changes?

Selur commented 7 years ago

too much hassle, simply replacing:

QMAKE_CXXFLAGS += -std=c++11 -Wno-unused-but-set-variable -Wno-unused-variable with

!win32 {
  !greaterThan(QT_MAJOR_VERSION, 4):QMAKE_CXXFLAGS += -std=c++11
  QMAKE_CXXFLAGS += -Wno-unused-but-set-variable -Wno-unused-variable
}

win32-g++* {
  !greaterThan(QT_MAJOR_VERSION, 4):QMAKE_CXXFLAGS += -std=c++11
  QMAKE_CXXFLAGS += -Wno-unused-but-set-variable -Wno-unused-variable
  # tested with MXE (https://github.com/mxe/mxe)
  !contains(QMAKE_HOST.arch, x86_64):QMAKE_LFLAGS += -Wl,--large-address-aware
}

win32-msvc* {
  QMAKE_CXXFLAGS += /bigobj # allow big objects
  !contains(QMAKE_HOST.arch, x86_64):QMAKE_LFLAGS += /LARGEADDRESSAWARE
  QMAKE_CFLAGS_RELEASE += -WX
  QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -WX

  # for Windows XP compatibility
  contains(QMAKE_HOST.arch, x86_64) {
    #message(Going for Windows XP 64bit compatibility)
    #QMAKE_LFLAGS += /SUBSYSTEM:WINDOWS,5.02 # Windows XP 64bit
  } else {
    message(Going for Windows XP 32bit compatibility)
    QMAKE_LFLAGS += /SUBSYSTEM:WINDOWS,5.01 # Windows XP 32bit
  }
}

should fix it. (mainly copying code from the normal pro file :))

darealshinji commented 7 years ago

I've updated the .pro files. I've also moved the "nogui" stuff to the branch experimental/nogui to not confuse anyone. By the way, can you provide msvc and OSX builds for the 1.4.3.9 release (I don't know how to build for these targets)?

Selur commented 7 years ago

busy the next few days, but I'll look into it over the weekend :)

Selur commented 7 years ago

win32, win64 and mac compile: https://dropfile.to/GnkoHMs didn't include the msvc runtimes

darealshinji commented 7 years ago

Thanks.

darealshinji commented 7 years ago

The win64 build is missing platforms/qwindows.dll

Selur commented 7 years ago

didn't add it since it didn't complain about it missing,.. -> here's the qwindows.dll: https://dropfile.to/D0Xc9Fs

darealshinji commented 7 years ago

Now it's working. Thanks.