FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Error al abrir archivos .rc con Resedit en entorno MSVC 64
Posts: 607
Joined: Mon Mar 04, 2013 04:32 PM
Error al abrir archivos .rc con Resedit en entorno MSVC 64
Posted: Wed Sep 18, 2024 09:10 AM
Buenos dias:

Intentando migrar a 64 bits con MSVC64 2022 , tengo instalado el MSVC Community 2022, Harbour para MSVC 2022 64 bits y FWH64 .
Consigo compilar con Buildh64.bat los ejemplos de samples (Despues de ajustar los PATHS.), los cuales no tienen fichero .rc
pero cuando intento construir un ejemplo con .rc (por ejemplo adorick.prg )me sale el siguiente error.
error RC2104 : undefined keyword or key name: WS_CHILD

Tambien cuando intento abrirlo con el Resedit, me da el mismo error y no me deja abrirlo.

los includes del Resedit , utilizo estos. (aunque no creo que sea el problema ya que me da error al construir el ejecutable)
  • C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt
    C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.2\include\um
    C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include
    C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\atlmfc\include
    C:\Program Files\Microsoft Visual Studio\2022\Community\DIA SDK\include
Que me falta.?

Gracias por vuestra inestimable ayuda.

Jose.
Fwh 24.07 64 bits + Harbour 64 bits 3.2dev(r2407221137) + MSVC64
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error al compilar ejemplos con .rc con MSVC 64
Posted: Wed Sep 18, 2024 11:36 AM

Al principio del RC usa:

include <windows.h>

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 607
Joined: Mon Mar 04, 2013 04:32 PM
Re: Error al compilar ejemplos con .rc con MSVC 64
Posted: Wed Sep 18, 2024 12:41 PM
Hola Antonio.

Si me faltaba incluir el windows.h pero ahora me da este error



Algo mas me debe faltar

Saludos

Jose
Fwh 24.07 64 bits + Harbour 64 bits 3.2dev(r2407221137) + MSVC64
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Error al compilar ejemplos con .rc con MSVC 64
Posted: Wed Sep 18, 2024 02:01 PM

Can I see your RC file? Probably it can be simplified.

Posts: 607
Joined: Mon Mar 04, 2013 04:32 PM
Re: Error al compilar ejemplos con .rc con MSVC 64
Posted: Thu Sep 19, 2024 04:10 PM

Hi Enrico.

If I open any .rc from the fwh64\samples directory, for example adorick.rc,

I get this error. The same thing happens with my .rc files.

only opens correctly files whithout dialogs (with bmps, icons etc.)

thank for your interest Enrico.

Jose.

Fwh 24.07 64 bits + Harbour 64 bits 3.2dev(r2407221137) + MSVC64
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Error al compilar ejemplos con .rc con MSVC 64
Posted: Thu Sep 19, 2024 04:41 PM

Provide a minimal sample PRG + RC showing the problem, please.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Error al compilar ejemplos con .rc con MSVC 64
Posted: Thu Sep 19, 2024 04:43 PM
Something like this:
Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg;
           RESOURCE "TEST"

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
Code (fw): Select all Collapse
TEST DIALOG 0, 0, 300, 300
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
}
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error al compilar ejemplos con .rc con MSVC 64
Posted: Thu Sep 19, 2024 09:15 PM

José,

Quita el #include <windows.h> y añade:

define WS_CHILD 0x40000000L

ó prueba solo con

include <winuser.h>

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 607
Joined: Mon Mar 04, 2013 04:32 PM
Re: Error al abrir archivos .rc con Resedit en entorno MSVC 64
Posted: Sat Sep 21, 2024 01:37 PM

Estimados Enrico y Antonio.

con ResEdit en cuando quitas el #include <windows.h> te da el error "Identificador no definido" con el

include me da el error del png.

la otra opcion de Antonio tampoco me funciona, he probado todas las posibilidades.

Enrico me pasa con cualquier fichero .rc por simple que sea, incluso con el tuyo, ya que para abrirlos siempre necesita el #include <windows,h>, puedes probarlo.

solamente consigo abrir fichero .rc que no contienen DIALOGOS, entonces si los deja abrir sin el #include Windows.h

Me gustaria solucionarlo, entonces si alguien con el programa ResEdit consigue abrir archivos .rc en entorno MSVC64 seguramente si me pasa los includes que utiliza (creo que ahi

estara el problema), yo tambien podre hacerlo.

¿Alguno de ustedes puede abrir .rc con ResEdit con MSVC64?

Gracias por su inestimable ayuda.

Jose.

Fwh 24.07 64 bits + Harbour 64 bits 3.2dev(r2407221137) + MSVC64
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Error al abrir archivos .rc con Resedit en entorno MSVC 64
Posted: Sat Sep 21, 2024 02:12 PM

Did you search ResEdit options for something related to include files? It should absolutely not ask for windows.h when it tries to open my RC sample.

Posts: 607
Joined: Mon Mar 04, 2013 04:32 PM
Re: Error al abrir archivos .rc con Resedit en entorno MSVC 64
Posted: Sat Sep 21, 2024 05:07 PM

Dear Enrico

On my computer I was using ResEdit with Visual Studio 2019 Enterprise version, with fwh1906 32 bits. and I could open all the .rc files with the paths of the includes that I indicated in my first post

Now I have changed to Community 2022 and with the adapted paths I cannot open any .rc file with ResEdit

With Pelles C I can open them all the bad thing is that I like the way ResEdit works more.

If you use the 2022 Community version and can open the .rc files with REsedit, tell me which include paths I have to use.

since I simply go fwh64\samples and I cannot open any .rc file, not even yours.

Errors that it gives me, if I do not use the windows.h include I get an undeclared identifier.

and if I use it. The error in the photo that I posted above

It is frustrating but..

Jose

Fwh 24.07 64 bits + Harbour 64 bits 3.2dev(r2407221137) + MSVC64
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Error al abrir archivos .rc con Resedit en entorno MSVC 64
Posted: Sat Sep 21, 2024 05:29 PM

Did you run vcvarsall.bat?

Posts: 607
Joined: Mon Mar 04, 2013 04:32 PM
Re: Error al abrir archivos .rc con Resedit en entorno MSVC 64
Posted: Sun Sep 22, 2024 07:45 AM

Hi Enrico

Yes , but i don't think what matther

same errors

Regards

Jose

Fwh 24.07 64 bits + Harbour 64 bits 3.2dev(r2407221137) + MSVC64
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Error al abrir archivos .rc con Resedit en entorno MSVC 64
Posted: Sun Sep 22, 2024 08:11 AM

How can I reproduce the problem? I never get that error.

Posts: 607
Joined: Mon Mar 04, 2013 04:32 PM
Re: Error al abrir archivos .rc con Resedit en entorno MSVC 64
Posted: Sun Sep 22, 2024 06:53 PM
Enrico Maria Giordano wrote:How can I reproduce the problem? I never get that error.
Enrico in Resedit config what files includes do you use. ?

Jose

Enviado desde mi Lenovo TB-J606F mediante Tapatalk
Fwh 24.07 64 bits + Harbour 64 bits 3.2dev(r2407221137) + MSVC64