Compiling erl_interface by Borland C++ Builder 6

Serge Aleynikov serge@REDACTED
Wed May 28 18:17:32 CEST 2003


While trying to build a couple of projects that utilize ei / 
erl_interface in Borland C++ Builder I had to rebuild the 
erl_interface.lib and ei.lib and encountered the following incompatibility:

1. --------- erl_locking.h -----------------
#ifndef _ERL_LOCKING_H
#define _ERL_LOCKING_H

/* The C++ conditional test below needs to be moved here from a few
    lines below in order to compile successfully */

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __WIN32__
#include <windows.h>
#include <winbase.h>

2. --------- *.h -----------------

The __STDC__ test in all header files

#ifdef __STDC__

needs to be rewritten as:

#if defined(__STDC__) || defined(__BORLANDC__)

-----------------------------------

After these changes the library compiled successfully.

Serge




More information about the erlang-questions mailing list