Comments (9)
TDM-GCC is broken and outdated as all hell, I recommend using MSYS2 and GCC therefrom
from termcolor.
@naydef Hm.. I think the problem is that TDM-GCC tries to be compatible with *nix api and provide those sort of headers. Could you please check whether it defines either __unix__
or __unix
macro? If so, please try to swap lines in OS detection code.
#if defined(__unix__) || defined(__unix) // that line wasn't first
# define TERMCOLOR_OS_LINUX
#elif defined(_WIN32) || defined(_WIN64)
# define TERMCOLOR_OS_WINDOWS
#elif defined(__APPLE__)
# define TERMCOLOR_OS_MACOS
#else
# error unsupported platform
#endif
from termcolor.
No. They are not defined. The test code:
int main(int args, char *argv[])
{
//std::cout << termcolor::red <<"Welcome to Steam Server Query Tool v" << SSQ_VERSION; //<< termcolor::reset;
#ifdef __unix__
std::cout << "__unix__" << std::end;
#endif // __unix__
#ifdef __unix
std::cout << "__unix" << std::endl;
#endif // __unix
std::cout << "Hello" << std::endl;
return EXIT_SUCCESS;
}
Prints:
Hello
Process returned 0 (0x0) execution time : 0.024 s
Press any key to continue.
Replaced the code with the posted here and doesn't work. The same error
from termcolor.
I'm pretty sure this is TDM-GCC's trashiness :G
from termcolor.
@naydef please try to define it before including termcolor.hpp
. It seems like TDD-GCC provides Nix API, thought it's strange it doesn't setup __unix
macro.
from termcolor.
The __unix
macro would break just about every non-trivial piece of code in existence
from termcolor.
@ikalnitsky, What? Where to define it? Anyway, I will try with tdm-gcc 5.1.0
from termcolor.
@naydef I'm not sure tdm-gcc 5.1.0
could fix that. It seems it doesn't have some implementation, or store them in other headers. I'm really sorry, I can't help ya now. I don't have any Windows machine near me. :(
I think the best thing you can do is to google where to find _fileno
function in that compiler.
from termcolor.
You're right @ikalnitsky. Installed TDM-GCC 5.1.0
and now it compiles correctly and works. Thanks
I will close this issue
from termcolor.
Related Issues (20)
- Include Error HOT 3
- Windows 10 Virtual Terminal Sequence Support HOT 1
- Tag a version HOT 1
- Fall back to no colors on unknown OSes
- Add support for std::clog HOT 2
- Intensity on Windows HOT 6
- Support for Gitbash on Windows HOT 1
- Expose is_colorized HOT 2
- Could you help using some open source license such as MIT or GPL? HOT 3
- #define min() and #define max() pollute global namespace by including termcolor.hpp HOT 4
- Control Characters on Windows Terminal HOT 1
- Wheel support for linux aarch64/x86 HOT 1
- Qt support HOT 3
- colorize_index has different values in different translation units HOT 1
- Add pkg-config integration.
- ANSI getting printed instead of colored text HOT 2
- Test for wchar_t
- Please publish new 2.0.1 / 2.1.0 release HOT 1
- fmt support? file descriptor support?
- does not play nicely with MSYS/MinGW shells
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 termcolor.