help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mangling Stdcall and GCC


From: ringos75
Subject: Mangling Stdcall and GCC
Date: 24 Oct 2005 01:57:00 -0700
User-agent: G2/0.2

Hy everyone,
i'm newbie to gcc. I try to create a dll with this compiler, but the
name of the function, that i want export, was decorated. I don't have
to have the mangling of name. This my code:

///////////////////////////////////////////
// Cpp File:

int __stdcall  ExtFunz(int a)
{
        return a+1;
}

void __stdcall  ExtFunz1(int *a)
{
        *a=*a+1;
}
///////////////////////////////////////////
// Def File

LIBRARY      "DllTest"

EXPORTS
        ExtFunz                 @1
        ExtFunz                 @2
///////////////////////////////////////////
Following lines are used to generate the dll:

$mingw32-g++ -c DllTest.cpp

$mingw32-g++ -shared -o DllTest.dll DllTest.o DllTest.def

I get these linking errors:

Cannot export ExtFunz: symbol not defined
Cannot export ExtFunz1: symbol not defined

I think the attribute '__stdcall' and the '.def' file using remove the
mangling of function, but it isn't. :( . How can i remove the whole
(_Zt...i@4 and _Z8...Pi@4) function mangling?? If it's possible I'd
like to don't use the alias name.  

Thanks in advance.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]