Cygwin

cygwin64においてのwstringとwcout(文字化けなど)

g++ なら文字化けせずに日本語が出力される。 #include <iostream> using namespace std; int main() { // 成功 setlocale(LC_ALL, ""); // or setlocale(LC_ALL, "ja_JP.UTF-8"); wchar_t const *s = L"あいうえお"; wcout << wcslen(s) << " : " << s << endl; // $ </iostream>…

cygwin64でwindowsネイティブアプリ

ソースコード cygwin64でMessageBoxの文字化け回避 - プログラミングのメモ $ PATH=$PATH:/usr/x86_64-w64-mingw32/sys-root/mingw/bin $ x86_64-w64-mingw32-g++ -DUNICODE -std=c++11 -mwindows -Wall test.cpp -o sample.exe $ ldd sample.exe ntdll.dll …

cygwin64でMessageBoxの文字化け回避

#include <windows.h> // fileencoding=utf-8 // fileformat=utf-8 int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // 成功 //LPCWSTR s = L"あいうえお"; // 成功 //WCHAR s[] = L"あいうえお"; //WCHAR const </windows.h>…

cygwin64 にてpythonのライブラリをインストール

cygwin64ではsetup-x86_64からインストールする lxml mako 手動でダウンロードしてインストールする httplib2 https://github.com/jcgregorio/httplib2 python-oauth2 https://pypi.python.org/pypi/python-oauth2/ ダウンロードしたファイルのディレクトリ…

cygwin64 setup

$HOMEと~をWindowsの%HOME%と同じにする vi $HOME/test.c →/cygdrive/c/Users/non/test.c が開かれるvi ~/test.c →home/non/test.c が開かれるこの違いを解消するには /etc/passwd の中から/home/non:/bin/bash を書き換えればいい。 old /home/non:/bin/bas…