This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Errors in DLL linking with a MS-style lib


Hello,

When I tried making a Visual FoxPro library (FLL) (it's an DLL linked with
winapims.lib which comes from the VFP package), I received an error.

the commands:

 i386-mingw32msvc-gcc -c hello.c -mthreads -D_DLL

In file included from hello.c:2:
pro_ext.h:127:1: warning: "FASTCALL" redefined
In file included from
/usr/local/cross-tools/i386-mingw32msvc/include/windows.h:48,
                 from pro_ext.h:118,
                 from hello.c:2:
/usr/local/cross-tools/i386-mingw32msvc/include/windef.h:106:1: warning:
this is the location of the previous definition


i386-mingw32msvc-gcc -o hello.dll hello.o -mthreads  winapims.lib -mdll

Warning: .drectve `%.*s' unrecognized
Warning: .drectve `%.*s' unrecognized
Warning: .drectve `%.*s' unrecognized
Warning: .drectve `%.*s' unrecognized

OR

i386-mingw32msvc-gcc -o hello.dll hello.o -mthreads -shared winapims.lib

Warning: .drectve `%.*s' unrecognized
Warning: .drectve `%.*s' unrecognized
Warning: .drectve `%.*s' unrecognized
Warning: .drectve `%.*s' unrecognized


The same errors are in the usual gcc version.

How can I compile the DLL?

Thanks Anticipated,
Iulian Teodosiu


P.S.

source of hello.c:
// include the library construction header file
#include "pro_ext.h"

void hello(ParamBlk  *parm) // the function definition
        {
        _PutStr("\nHello, World!\n"); file://print the message
        }

// the FoxInfo structure registers the function
FoxInfo myFoxInfo[] = {
        {"HELLO",(FPFI) hello, 0, ""},
};

// the FoxTable structure
FoxTable _FoxTable = {
        (FoxTable  *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]