* gcc linking MS lib
@ 2003-08-27 18:06 Primaria Falticeni SDU
0 siblings, 0 replies; only message in thread
From: Primaria Falticeni SDU @ 2003-08-27 18:06 UTC (permalink / raw)
To: gcc-help
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.
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
};
In the pro_ext.h I have the following error:
#pragma pack(push, pro_ext2) is malformed pragma pack(push[,id],<n>)
for instant I replaced it with
#pragma pack(push,pro_ext,2)
Is it good?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-08-27 18:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-27 18:06 gcc linking MS lib Primaria Falticeni SDU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).