Compiling with an alternative WIN32API.inc???

Started by John Montenigro, November 26, 2009, 12:18:15 AM

Previous topic - Next topic

John Montenigro

I have a project that uses code contributed by various people on the PB forum. I had to massage a lot to get it all working together.

There was a conflict between the WIN32API.inc file I'd been using and some of the TYPE structures in the forum code. In order to get it to compile, I made a copy of WIN32API.inc and modified those particular structures. It compiled fine under PB.

I converted the project to FF2 and it worked fine. But now I can't get it to compile under FF3, which is giving me error 481: mismatch with prior definition.

Suspecting that FF3 is doing an #INCLUDE that I'm not seeing, I went to the FF_AppStart module and made the following change:

#If Not %DEF( %USE_JOSE_INCLUDES )
'#INCLUDE "WIN32API.INC"
#INCLUDE "win32api_WD_LUID.INC"     'modified specifically for this application...   


However, I still get the same error, and I'm suspecting that the standard win32api.inc is still being included prior to this point.

I realize that I COULD edit my standard win32api.inc to use either the standard or these special statements by editing #IF NOT %DEF  statements into my file, but I really don't like the idea of modifying the standard file that much for just this one situation.

How do I tell FF3 to use the edited alternative file, and NOT to use win32api.inc?


David Kenny

John,

I would look at the codegen files at this point.  Since they are the actual files sent through the PB compiler. Make sure you have Tools\Environment Options\Code Generation\Delete Generated Code After Compile turned off in FF3.  Open the CodeGen_ProjectName_Main.Bas file in JellyFish Pro and compile it there.  It's a lot easier to ensure you get to see the actual line generating the error. You can be left guessing otherwise.

David

Paul Squires

Maybe you have specified to use Jose Roca's alternative include files? If you did, then those files would probably conflict with your modified version that you are also including in the project.

David's suggestion is a good one. Open up the CODEGEN*_MAIN.BAS file and look at the first couple dozen lines. You should see the #INCLUDE's there.

Also check your code to see if you #INCLUDE'd files elsewhere in one of your Forms or Modules.

Paul Squires
PlanetSquires Software