Firefly v2.99-Duplicate name definition error compiling with oWord.inc (Wd2003)

Started by Ian Bayly, August 09, 2009, 02:33:20 AM

Previous topic - Next topic

Ian Bayly

I know that many inc files for MS products can be difficult (and beyond my ability to trouble shoot) so can anyone offer any ideas on the problem described below.
The following stripped code compiles OK in PB9 and Jellyfish, but gives the error shown below the code when compiled in FireFly.

Any help much appreciated.

Ian B
~~~~~~
#Include "C:\PBWin90\Samples\Com\Word\oWord.inc"

Function PBMain () As Long

End Function
~~~~~~
Error Number = 466
Error Description = Duplicate name definition
DECLARE FUNCTION Rectangle LIB "GDI32.DLL" ALIAS "Rectangle(BYVAL hdc as DWORD,BYVAL X1 as LONG ...) as long


David Kenny

I would guess it's because that very same Rectangle function is declared in the Win32API.inc.  You are not including Win32API.inc in your sample program, but FF includes it automatically. It needs it for the wide variety of things it does for you.

I would comment out the entry in oWord.inc.  You are likely to find more after that however.

David

Ian Bayly

Thank you David

Yes, there were too many conflicts persevere with, I will make a PB9 exe and can call this to handle the Word manipulations.

Ian B