[R] Building and loading a DLL on Windows NT

Benjamin.STABLER@odot.state.or.us Benjamin.STABLER at odot.state.or.us
Thu Sep 18 19:32:05 CEST 2003


It was the case sensitive issue.  I changed the file from .C to .c and I got
the gcc compiler instead of the g++ compiler, which resulted in the function
name staying the same.  Thanks for your help.  Also, I can't seem to find
the Borland tdump utility (everything I can find on the Internet says it
comes with Borland C++ Builder). 

All the best,
Ben Stabler

>-----Original Message-----
>From: Whit Armstrong [mailto:Whit.Armstrong at tudor.com]
>Sent: Thursday, September 18, 2003 6:01 AM
>To: 'Roger.Bivand at nhh.no'; STABLER Benjamin
>Subject: RE: [R] Building and loading a DLL on Windows NT
>
>
>One way I've used to get rid of the name mangling is to surround the
>function prototypes (or the functions themselves, if you don't 
>use a header
>file) in an export brace:
>
>export "C" {
>	int myFunc(int, int)
>	...
>}
>
>I'm surprised that SHLIB generates name mangled code.  I 
>thought one of the
>advantages of using it was that it produced a clean interface, 
>especially
>since you're using a .c file not a .cpp file.  I know that gcc uses
>different compilers based on the extension of the file.  I 
>wonder if it's
>case sensitive.  That is, if you changed the extension to .c 
>rather than .C
>would g++ use the c compiler rather than a cpp compiler.
>
>Good luck,
>Whit




More information about the R-help mailing list