successfully compiled on win11

This commit is contained in:
张壹 2021-11-20 00:30:34 +08:00
parent d7da8be039
commit ab8bfb4e8e
3 changed files with 16 additions and 5 deletions

View File

@ -3,8 +3,8 @@ aux_source_directory(. DIR_SRC)
add_executable(gm3d ${DIR_SRC}) add_executable(gm3d ${DIR_SRC})
# #
include_directories(D:/Library/include) include_directories(E:/Library/include)
# #
find_library(FLTK_LIBRARY fltkdll HINTS D:/Library/lib) find_library(FLTK_LIBRARY fltk HINTS E:/Library/lib)
target_link_libraries(gm3d ${FLTK_LIBRARY}) target_link_libraries(gm3d ${FLTK_LIBRARY})

View File

@ -8,7 +8,7 @@
#include "iomanip" #include "iomanip"
#include "stdio.h" #include "stdio.h"
#include "stdlib.h" #include "stdlib.h"
#include "unistd.h" //#include "unistd.h"
#include "vector" #include "vector"
#include "map" #include "map"
#include "algorithm" #include "algorithm"

View File

@ -1,12 +1,23 @@
#ifndef _PROGRESS_BAR_ #ifndef _PROGRESS_BAR_
#define _PROGRESS_BAR_ #define _PROGRESS_BAR_
#include <sys/ioctl.h>
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include <cstring> #include <cstring>
#include <thread> #include <thread>
#include <chrono> #include <chrono>
#if defined _WINDOWS || __WIN32__
#include <windows.h>
#else
#include <sys/ioctl.h>
#include <unistd.h>
#endif
#define TOTAL_PERCENTAGE 100.0 #define TOTAL_PERCENTAGE 100.0
#define CHARACTER_WIDTH_PERCENTAGE 4 #define CHARACTER_WIDTH_PERCENTAGE 4