This page is for supplementary information relating to the implementation described in Section 2.1 of the Installer's Note. It may be augmented over the life-time of the product if further pertinent information becomes available.
hardware: Intel ia32 systems and compatible operating system: Microsoft Windows 32-bit and 64-bit editions C compiler: Intel 32-bit C++ Compiler Version 18.104.22.168 Build 20170411 and compatible Microsoft 32-bit C/C++ Compiler Version 19.10 or compatible
This implementation has been successfully tested using the following:
hardware: Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz machine: mp-scarborough cpu flags: sse2 avx avx2 operating system: Windows 10 Enterprise compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x86 Visual Studio Tools: VS 2017
hardware: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz machine: scarborough cpu flags: sse2 avx operating system: Windows 7 Professional Service Pack 1 compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86 Visual Studio Tools: VS 2015
hardware: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz machine: win732qp2 cpu flags: sse2 operating system: Windows 7 Enterprise Service Pack 1 compiler: Intel(R) C++ Compiler for IA-32, Version 22.214.171.124 Build 20160415 Visual Studio Tools: VS 2015 compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86 Visual Studio Tools: VS 2015
hardware: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz machine: win764avx2 cpu flags: sse2 avx avx2 operating system: Windows 7 Enterprise Service Pack 1 compiler: Intel(R) C++ Intel(R) 64 Compiler for IA-32, Version 126.96.36.199 Build 20160721 Visual Studio Tools: VS 2015 compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24213.1 for x86 Visual Studio Tools: VS 2015
hardware: Intel(R) Xeon(R) CPU E31240 @ 3.30GHz machine: win1064qp cpu flags: sse2 avx operating system: Windows 10 Enterprise compiler: Intel(R) C++ Intel(R) 64 Compiler for IA-32, Version 188.8.131.52 Build 20170811 Visual Studio Tools: VS 2017 compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x86 Visual Studio Tools: VS 2017
Note: This list is not exhaustive; other combinations of hardware, operating system and compiler may also work.
Embarcadero C++ requires that 32-bit import libraries be in OMF format, and they provide a tool with their compiler suite which can be used to generate such OMF format libraries. The tool is named implib.exe and it can be used like this, for example:
set NAGLIBDIR=C:\Program Files\NAG\clw32261el implib "%NAGLIBDIR%"\lib\CLW32261E_nag_bcc.lib clw32261e_nag_bcc.defwhere clw32261e_nag_bcc.def is an export definition file, CLW32261E_nag_bcc.lib is the output from implib.
The export definition file should contain the name of the DLL containing NAG library functions, along with a list of symbols to be exported from the DLL.
For example, the file clw32261e_nag_bcc.def can look like this:
LIBRARY CLW32261E_nag.dll EXPORTS a00aac a00aay ... etc. x07bbc x07cac x07cbcYou can create a suitable file clw32261e_nag_bcc.def containing a list of just the NAG library routines that you wish to use, or a file containing a list of all functions can be obtained here: clw32261e_nag_bcc.def.
Before issuing the implib command, make sure that you set the variable NAGLIBDIR to be the actual location where your copy of the NAG Library is installed. Also, it is assumed that you have permission to create the file "%NAGLIBDIR%"\lib\CLW32261E_nag_bcc.lib - depending on how the NAG Library was installed, you may need Administrator privileges.
This similar command makes a bcc32c-compatible import library for the MKL-based NAG DLL library:
implib "%NAGLIBDIR%"\lib\CLW32261E_mkl_bcc.lib clw32261e_mkl_bcc.def- create the file clw32261e_mkl_bcc.def by copying the file clw32261e_nag_bcc.def and changing the first line from
Once the library CLW32261E_nag_bcc.lib has been created, you can link to it using bcc32c like this:
bcc32c -I"%NAGLIBDIR%"\include driver.c "%NAGLIBDIR%"\lib\CLW32261E_nag_bcc.libwhere driver.c is your C program.
There is one more thing to note, if you want to compile any of the example programs that are distributed with the NAG C library (from directory "%NAGLIBDIR%"\examples\source), using bcc32c. Most of the example programs make use of a macro _countof(x) which is defined in a Microsoft C compiler header file, but is not in header files used by bcc32c. The macro is used to compute the number of elements in an array of any type. It's easy to define this macro yourself, for example:
#ifndef _countof #define _countof(x) sizeof(x) / sizeof(x) #endif- these lines can be inserted in the example program before you compile it, or you could add them to a local include file such as nag.h.
General information on using the DLLs supplied with this implementation is available from the Using the NAG C Library Windows DLLs page. This includes information on calling the DLLs from various command line programs including cl, icl and gcc as well as links to information on the environments listed below.
Detailed information on calling the DLLs and examples of usage are available for various programming environments including:
Visual Basic header files (Mark 26.0) containing declare statements for each function are also available for download:
The examples and header files listed above are for the Mark 26.0 version of the Library, but will work for this Library if the names of the DLLs and support directories are changed appropriately. Please contact NAG if you require assistance with this, or need headers for the routines which are new at Mark 26.1.