Ticket #205 (assigned enhancement)

Opened 2 years ago

Last modified 15 months ago

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

RFC_VS2008_porting_part2.pdf Download (668.8 KB) - added by Pedro.vicente 2 years ago.
Project settings
RFC_VS2008_port_part1.pdf Download (158.9 KB) - added by Pedro.vicente 2 years ago.
Project layout

Change History

comment:1 Changed 2 years ago by Freddie Akeroyd

  • Owner changed from Unassigned to Pedro.vicente

comment:2 Changed 2 years ago by Pedro.vicente

  • Status changed from new to assigned

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:5 Changed 2 years ago by Pedro.vicente

(In [1381]) Added a readme document to build the NeXus library with Visual Studio 2008 based in the document in refs#205

Changed 2 years ago by Pedro.vicente

Project settings

comment:6 Changed 2 years ago by Pedro.vicente

(In [1382]) added a folder structure for applications as described in README_VS2008.pdf updated the solution with the application folders and a new folder /bindings/cpp for the C++ binding 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:8 Changed 2 years ago by Pedro.vicente

(In [1384]) Updated the solution only with working projects These are nxbrowse and the nexus C library

Systems and compilers tested: Windows 7, Microsoft Visual Studio 2008

refs #205

Changed 2 years ago by Pedro.vicente

Project layout

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

(In [1388]) added the Winsock Library file WS2_32.lib to the list of libraries to link

with for the application projects (it is needed when linking with HDF4)

new version of README_VS2008.pdf with detailed information on how to link with

HDF5, HDF4 or MXML

refs #205

comment:11 Changed 2 years ago by Pedro.vicente

(In [1390]) Added new version for README_VS2008.pdf refs #205

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

(In [1438]) refs #205 disabled the declspec(dllexport) and declspec(dllexport) macros eliminated NXnumtype getType(char number), it causes compiling errors due to NXnumtype getType(int8_t number)

tested : Visual Studio 2008, Linux 2.6.18 x86_64 with gcc 4.1.2

comment:14 Changed 2 years ago by Pedro.vicente

(In [1440]) refs #205 updated projects. these include by default settings to build with HDF5

comment:15 Changed 2 years ago by Freddie Akeroyd

(In [1444]) Exclude NXnumtype getType(char number) only on Windows refs #205

comment:16 Changed 23 months ago by Pedro.vicente

(In [1448]) refs #205 updated VS project refs #211 added herr_t instead of int

comment:17 Changed 23 months ago by Pedro.vicente

(In [1450]) refs #205 changed a file name

comment:18 Changed 23 months ago by Pedro.vicente

(In [1451]) refs #205 added Visual Studio 2008 projects for nxingest, nxvalidate, nxsummary, nxtranslate, nxconvert

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

comment:20 Changed 15 months ago by Pedro.vicente

(In [1574]) refs #205 removed a project for NXvalidate and added a project for NXtraverse

comment:21 Changed 15 months ago by Pedro.vicente

(In [1575]) refs #205 added $(HEADER_HDF5) that points to a environment variable with the location of the HDF5 header files ( e.g ../hdf5/include)

Note: See TracTickets for help on using tickets.