Porting msvc resource code

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Porting msvc resource code

Paul Sokolovsky
Hello,

Some common error pattern I see while porting msvc code is:

arm-mingw32ce-windres -i tman.rc -o tman-rc.o
arm-mingw32ce-windres: tman.rc:20: syntax error

tman.rc:20:LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

LANG_ENGLISH, SUBLANG_ENGLISH_US is defined in winnt.h, tman.rc
includes newres.h which includes commctrl.h, aygshell.h,
winuser.h. The obvious hypothesis is that in msvc, these headers pull
in winnt.h, but that's not the case with cegcc. Anybody knows true
story and the best way to fix it?


--
Best regards,
 Paul                          mailto:[hidden email]

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Cegcc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Porting msvc resource code

Paul Sokolovsky
Hello,

On Sat, 1 Jan 2011 15:09:06 +0200
Paul Sokolovsky <[hidden email]> wrote:

> Hello,
>
> Some common error pattern I see while porting msvc code is:
>
> arm-mingw32ce-windres -i tman.rc -o tman-rc.o
> arm-mingw32ce-windres: tman.rc:20: syntax error
>
> tman.rc:20:LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
>
> LANG_ENGLISH, SUBLANG_ENGLISH_US is defined in winnt.h, tman.rc
> includes newres.h which includes commctrl.h, aygshell.h,
> winuser.h. The obvious hypothesis is that in msvc, these headers pull
> in winnt.h, but that's not the case with cegcc. Anybody knows true
> story and the best way to fix it?

Ok, I see, need to run windres with -D_WIN32_WCE.


--
Best regards,
 Paul                          mailto:[hidden email]

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Cegcc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Porting msvc resource code

Danny Backx
On Sat, 2011-01-01 at 15:21 +0200, Paul Sokolovsky wrote:
> Ok, I see, need to run windres with -D_WIN32_WCE.

Sometimes not just that but with a specific value.

        Danny
--
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Cegcc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel
Reply | Threaded
Open this post in threaded view
|

Hex vs dec os/component version defines, was: Porting msvc resource code

Paul Sokolovsky
Hello,

On Sat, 01 Jan 2011 14:29:21 +0100
Danny Backx <[hidden email]> wrote:

> On Sat, 2011-01-01 at 15:21 +0200, Paul Sokolovsky wrote:
> > Ok, I see, need to run windres with -D_WIN32_WCE.
>
> Sometimes not just that but with a specific value.

Yeah, and here comes the new question. As far as I can tell, msvc-based
software has those values in decimal, not in hex, like cegcc has. As a
reference, I can give
http://code.google.com/p/tman/source/browse/trunk/tman/Makefile?r=28 ,
which is gnumake file which still uses msvc compiler.

# 300 for eVC 3.0
CEVersion=420
CePlatform=WIN32_PLATFORM_PSPC=400

CPP_FLAGS=/nologo /W3 /D "ARM" /D "_ARM_" /D "ARMV4" /D
UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)"

Googling confirms that (even though for native msvc projects,
CEVersion and friends are apparently nmake-defined vars), including
this:

http://msdn.microsoft.com/en-us/library/ms838200.aspx


So, what should we do?

>
> Danny
> --
> Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
>



--
Best regards,
 Paul                          mailto:[hidden email]

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Cegcc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel