Martin Leung wrote:
Hi Karten,
Thanks for the info but I still have a few queries:
1. I didn't find the pthread lib/dll in your zip file so I got it from
redhat. There are 2 versions, 1.11 and 2.70. Which one should I use?
I believe I have tried with the 1.0 and 2.0 version. If the library is
API compatible, it should not matter, what you take. I believe I have
stated some words to the version problem in Install.w32.
2. Do I need a FLEX_INC? Where can I get the flex include files?
This is actually only the file unistd.h or something like this. But you
got the point in your next mail. I think I mentioned this also in teh
install.w32. It is not clear?
3. I got the following error with nmake:
You solved the problem on your own.
Regards, Karsten
PCSC.mak(27) : fatal error U1050: Your path to the header file needed to
compile
C files generated by flex is wrong. A file called unistd.h is needed to
compile
C files generated by flex. Replace it in the Makefile or call nmake
with FLEX_I
NC=<HEADERS_NEEDED_TO_COMPILE_FLEX_FILES>
What did I miss? Below is my build file:
==========================================================
@echo off
rem - download flex from http://gnuwin32.sourceforge.net/packages/flex.htm
rem Possible arguments:
rem PTHREADS_INC - Path to pthreads includes
rem PTHREADS_LIB - Path to pthreads link library (.lib)
rem PTHREADS_NAME - Name of pthreads library (without extension)
rem FLEX - Path including file name of the flex executable
rem FLEX_INC - Path to shipped flex includes
rem PCSC_INC - Path to PC/SC Lite includes
rem set PTHREADS_VER=v2.7.0
set PTHREADS_VER=v1.11.0
set PTHREADS_INC=d:\MyCodes\muscle\pthread\%PTHREADS_VER%\include
set PTHREADS_LIB=D:\MyCodes\muscle\pthread\%PTHREADS_VER%\lib
set PTHREADS_NAME=pthreadVC1
set FLEX=c:\Progra~1\GnuWin32\bin\flex.exe
set FLEX_INC=
set PCSC_INC=..\src\PCSC\win32
cd "C:\Program Files\Microsoft Visual Studio\VC98\Bin"
if not .%_SET_VCVARS%==.Y call c:vcvars32.bat
if not .%_SET_VCVARS%==.Y set _SET_VCVARS=Y
c:nmake -f PCSC.mak PTHREADS_INC=%PTHREADS_INC%
PTHREADS_LIB=%PTHREADS_LIB% PTHREADS_NAME=%PTHREADS_NAME% FLEX=%FLEX%
PCSC_INC=%PCSC_INC%
Rgds.
Martin
Karsten Ohme wrote:
Martin Leung wrote:
Hi,
I am trying to build libmusclecard on Win32 and have a few questions.
Use this one:
http://www.inf.tu-dresden.de/~ko189283/MuscleCard/
It is a new version of the whole MuscleCard chain in development. But
it should work. Read the README or the Install.w32 respectively. You
can load everything to benefit (or that it works at all). Everything
there should be adapted to this (The PKCS#11 does not contain the last
patches.)
But read this at the beginning to see the changes:
http://www.inf.tu-dresden.de/~ko189283/MuscleCard/libmusclecardChanges.html
1. How to create tokenparser.c on Win32?
Flex/Bison for Windows. If you read the Install.w32 thsi is clear and
will know how to get it. There is also a free build version if you
have no Visual Studio. Else use nmake of Visual Studio. Well,
everything mentioned in the install.w32.
There is no tokenparser.c in cvs. I downloaded the src to Fedora
and make tokenparser.c there. Is this the right way to do so?
Also, the tokenparser.c generated in this way doesn't include
<stdlib.h> (probably c_plusplus is not defined). Can I pass a
flag to bootstrap/configure/make to get stdlib include?
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
2. Should pcsc extension in pcsclite.h be extracted into a separate
header file,say, pcsc_ext.h?
The current pcsclite.h reads:
#ifdef WIN32
#include <winscard.h>
#else
... win32 winscard equivalent ...
... pcsclite extensions ....
#endif
Win32 fails to compile due to missing of pcsclite extensions. Should
I extract the extensions to another file and include it inside
pcsclite.h?
3. How to handle unistd.h?
Multiple src files contain:
#include <unistd.h>
that causes error when compiling on win32. Should I use the
flag HAVE_UNISTD_H config.h.in or simply use,
#if !defined(WIN32)
#include <unistd.h>
#endif
4. To get tokenparser.c to compile on win32, I've to define:
#define YY_NEVER_INTERACTIVE 1
Is it correct? Should this go to win32/config.h
5. Currently MSC_SVC_DROPDIR is hardcoded:
#define MSC_SVC_DROPDIR "C:\\Program Files\\Muscle\\Services"
On Win32, I would suggest to read it from registry as in the
case of PKCS11. Any comment?
Done. It works this way in my version.
Regards, Karsten
Rgds.
Martin
------------------------------------------------------------------------
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle