VisualC++

ライブラリの出力名を変える。

ライブラリの出力ファイル名を MyLibrary_x86_Debug.libていう感じにしたい。 更に、↓の感じのディレクトリ構成にしたい。 MyLibrary MyLibrary.sln MyLibrary MyLibrary.vcxproj lib MyLibrary_x86_Debug.lib MyLibrary_x64_Debug.lib MyLibrary_x86_Releas…

ファイバつかってみる。

関数の途中で戻って再開出来るとか、C言語コードだけ見てたらとても奇妙な冒険。 #include "stdafx.h" #include <Windows.h> const int LOOP_COUNT_IN_MAIN = 5; const int LOOP_COUNT_IN_FIBER = 5; PVOID pMainFiber; PVOID pFibers[4]; struct DestroyChecker { ~Des</windows.h>…

Visual C++ 2010 Express で x64 環境を構築する。

Windows 7 Visual C++ 2010 Express x64 ビルド環境構築 - 日々のコーディングについてのページ こちらのサイトの丸写し状態だが…。 Visual C++ 2010 Express はインストールされているものとして、以下の手順を踏む。 Microsoft Windows SDK for Windows 7 …

32回以上左シフトするには、左辺を64bit整数型にする。

int _tmain(int argc, _TCHAR* argv[]) { int rhs32 = 63; __int64 rhs64 = 63; // NG { __int64 flags = 1 << rhs32; printf("%llx\n", flags); } // OK { __int64 flags = static_cast<__int64>(1) << rhs32; printf("%llx\n", flags); } // NG { __int64 flags = 1 </__int64>…

boolのアラインメント

#include <stdio.h> struct BoolAlign { bool _bool0; int _int0; bool _bool1; bool _bool2; int _int1; bool _bool3; bool _bool4; bool _bool5; int _int2; bool _bool6; bool _bool7; short _short0; bool _bool8; short _short1; bool _bool9; int _int3; }; int</stdio.h>…

VisualC++のmlに/omfを指定するとリンクは行われない。

アセンブラに興味がわいた為、昔買って本棚のこやしになっていた高級言語プログラマのためのアセンブラ入門作者: 林晴比古出版社/メーカー: ソフトバンク クリエイティブ発売日: 2005/11/30メディア: 単行本購入: 2人 クリック: 40回この商品を含むブログ (1…