Recent

Author Topic: Problems with shellapi not finding ActiveX  (Read 6671 times)

wpflum

  • Sr. Member
  • ****
  • Posts: 287
Problems with shellapi not finding ActiveX
« on: August 01, 2011, 03:49:26 pm »
I'm trying to convert an old Turbo Pascal program to run under Lazarus in Windows XP and so far I'm inching along at a so-so rate. I just hit a snag that is confusing me as to where the issue is.  When I compile I get the error shown below:

C:\lazarus\fpc\2.4.2\source\packages\winunits-base\src\shellapi.pp(42,15) Fatal: Can't find unit ActiveX used by ShellApi

??????

This does not appear to be a problem with the Turbo Pascal code but something in Lazarus itself???  I see the package activex.pp in the same directory as shellapi so I don't see the reason for the error. 

What am I missing??

Bill

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Problems with shellapi not finding ActiveX
« Reply #1 on: August 01, 2011, 05:28:20 pm »
The strangest part is that it tryes to recompile shellapi.pp, but that's a fpc unit, so it should not be recompiled ... You can compile your project with the option -va to see where the problem is.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12645
  • FPC developer.
Re: Problems with shellapi not finding ActiveX
« Reply #2 on: August 01, 2011, 05:54:27 pm »
First and for all, the FPC sources should be in a browse path, not in a path searched by the compiler.

wpflum

  • Sr. Member
  • ****
  • Posts: 287
Re: Problems with shellapi not finding ActiveX
« Reply #3 on: August 01, 2011, 05:57:51 pm »
It also seems to be recompiling ActiveX, here is a couple of  lines above the error, the error and the final lines:

PPU Loading C:\lazarus\fpc\2.4.2\units\i386-win32\winunits-base\activex.ppu
Recompiling ActiveX, checksum changed for Types
Fatal: Can't find unit ActiveX used by ShellApi
Fatal: Compilation aborted
Error: C:\lazarus\fpc\2.4.2\bin\i386-win32\ppc386.exe returned an error exitcode
 (normal if you did not specify a source file to be compiled)

I decided to try this from the command line using only fpc to see if I got the same message or if Lazarus was inserting something that was messing up the compile but I got the same error.

I did manage to bypass the error for the moment by removing shellapi from the uses clause of only file that seems to use it.  I guess it will fail later on but right now I'm just going error by error.

wpflum

  • Sr. Member
  • ****
  • Posts: 287
Re: Problems with shellapi not finding ActiveX
« Reply #4 on: August 01, 2011, 06:00:06 pm »
First and for all, the FPC sources should be in a browse path, not in a path searched by the compiler.

This is a normal install from binary to a Windows XP system.  I didn't compile so I didn't do this if this is the problem.  Is there some kind of bug in Lazarus that would cause this??

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Problems with shellapi not finding ActiveX
« Reply #5 on: August 01, 2011, 06:09:22 pm »
Do you have any unit in your project which conflicts with the standard units from fpc? For example a types.pas?

wpflum

  • Sr. Member
  • ****
  • Posts: 287
Re: Problems with shellapi not finding ActiveX
« Reply #6 on: August 01, 2011, 06:29:09 pm »
Do you have any unit in your project which conflicts with the standard units from fpc? For example a types.pas?

As a matter of fact there is a types.pas in the directory.  So I'm guessing that if I rename the file and change the name in the units that use it I might be able to fix this???

I'll have to give it a try.

wpflum

  • Sr. Member
  • ****
  • Posts: 287
Re: Problems with shellapi not finding ActiveX
« Reply #7 on: August 01, 2011, 06:49:32 pm »
That seems to have solved that issue  :)

Never occurred to me that the original code might be overriding normal FPC units  :-[

One down, several billion to go.......

Thanks again.

 

TinyPortal © 2005-2018