Closed demosthenesk closed 5 months ago
Hi @demosthenesk!
I don't understand why you are getting this error, but it looks like you should be able to avoid it by adding the -DTV_OPTIMIZE_BUILD=OFF
option to the first CMake invocation.
now i get,
demos@asus-laptop MINGW64 ~ $ cd tvision-master/
demos@asus-laptop MINGW64 ~/tvision-master $ cmake . -B ./build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DTV_OPTIMIZE_BUILD=OFF && cmake --build ./build -- The C compiler identification is GNU 13.2.0 -- The CXX compiler identification is GNU 13.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: C:/msys64/usr/bin/cc.exe -- Check for working C compiler: C:/msys64/usr/bin/cc.exe - works -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Check for working CXX compiler: C:/msys64/usr/bin/c++.exe -- Check for working CXX compiler: C:/msys64/usr/bin/c++.exe - works -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test SUPPORTS_COUNTER_MACRO -- Performing Test SUPPORTS_COUNTER_MACRO - Success -- Install path: C:/Program Files (x86)/tvision -- Build Examples: ON -- Check if the system is big endian -- Searching 16 bit integer -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of unsigned short -- Check size of unsigned short - done -- Searching 16 bit integer - Using unsigned short -- Check if the system is big endian - little endian -- Configuring done (16.5s) -- Generating done (1.8s) -- Build files have been written to: C:/msys64/home/demos/tvision-master/build [ 0%] Building CXX object source/CMakeFiles/tvision.dir/platform/ansidisp.cpp.obj In file included from C:/msys64/home/demos/tvision-master/include/tvision/internal/ansidisp.h:5, from C:\msys64\home\demos\tvision-master\source\platform\ansidisp.cpp:1: C:/msys64/home/demos/tvision-master/include/tvision/tv.h:21: warning: "__cdecl" redefined 21 | #define __cdecl |
---|
It looks like you are using MSYS2's GCC, which apparently mimics Cygwin's GCC in the sense that it makes the code believe that it is being compiled for a Unix-like platform (https://github.com/msys2/MSYS2-packages/issues/2718#issuecomment-985239585).
I have never tried it, so I don't know if this project can be built using this compiler. But there are a few things you can try before giving up:
-mwin32
compilation flag (mentioned in https://github.com/time-rs/time/issues/45#issue-52980185): add the -DCMAKE_CXX_FLAGS=-mwin32
option to the first CMake invocation._WIN32
manually: add the -DCMAKE_CXX_FLAGS=-D_WIN32
option to the first CMake invocation.it worked but i get direct.h error
emos@asus-laptop MINGW64 ~/tvision-master
$ cmake . -B ./build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DTV_OPTIMIZE_BUILD=OFF -DCMAKE_CXX_FLAGS=-D_WIN32 && cmake --build ./build
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/msys64/usr/bin/cc.exe
-- Check for working C compiler: C:/msys64/usr/bin/cc.exe - works
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/msys64/usr/bin/c++.exe
-- Check for working CXX compiler: C:/msys64/usr/bin/c++.exe - works
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test SUPPORTS_COUNTER_MACRO
-- Performing Test SUPPORTS_COUNTER_MACRO - Success
-- Install path: C:/Program Files (x86)/tvision
-- Build Examples: ON
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Configuring done (16.2s)
-- Generating done (1.7s)
-- Build files have been written to: C:/msys64/home/demos/tvision-master/build
[ 0%] Building CXX object source/CMakeFiles/tvision.dir/platform/ansidisp.cpp.obj
[ 1%] Building CXX object source/CMakeFiles/tvision.dir/platform/base64.cpp.obj
[ 1%] Building CXX object source/CMakeFiles/tvision.dir/platform/buffdisp.cpp.obj
[ 1%] Building CXX object source/CMakeFiles/tvision.dir/platform/codepage.cpp.obj
[ 2%] Building CXX object source/CMakeFiles/tvision.dir/platform/colors.cpp.obj
[ 2%] Building CXX object source/CMakeFiles/tvision.dir/platform/cursor.cpp.obj
[ 3%] Building CXX object source/CMakeFiles/tvision.dir/platform/dir.cpp.obj
In file included from C:\msys64\home\demos\tvision-master\source\platform\dir.cpp:7:
C:/msys64/home/demos/tvision-master/include/tvision/compat/borland/dir.h:24:10: fatal error: direct.h: No such file or directory
24 | #include ~~~~~
compilation terminated.
mingw32-make.exe[2]: [source\CMakeFiles\tvision.dir\build.make:166: source/CMakeFiles/tvision.dir/platform/dir.cpp.obj] Error 1
mingw32-make.exe[1]: [CMakeFiles\Makefile2:280: source/CMakeFiles/tvision.dir/all] Error 2
mingw32-make.exe: *** [Makefile:135: all] Error 2
well i manage to compile tvision with msys2. i had to remove completely the msys2 installation and reinstall it. i used mingw64 only enviroment.
i installed the next packages...
mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-cross-toolchain
and compile with cmake . -B ./build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DTV_OPTIMIZE_BUILD=OFF && cmake --build ./build
thanks for your time !
hello, i got the next error,
demos@asus-laptop MINGW64 ~ $ cd tvision-master/
demos@asus-laptop MINGW64 ~/tvision-master $ cmake . -B ./build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release && cmake --build ./build -- The C compiler identification is GNU 13.2.0 -- The CXX compiler identification is GNU 13.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: C:/msys64/usr/bin/cc.exe -- Check for working C compiler: C:/msys64/usr/bin/cc.exe - works -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Check for working CXX compiler: C:/msys64/usr/bin/c++.exe -- Check for working CXX compiler: C:/msys64/usr/bin/c++.exe - works -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test SUPPORTS_COUNTER_MACRO -- Performing Test SUPPORTS_COUNTER_MACRO - Success -- Install path: C:/Program Files (x86)/tvision -- Build Examples: ON -- Check if the system is big endian -- Searching 16 bit integer -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of unsigned short -- Check size of unsigned short - done -- Searching 16 bit integer - Using unsigned short -- Check if the system is big endian - little endian -- Configuring done (16.0s) -- Generating done (1.7s) -- Build files have been written to: C:/msys64/home/demos/tvision-master/build [ 0%] Building CXX object source/CMakeFiles/tvision.dir/cmake_pch.hxx.gch