RE: [sv-cc] using _MSC_VER in svdpi.h

From: Jim Vellenga <vellenga@cadence.com>
Date: Wed Oct 26 2011 - 06:55:47 PDT

Daniel, I haven't used MinGW myself, but from what you say, I infer that MinGW executables will not link at run-time correctly if we don't supply the __declspec(dllimport) and __declspec(dllexport) constructs. Is that correct?

Jim

From: owner-sv-cc@eda.org [mailto:owner-sv-cc@eda.org] On Behalf Of Daniel Mlynek
Sent: Wednesday, 26 Oct 2011 4:05 AM
To: sv-cc@eda.org; Oleg Demchenko; Radoslaw Nawrot
Subject: [sv-cc] using _MSC_VER in svdpi.h

In svdpi.h there is :
/* Use to export a symbol from application */
#if defined (_MSC_VER)
#define DPI_DLLISPEC __declspec(dllimport)
#else
#define DPI_DLLISPEC
#endif
/* Use to import a symbol into application */
#if defined (_MSC_VER)
#define DPI_DLLESPEC __declspec(dllexport)
#else
#define DPI_DLLESPEC
#endif
This will cause that when compiling with MinGW on windows (which does not define _MSC_VER) functions using DPI_DLLISPEC will not be exported corectly.

For similar purpose in file vpi_user.h WIN32 macro is used instead _MSC_VER.
What is the reason of using _MSC_VER instead WIN32? Maybe WIN32 macro can/should be used also in svdpi.h?

DANiel

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Oct 26 06:56:36 2011

This archive was generated by hypermail 2.1.8 : Wed Oct 26 2011 - 06:56:48 PDT