fCWT icon indicating copy to clipboard operation
fCWT copied to clipboard

Import assert.h explicitly for Windows compatibility

Open bjmiao opened this issue 11 months ago • 0 comments

When building the software in windows, the following error comes:

MSBuild version 17.13.9+e0f243f1e for .NET Framework

  1>Checking Build System
  Building Custom Rule C:/Users/augus/fCWT/CMakeLists.txt
  fcwt.cpp
C:\Users\augus\fCWT\src\fcwt\fcwt.cpp(148,5): error C3861: 'assert': identifier not found [C:\Users\augus\fCWT\build\fC
WT.vcxproj]
C:\Users\augus\fCWT\src\fcwt\fcwt.cpp(167,5): error C3861: 'assert': identifier not found [C:\Users\augus\fCWT\build\fC
WT.vcxproj]
C:\Users\augus\fCWT\src\fcwt\fcwt.cpp(184,5): error C3861: 'assert': identifier not found [C:\Users\augus\fCWT\build\fC
WT.vcxproj]
C:\Users\augus\fCWT\src\fcwt\fcwt.cpp(541,5): error C3861: 'assert': identifier not found [C:\Users\augus\fCWT\build\fC
WT.vcxproj]
C:\Users\augus\fCWT\src\fcwt\fcwt.cpp(546,5): error C3861: 'assert': identifier not found [C:\Users\augus\fCWT\build\fC
WT.vcxproj]

After adding a line of #include <assert.h> in the fcwt.h simply solves the problem.

I am happy to create a pull request if you think this is necessary for Windows Compability

Environment Information

c:\Users\augus\fCWT\build>cmake -G "Visual Studio 17 2022" -DBUILD_MATLAB=ON ..
Build type is Release
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.43.34808.0
-- The CXX compiler identification is MSVC 19.43.34808.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Building of shared library is enabled.
-- Found OpenMP_C: -openmp (found version "2.0")
-- Found OpenMP_CXX: -openmp (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
Building for Windows
C:/Users/augus/fCWT
STATUS OF LIBRARY: FFTW: [C:/Users/augus/fCWT/libs/fftw3f.lib]
-- Found Matlab: C:/Program Files/MATLAB/R2022b (found version "9.13.0.2502115")
-- Configuring done (6.6s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Users/augus/fCWT/build

bjmiao avatar Feb 26 '25 20:02 bjmiao