[prev in list] [next in list] [prev in thread] [next in thread]
List: mingw-users
Subject: Re: [Mingw-users] using mingw DLLs with Borland c builder
From: Greg Chicares <chicares () mindspring ! com>
Date: 2004-03-30 1:59:51
Message-ID: 4068D497.44F97C3F () mindspring ! com
[Download RAW message or body]
brahmaiah vallabhaneni wrote:
>
> I have a dll, created in mingw environment. I am
> trying to link this from Borland c builder.
> But when I call a function, which has the following
> implementation, the program crashes.
>
> extern "C" int MyFun1 (string &s1)
> {
> cout <<"String s1 is " <<s1<<endl;
> return 0;
> }
>
> I am confused why a program that takes an ANSI
> string as parameter should crash.
The language linkage 'extern "C"' may defeat name mangling,
but the argument is of a C++ class type whose layout probably
differs between these compilers. Try passing a char* instead.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic