Support MSVC and MinGW SDK consumers
Compared with dc08a95:
- Add explicit module-definition files for the capture and preview DLLs so their public C export names remain stable and can be consumed without compiler-specific C++ symbol conventions.
- Keep the SDK implementation built with MSVC while automatically using MinGW dlltool to generate libgvfg.dll.a and libgvfg_preview.dll.a alongside the existing MSVC import libraries.
- Make the public capture header portable by including SAL only under MSVC and defining no-op annotations required by non-MSVC C and C++ compilers.
- Replace the Qt sample's compiler-specific wait on std::thread::native_handle() with an explicit atomic worker-completion state while preserving synchronous window-message servicing during shutdown.
- Document that MSVC and MinGW consumers use different import libraries while loading the same gvfg.dll and gvfg_preview.dll at runtime.
Validation: MSVC Debug and Release SDK builds passed and produced both MSVC and MinGW import libraries. Qt MSVC Debug, Qt MinGW Debug, and Qt MinGW Release sample builds and links passed. MinGW C and C++ public-header syntax checks passed, the MinGW executable import table references the expected GVFG DLLs and C exports, and git diff --check passed. No runtime launch, capture, audio playback, clean-machine deployment, or hardware validation was run.
This commit is contained in:
@@ -24,6 +24,8 @@ done-index 與舊 SDK frame-ring 流程不在相容範圍內。
|
||||
|
||||
先使用 MSVC 建立 SDK,再使用需要的 Qt kit 建立 Sample。兩個 project
|
||||
使用不同 build directory,切換 Qt compiler 不會重新編譯 SDK source。
|
||||
SDK build 會保留 MSVC `.lib`,並在找到 MinGW `dlltool` 時從固定的
|
||||
DLL export 清單同步產生 MinGW `.dll.a`;兩種上層共用同一組 MSVC DLL。
|
||||
|
||||
範例:
|
||||
|
||||
@@ -63,9 +65,15 @@ GVFG_SDK/build/bin/gvfg_preview.dll
|
||||
GVFG_SDK/build/lib/gvfg.lib
|
||||
GVFG_SDK/build/lib/giga_ioctl.lib
|
||||
GVFG_SDK/build/lib/gvfg_preview.lib
|
||||
GVFG_SDK/build/lib/libgvfg.dll.a
|
||||
GVFG_SDK/build/lib/libgvfg_preview.dll.a
|
||||
GVFG_Qt_Sample/build/bin/gvfg_qt_preview.exe
|
||||
```
|
||||
|
||||
MSVC 上層連結 `gvfg.lib` 與 `gvfg_preview.lib`;MinGW 上層連結
|
||||
`libgvfg.dll.a` 與 `libgvfg_preview.dll.a`。如果 CMake 找不到 `dlltool`,
|
||||
可在 SDK configure 時指定 `-DGVFG_MINGW_DLLTOOL=<path-to-dlltool.exe>`。
|
||||
|
||||
## Driver compatibility
|
||||
|
||||
此版本只支援新版 PCIE S2MM driver,不再 backward compatible 舊版 driver。
|
||||
|
||||
Reference in New Issue
Block a user