概要
- 作業メモ
-
cantoolsのサンプル
dbcls
をVisual C++ 2015でビルド cantools-0.19
-
dbcls
は、cantools
内のlibcandbc
のみ使用。 - getoptは、こちらを利用: getopt / getopt_long for Windows Visual C/C++ (MIT LICENSE)
-
basename()
は、_splitpath
を使用
環境
- Windows 7 64ビット
- Visual Studio 2015 Update 3
手順
git clone https://github.com/mt08xx/cantools_canls_vc.git
-
cantools_canls_vc.sln
をダブルクリックして、VCを開く - (構成をえらんで) CTRL+SHIFT+B で、ビルド
その他
- 関連: [メモ] オープンソースのcantools の libcandbcで、.dbcファイルの読み込み
-
basename()
は、こんな感じ... #if 0 #include <libgen.h> #else #include <stdlib.h> char path_buffer[_MAX_PATH]; char drive[_MAX_DRIVE]; char dir[_MAX_DIR]; char fname[_MAX_FNAME]; char ext[_MAX_EXT]; char *dirname(char *path) { _splitpath(path, drive, dir, fname, ext); return dir; } char *basename(char *path) { _splitpath(path, drive, dir, fname, ext); return fname; } #endif ...
dbcls
なのに、canls
で作業してたな...