Comments (13)
Yes, mingw built C++ plugins are compatible only with mingw build Avisynth+.
(following the README.md build instructions I've encountered the missing header, so I fixed it).
As for Visual Studio: open the solution file (.sln) in the IDE and build the project. I usually do this.
from tivtc.
It looks like the first make command autodetected my CPU as AMD - "-- Detected target processor as: AMD64". Is that correct? My CPU is Intel i5-4570. Are there some makefile switches I can set to tell it to try building a different version?
Using VS through the command-line CMake interface can be done by first launching the Visual Studio Command Prompt and specifying "Visual Studio XX 20YY" as the generator, where the XX and YY refer to whatever version of VS is being used (16 2019, for example).
Overriding/appending CMAKE_CXX_FLAGS or CMAKE_SHARED_LINKER_FLAGS doesn't usually involve needing to edit CMakeLists.txt, as virtually every sort of thing you can set()
inside of them can also be passed to the CLI at configure time, e.g. -DCMAKE_CXX_FLAGS="-static"
or -DCMAKE_SHARED_LINKER_FLAGS="-static-libgcc"
.
But yes, as stated, GCC and MSVC use incompatible C++ ABIs and you can't mix and match host and plugins across compilers. And by default, GCC-built AviSynth+ actually looks in a completely different set of directories for plugins (plugins_gcc and plugins64_gcc), so as not to cause load errors.
from tivtc.
The solution and project files are set to v143 platform toolset, this is what vs2022 uses. For vs2019 go into config and change that to v142 toolset, that must be fine.
from tivtc.
Oh I tried putting #include <memory>
in info.h and info.cpp like the compiler error suggested and it works now, I get a TIVTC.dll file.
But, Avisynth doesn't see it:
edit: I tried LoadPlugin() and LoadCPlugin(), no effect.
I guess it must have built wrongly - here is the built file.
It looks like the first make command autodetected my CPU as AMD - "-- Detected target processor as: AMD64". Is that correct? My CPU is Intel i5-4570. Are there some makefile switches I can set to tell it to try building a different version?
Here is the successful second build output:
# cmake --build . --config Release
[ 2%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/__/common/TCommonASM.cpp.obj
[ 5%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/__/common/fixedfonts.cpp.obj
[ 7%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/__/common/info.cpp.obj
In file included from C:\TIVTC-master\src\common\info.cpp:27:
C:/TIVTC-master/src/include/avs/win.h:44: warning: "STRICT" redefined
44 | #define STRICT
|
In file included from C:/msys64/mingw64/include/windef.h:9,
from C:/msys64/mingw64/include/windows.h:69,
from C:\TIVTC-master\src\common\internal.h:12,
from C:\TIVTC-master\src\common\info.h:30,
from C:\TIVTC-master\src\common\info.cpp:23:
C:/msys64/mingw64/include/minwindef.h:11: note: this is the location of the previous definition
11 | #define STRICT 1
|
[ 10%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/__/common/internal.cpp.obj
[ 12%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/Cache.cpp.obj
[ 15%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/Cycle.cpp.obj
[ 17%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/FieldDiff.cpp.obj
[ 20%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/FrameDiff.cpp.obj
[ 22%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/IsCombedTIVTC.cpp.obj
[ 25%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/MergeHints.cpp.obj
[ 27%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/PlanarFrame.cpp.obj
[ 30%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/PluginInit.cpp.obj
[ 32%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/RequestLinear.cpp.obj
[ 35%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TDecimate.cpp.obj
[ 37%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TDecimateASM.cpp.obj
[ 40%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TDecimateBlur.cpp.obj
[ 42%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TDecimateMode2.cpp.obj
[ 45%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TDecimateMode7.cpp.obj
[ 47%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TDecimateOut.cpp.obj
[ 50%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TFM.cpp.obj
[ 52%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TFMASM.cpp.obj
[ 55%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TFMD2V.cpp.obj
[ 57%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TFMPP.cpp.obj
[ 60%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TFMPlanar.cpp.obj
[ 62%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/TFMYUY2.cpp.obj
[ 65%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/calcCRC.cpp.obj
[ 67%] Building CXX object TIVTC/CMakeFiles/TIVTC.dir/profUtil.cpp.obj
[ 70%] Linking CXX shared library TIVTC.dll
[ 70%] Built target TIVTC
[ 72%] Building CXX object TDeint/CMakeFiles/TDeint.dir/__/common/TCommonASM.cpp.obj
[ 75%] Building CXX object TDeint/CMakeFiles/TDeint.dir/__/common/fixedfonts.cpp.obj
[ 77%] Building CXX object TDeint/CMakeFiles/TDeint.dir/__/common/info.cpp.obj
In file included from C:\TIVTC-master\src\common\info.cpp:27:
C:/TIVTC-master/src/include/avs/win.h:44: warning: "STRICT" redefined
44 | #define STRICT
|
In file included from C:/msys64/mingw64/include/windef.h:9,
from C:/msys64/mingw64/include/windows.h:69,
from C:\TIVTC-master\src\common\internal.h:12,
from C:\TIVTC-master\src\common\info.h:30,
from C:\TIVTC-master\src\common\info.cpp:23:
C:/msys64/mingw64/include/minwindef.h:11: note: this is the location of the previous definition
11 | #define STRICT 1
|
[ 80%] Building CXX object TDeint/CMakeFiles/TDeint.dir/__/common/internal.cpp.obj
[ 82%] Building CXX object TDeint/CMakeFiles/TDeint.dir/TDBuf.cpp.obj
[ 85%] Building CXX object TDeint/CMakeFiles/TDeint.dir/TDeintASM.cpp.obj
[ 87%] Building CXX object TDeint/CMakeFiles/TDeint.dir/TDeinterlace.cpp.obj
[ 90%] Building CXX object TDeint/CMakeFiles/TDeint.dir/TDeinterlacePlanar.cpp.obj
[ 92%] Building CXX object TDeint/CMakeFiles/TDeint.dir/TDeinterlaceYUY2.cpp.obj
[ 95%] Building CXX object TDeint/CMakeFiles/TDeint.dir/THelper.cpp.obj
[ 97%] Building CXX object TDeint/CMakeFiles/TDeint.dir/TSwitch.cpp.obj
[100%] Linking CXX shared library TDeint.dll
[100%] Built target TDeint
from tivtc.
If I move the TIVTC.dll to another location, eg. C:\ and do a LoadPlugin("C:\TIVTC.dll") then I get a meaningful error message code 126:
I don't know why it shows it as forward slash, it's definitely a backslash in my script
from tivtc.
Seems to be missing some libgcc dependencies...
from tivtc.
I think I need to tell GCC to include those dependencies in the compilation, but I don't know how
from tivtc.
According to a StackOverflow post I need to compile with flags: -static-libstdc++ -static-libgcc
But I'm not sure how to do that -- do I need to modify the makefiles?
from tivtc.
Tried putting set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
inside all CMakeLists.txt files to no effect
from tivtc.
Are you using mingw built Avisynth+? Mingw and Windows-style DLLs are not ABI compatible. Plugin using C interface has no problems, but they are very rare. The real expert of MSys2/Mingw64 is @qyot27, I'd ask him.
from tivtc.
Are you using mingw built Avisynth+?
I'm using the current latest public release from the GitHub repository, so I guess that means no.
I managed to include all those GCC dependencies in TIVTC.dll by putting set(CMAKE_CXX_FLAGS "-static")
inside all CMakeLists.txt files - in this case Avisynth Info Tool reports no problems with the .dll but I still get the "no function named TDecimate" when trying to call TDecimate().
But LoadPlugin("C:\TIVTC.dll") doesn't throw an error anymore, and the TIVTC.dll is bigger so I know it included those GCC dependencies.
So I guess the GCC builds just aren't compatible with the public release build of Avisynth, so I probably have to use Visual Studio to compile it instead, have I got that right? How are you compiling it?
from tivtc.
(As for mingw built DLL / Load error 126: The missing DLLs (standard c++ library, posix threads, library (but I don't think TIVTC is using that) are somewhere in your gcc directory. The command ldd <your_dll_name>
can list the dependencies if they are not statically linked (as you finally did).
from tivtc.
Thanks, a bit disappointing as I was trying to avoid using the Visual Studio GUI . I tried the 2019 Community version and it's ok but it only lets me compile the CLang version due to missing compilation tools. Guess I need the 2022 version?
from tivtc.
Related Issues (20)
- adding clip3 for Bob for 60 fps VFR HOT 2
- Ideas to improvement TFM matching HOT 1
- TDeint 1.8 crashes with AviSynth 2.6.0 HOT 2
- feature request: "animation mode" to detect and avoid blocky frames from mismatching HOT 17
- [ Linux ] malloc(): invalid size (unsorted) HOT 22
- Frame properties HOT 18
- No documentation for 'l' and 'h' match codes
- Add #include <memory> to src/info.cpp (unique_ptr, current_font, GetBitmapFont errors)
- TIVTC error with frame properties
- TFM overriding combed frame detection doesn't work in mode 7 HOT 1
- Feeding TFM a .d2v leads to unreliable results HOT 2
- CFrameDiff prevf=-2 HOT 6
- TDecimate wipes ALL frame properties when outputting hybrid (blended) frames HOT 5
- TFM 1.0.27 not detecting field order? HOT 7
- TFM - Can't override to use clip2 deinterlacer when PP is initially set to 0 HOT 3
- TDecimate - want to be able to see on the screen when specify a large cycle HOT 49
- TDecimate(hybrid=3) blending with wrong frame HOT 2
- Pull request - add frame property "TDecimateCycleMetrics" HOT 1
- Vapoursynth support? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tivtc.