No puedo compilar el código fuente wxDev-c++
Hola para todos.
Agradecería un poco de ayuda. Descargué el código fuente de wxdevcpp para compilarlo con Borland Delphi 6 edisión personal, seguí todos los pasos como dice la página para hacerlo, pero me dá el siguiente error: [Fatal Error] main.pas(96): File not found: 'VistaAltFixUnit2.dcu' he buscado el archivo faltante pero no está en el código fuente ni en la página del sitio web wxdev-c++.
Alguien puede darme una pista para poder compilarlo y obtener el ejecutable.
Desde ya muchas gracias por las respuestas.
Jarod.
----------------------------------------------------------------------------------------------------
Traducción/Translation:
I can not compile the source code wxDev-c++
Hello to all.
I would appreciate some help. I downloaded wxdevcpp source code to compile with Borland Delphi 6 Personal Edision, I followed all the steps as stated in the page to do, but it gives me the following error: [Fatal Error] main.pas (96): File not found: 'VistaAltFixUnit2 . dcu 'I searched the missing file but not in the source code or the web site page wxDev-C++.
Someone can give me a hint to compile and get the executable.
From already thank you very much for the answers.
Jarod.
I can not compile the source code wxDev-c++
-
- In need of some credit
- Posts: 4
- Joined: Fri May 10, 2013 5:22 pm
Re: I can not compile the source code wxDev-c++
I guess that file never made it into the SVN.
The file contents for VistaAltFixUnit2.pas are:
Just copy this code into a file called "VistaAltFixUnit2.pas" and save the file to the wxdevcpp source directory. Hopefully Delphi will compile it to the .dcu unit when you do a rebuild all. If not, you may need to include it in the Delphi project specifically.
Thanks to Marc's Blog (http://marc.durdin.net/2012/01/revisiti ... -code.html) for this code.
-Tony
The file contents for VistaAltFixUnit2.pas are:
Code: Select all
unit VistaAltFixUnit2;
interface
uses
Windows, Classes;
type
TVistaAltFix2 = class(TComponent)
private
FInstalled: Boolean;
function VistaWithTheme: Boolean;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
procedure Register;
implementation
uses
Messages, Themes;
procedure Register;
begin
RegisterComponents('MEP', [TVistaAltFix2]);
end;
var
FInstallCount: Integer = 0;
FCallWndProcHook: Cardinal = 0;
{ TVistaAltFix2 }
function CallWndProcFunc(
nCode: Integer;
wParam: WPARAM;
lParam: LPARAM): LRESULT; stdcall;
var
p: PCWPSTRUCT;
begin
if nCode = HC_ACTION then
begin
p := PCWPSTRUCT(lParam);
if p.message = WM_UPDATEUISTATE then
begin
InvalidateRect(p.hwnd, nil, False);
end;
end;
Result := CallNextHookEx(FCallWndProcHook, nCode, wParam, lParam);
end;
constructor TVistaAltFix2.Create(AOwner: TComponent);
begin
inherited;
if VistaWithTheme and not (csDesigning in ComponentState) then
begin
Inc(FInstallCount); // Allow more than 1 instance, assume single threaded as VCL is not thread safe anyway
if FInstallCount = 1 then
FCallWndProcHook := SetWindowsHookEx(WH_CALLWNDPROC, CallWndProcFunc, 0, GetCurrentThreadID);
FInstalled := True;
end;
end;
destructor TVistaAltFix2.Destroy;
begin
if FInstalled then
begin
Dec(FInstallCount);
if FInstallCount = 0 then
begin
UnhookWindowsHookEx(FCallWndProcHook);
FCallWndProcHook := 0;
end;
end;
inherited Destroy;
end;
function TVistaAltFix2.VistaWithTheme: Boolean;
var
OSVersionInfo: TOSVersionInfo;
begin
OSVersionInfo.dwOSVersionInfoSize := SizeOf(OSVersionInfo);
if GetVersionEx(OSVersionInfo) and
(OSVersionInfo.dwMajorVersion >= 6) and
ThemeServices.ThemesEnabled then
Result := True
else
Result := False;
end;
end.
Thanks to Marc's Blog (http://marc.durdin.net/2012/01/revisiti ... -code.html) for this code.
-Tony
Everybody's got something to hide except for me and my monkey.
-
- In need of some credit
- Posts: 4
- Joined: Fri May 10, 2013 5:22 pm
Re: I can not compile the source code wxDev-c++
Muchas gracias probaré con este código a ver si compila bien en está ocasión.
Thank you very much try with this code to see if it compiles fine on this occasion.
Jarod.
Thank you very much try with this code to see if it compiles fine on this occasion.
Jarod.
-
- In need of some credit
- Posts: 4
- Joined: Fri May 10, 2013 5:22 pm
Re: I can not compile the source code wxDev-c++
Cree el archivo "VistaAltFixUnit2.pas" con el código en el directorio del proyecto, pero ahora al tratar de compilarlo me pide el archivo "Themes.dcu" que tampoco existe en el proyecto ni en la página web.
[Fatal Error] VistaAltFixUnit2.pas(23): File not found: 'Themes.dcu'
También busque en todo mi computador este archivo pero sin resultados.
Los archivos *.dcu son como los archivos *.pas pero compilados si no me equivoco, entonces debe haber un archivo llamado themes.pas pero tampoco existe, creo que no podré compilar este proyecto porque está incompleto.
Create the file "VistaAltFixUnit2.pas" with the code in the project directory, but now when trying to compile the file asks me "Themes.dcu" which does not exist in the project or on the website.
[Fatal Error] VistaAltFixUnit2.pas (23): File not found: 'Themes.dcu'
Also look at my computer this file but to no avail.
The *. Dcu are as *. Pas but compiled if I'm right, then there must be a file called themes.pas but again, no, I think that I can not compile this project because it is incomplete.
Jarod.
[Fatal Error] VistaAltFixUnit2.pas(23): File not found: 'Themes.dcu'
También busque en todo mi computador este archivo pero sin resultados.
Los archivos *.dcu son como los archivos *.pas pero compilados si no me equivoco, entonces debe haber un archivo llamado themes.pas pero tampoco existe, creo que no podré compilar este proyecto porque está incompleto.
Create the file "VistaAltFixUnit2.pas" with the code in the project directory, but now when trying to compile the file asks me "Themes.dcu" which does not exist in the project or on the website.
[Fatal Error] VistaAltFixUnit2.pas (23): File not found: 'Themes.dcu'
Also look at my computer this file but to no avail.
The *. Dcu are as *. Pas but compiled if I'm right, then there must be a file called themes.pas but again, no, I think that I can not compile this project because it is incomplete.
Jarod.
Re: I can not compile the source code wxDev-c++
I believe that themes.dcu is from the ThemeManager6.dpk described in step 8 (http://wxdsgn.sourceforge.net/?q=node/22).
Did you compile and install that .dpk?
-Tony
Did you compile and install that .dpk?
-Tony
Everybody's got something to hide except for me and my monkey.
-
- In need of some credit
- Posts: 4
- Joined: Fri May 10, 2013 5:22 pm
Re: I can not compile the source code wxDev-c++
Of course, I did the compilation and installation of ThemeManager6.dpk. I have followed all steps into the order shown on the page, but I can not compile the project for missing Themer.dcu file.
Now what I did was uninstall Delphi 6 EP and decided to install version 7.2 Professional, but I get the following error: [Fatal Error] wxdevcpp.dpr (122): Unit Themes was compiled with a different version of UxTheme.BP_PUSHBUTTON.
Theme Manager is built in to Delphi 7, so do not try to install this. Search the directory of Delphi 7 Themes.dcu file and if it appears. Will copy all the directory where the file appears Themes.dcu and try to compile it with Delphi version 6.
Jarod.
Now what I did was uninstall Delphi 6 EP and decided to install version 7.2 Professional, but I get the following error: [Fatal Error] wxdevcpp.dpr (122): Unit Themes was compiled with a different version of UxTheme.BP_PUSHBUTTON.
Theme Manager is built in to Delphi 7, so do not try to install this. Search the directory of Delphi 7 Themes.dcu file and if it appears. Will copy all the directory where the file appears Themes.dcu and try to compile it with Delphi version 6.
Jarod.
Re: I can not compile the source code wxDev-c++
You shouldn't need to copy the files over to a new directory. Instead, there's a way to set the compiler directories for the Delphi project. I think it is Project->Options. Then click on the "Directories/Conditionals" tab and add the correct path names.
I've only used Delphi 6 PE and don't know what difficulties exist with using Delphi 7.2. This is one of the main reasons people moved away from developing the IDE since Delphi no longer offered a free edition we keep developing for a compiler built for Windows NT.
-Tony
I've only used Delphi 6 PE and don't know what difficulties exist with using Delphi 7.2. This is one of the main reasons people moved away from developing the IDE since Delphi no longer offered a free edition we keep developing for a compiler built for Windows NT.
-Tony
Everybody's got something to hide except for me and my monkey.