Ticket #205 (assigned enhancement)
Visual Studio porting
| Reported by: | Pedro.vicente | Owned by: | Pedro.vicente |
|---|---|---|---|
| Priority: | major | Milestone: | 4.3.0 |
| Component: | napi | Version: | trunk |
| Keywords: | Cc: |
Description
This ticket concerns a porting of the NeXus API for the Microsoft Visual Studio IDE.
A Request for Comments document regarding the project layout and naming is attached.
Attachments
Change History
comment:3 Changed 2 years ago by Pedro.vicente
Updated the RFC with instructions on how to modify the Visual Studio solution project settings to compile and link NeXus Applications and the nexus library with any of the HDF5, HDF4 or NXXML underlying libraries.
comment:4 Changed 2 years ago by Pedro.vicente
(In [1380]) Added a Visual Studio 2008 solution named /windows/nexus.sln with projects for the nexus library and the nxbrowse application. The folder structure for the applications, tests and library is /window/applications /windows/test /windows/nexus
Changed napi5.c to include a conditional compilation preprocessor directive #ifdef HDF5 The document in refs#205 has instructions on how to modify the commited projects to compile and link with each underlying library HDF5, HDF4 or NXXML.
Systems and compilers tested: Windows 7, Microsoft Visual Studio 2008 Ubuntu Linux 9.10 gcc 4.4.1 Mac PPC G4 OS 10.5 , gcc 4.0.1
refs#205
comment:7 Changed 2 years ago by Pedro.vicente
(In [1383]) Changed napi4.c to include a conditional compilation preprocessor directive #ifdef HDF4 Changed nxio.c and nxxml.c c to include a conditional compilation preprocessor directive #ifdef NXXML
Systems and compilers tested:
Windows 7, Microsoft Visual Studio 2008
Mac PPC G4 OS 10.5 , gcc 4.0.1
refs#205
comment:9 Changed 2 years ago by Pedro.vicente
(In [1386]) Added a Visual Studio project for nxdir Systems and compilers tested: Windows 7, Microsoft Visual Studio 2008 Notes: 1) no changes in source code were needed to compile and link in Visual Studio 2) the project does not include any underlying library inclusion; to add those, see /windows/README_VS2008.pdf refs #205
comment:10 Changed 2 years ago by Pedro.vicente
comment:11 Changed 2 years ago by Pedro.vicente
comment:12 Changed 2 years ago by Pedro.vicente
(In [1437]) refs #205 nxisnprintf caused a linking error in string_util.cpp of nxdir solution: defined extern "C" linkage
#define HAVE_INTTYPES_H 0 in /windows/nxconfig.h to avoid the inclusion of #include <inttypes.h>
updated the Visual Studio solution with a C++ binding project (code not ported at the moment)
tested : Visual Studio 2008, Linux 2.6.18 x86_64 with gcc 4.1.2
comment:13 Changed 2 years ago by Pedro.vicente
comment:14 Changed 2 years ago by Pedro.vicente
comment:15 Changed 2 years ago by Freddie Akeroyd
comment:16 Changed 23 months ago by Pedro.vicente
comment:17 Changed 23 months ago by Pedro.vicente
comment:18 Changed 23 months ago by Pedro.vicente
comment:19 Changed 23 months ago by Pedro.vicente
(In [1452]) refs #205 modified code to run with Visual Studio 2008 tested in: Linux x86_64 (gcc 4.1.2), Windows 7, (VS 2008) changes are:
NXconvert-------------:
added a getopt.c to /windows as source file
#ifdef _MSC_VER #include "getopt.h" #else #include <unistd.h> #endif
NXsummary---------------:
added a stdint.h to /windows as source file
#ifdef HAVE_STDINT_H
#include <stdint.h>
#else
#ifdef _MSC_VER
typedef signed int64 int64_t;
typedef unsigned int64 uint64_t;
#endif _MSC_VER
NXtranslate----------------:
replaced value with _value
(value is a VS keyword)
replaced
int dims[rank];
with int dims[NX_MAXRANK];
MXvalidate---------------------:
replaced static int mkstemp(char* template) with static int mkstemp(char* template_name)
Tclap: StdOutput.h -------------------------:
#if defined (_MSC_VER) int stringLen = (std::min)( len - start, allowedLen ); #else
int stringLen = std::min( len - start, allowedLen );
#endif

