かなり前に、私は POS デバイスの C コードをいじっていました。Visual Studio 2008 で開発およびビルドできました。次に、テストのために cygwin に移動し、コードを作成してデバイスにロードするか、付属のシミュレーターを使用しました。どこかで仮想ボックスが失われました。
このデバイスを使ってもう一度やり直したいのですが、コードを Visual Studio 2008 C++ Express でビルドするのに苦労しています。
既存のコードから新しいプロジェクトを作成し、C コードとしてコンパイルするように設定してビルドを試みました。system.h が見つからないと不平を言ったので、tools の下の include ディレクトリにディレクトリを追加しました。
現在、408エラーが発生しています。例を以下に示します。
------ Build started: Project: TestHelloWorld, Configuration: Debug Win32 ------
Compiling...
sysutil.c
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(105) : error C2054: expected '(' to follow '__pcs'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(105) : error C2085: 'disable_interrupt' : not in formal parameter list
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(106) : error C2082: redefinition of formal parameter '__pcs'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(106) : error C2143: syntax error : missing ';' before 'type'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(106) : error C2085: 'enable_interrupt' : not in formal parameter list
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(107) : error C2085: 'call_app_func' : not in formal parameter list
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(108) : error C2082: redefinition of formal parameter '__pcs'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(108) : error C2146: syntax error : missing ',' before identifier 'DWORD'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(108) : error C2146: syntax error : missing ',' before identifier 'os_switch_app'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(108) : error C2143: syntax error : missing ';' before '('
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(108) : error C2059: syntax error : ')'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(109) : error C2054: expected '(' to follow '__pcs'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(109) : error C2085: 'app5_call' : not in formal parameter list
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(110) : error C2082: redefinition of formal parameter '__pcs'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(110) : error C2146: syntax error : missing ',' before identifier 'DWORD'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(110) : error C2146: syntax error : missing ',' before identifier 'app6_call'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(110) : error C2143: syntax error : missing ';' before '('
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(110) : error C2059: syntax error : ')'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(111) : error C2054: expected '(' to follow '__pcs'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(111) : error C2085: 'app7_call' : not in formal parameter list
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(112) : error C2082: redefinition of formal parameter '__pcs'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(112) : error C2146: syntax error : missing ',' before identifier 'DWORD'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(112) : error C2146: syntax error : missing ',' before identifier 'app8_call'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(112) : error C2143: syntax error : missing ';' before '('
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(112) : error C2059: syntax error : ')'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(113) : error C2054: expected '(' to follow '__pcs'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(113) : error C2085: 'app9_call' : not in formal parameter list
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(114) : error C2082: redefinition of formal parameter '__pcs'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(114) : error C2146: syntax error : missing ',' before identifier 'DWORD'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(114) : error C2146: syntax error : missing ',' before identifier 'app10_call'
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(114) : error C2143: syntax error : missing ';' before '('
c:\cygwin\home\creon_sdk_v2.3\program\lib\system.h(114) : error C2059: syntax error : ')'
どうすればこれを機能させることができるか、誰にもわかりません。
コードは、デバイス用の SDK に付属するサンプル コードからのものです。
また、SDK には cygwin がインストールされており、サンプル プログラムを問題なく作成できますが、私は C# 開発者なので、IDE が好きです。以前はこれが機能していましたが、以前はどのように機能したか思い出せません。
どうぞ、ご提案いただければ幸いです。
敬具、
ニール
編集 - system.h のリクエスト行 101 ~ 115 として
#ifndef _SYSTEM_H_
#define _SYSTEM_H_
#include "common.h"
extern __pcs void disable_interrupt();
extern __pcs void enable_interrupt();
extern DWORD call_app_func(void * ptr,DWORD param1,DWORD param2,DWORD param3);
extern __pcs DWORD os_switch_app(BYTE app_id,DWORD param1,DWORD param2,DWORD param3);
extern __pcs DWORD app5_call(DWORD func_no,DWORD param1,DWORD param2, DWORD param3);
extern __pcs DWORD app6_call(DWORD func_no,DWORD param1,DWORD param2, DWORD param3);
extern __pcs DWORD app7_call(DWORD func_no,DWORD param1,DWORD param2, DWORD param3);
extern __pcs DWORD app8_call(DWORD func_no,DWORD param1,DWORD param2, DWORD param3);
extern __pcs DWORD app9_call(DWORD func_no,DWORD param1,DWORD param2, DWORD param3);
extern __pcs DWORD app10_call(DWORD func_no,DWORD param1,DWORD param2, DWORD param3);
ありがとう!