problems with windres

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

problems with windres

Roger Day-5

Hi,

I'm using gcc 3.4.2 and I'm having problems trying to compile and link windows resources. The command

echo ...COMPILING c:\users\rday\hoperoot\SW_K\pc\LocalisationKit\pc-all\rc\ENG.rc...
set INCLUDE=c:\users\rday\tools\mingw_gcc\include
 
c:\users\rday\tools\mingw_gcc\bin\windres.exe -DQUOTED_SOURCE_DATE="\"not available\"" -DRELEASE_BUILD -DWIN32 -D_X86_=1 -DPITSTOP_VERSION=0x31289    -I.\lkit  -Ic:\users\rday\hoperoot\SW_K\pc\LocalisationKit\pc-all\rc  -I.\coregui\export -I.\coreskin\pc\msgui -I.\coreskin\export -I.\coreskin\pc\export -I.\custiface\export -I.\custiface\pc\export  -Ic:\users\rday\hoperoot\SW_K\pc\LocalisationKit\pc-all\rc -Ic:\users\rday\tools\pitstop_3_12_89\pc\export  -o.\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\pc-all\rc\ENG.res  c:\users\rday\hoperoot\SW_K\pc\LocalisationKit\pc-all\rc\ENG.rc

works, however the result ENG.res doesn't link:

..making C-Link-Ld1 .\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\ENG.dll
--actions--

echo ...MAKING .\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\ENG.dll...

c:\users\rday\tools\mingw_gcc\bin\gcc.exe -shared   -o .\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\ENG.dll  .\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\pc-all\rc\ENG.res  -lm
   
-----------
...MAKING .\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\ENG.dll...
.\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\pc-all\rc\ENG.res: file not recognized: File format not recognized
collect2: ld returned 1 exit status

I can view the ENG.res file in Visual Studio 6, so that seems OK. Neither can I see any issues with the linker options. Any suggestions most welcome.

Roger
Reply | Threaded
Open this post in threaded view
|

Re: problems with windres

Brian Dessent
Roger Day wrote:

> I can view the ENG.res file in Visual Studio 6, so that seems OK.
> Neither can I see any issues with the linker options. Any suggestions
> most welcome.

Try naming the resulting output object file .o and not .res.

Brian


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: problems with windres

Roger Day-5
In reply to this post by Roger Day-5
I get the same error message. Doesn't the .o go against guessing the
format that windres does? Besides, the linker is issuing a *format*
problem error. It's not something that I think should really occur? I
can't see any switches to the linker to rectify this problem. What format
should the linker be recieving?


At 17/06/2005 11:41:00, [hidden email] wrote:

>Roger Day wrote:
>
>> I can view the ENG.res file in Visual Studio 6, so that seems OK.
>> Neither can I see any issues with the linker options. Any suggestions
>> most welcome.
>
>Try naming the resulting output object file .o and not .res.
>
>Brian
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>from IBM. Find simple to follow Roadmaps, straightforward articles,
>informative Webcasts and more! Get everything you need to get up to
>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
>_______________________________________________
>MinGW-users mailing list
>[hidden email]
>
>You may change your MinGW Account Options or unsubscribe at:
>https://lists.sourceforge.net/lists/listinfo/mingw-users
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: problems with windres

Brian Dessent
Roger Day wrote:

> I get the same error message. Doesn't the .o go against guessing the
> format that windres does? Besides, the linker is issuing a *format*
> problem error. It's not something that I think should really occur? I
> can't see any switches to the linker to rectify this problem. What format
> should the linker be recieving?

Yes I believe it will cause windres to make the output a different
format, but if you want to link the resources into the binary with the
gcc linker you need them in object format and not whatever format .res
files are.

Brian


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: problems with windres

Roger Day-5
In reply to this post by Roger Day-5
Ah *compile* and *link* with the ENG.o</shoe-dropping>

That checks out. Leaves me with a headache with the jam files..but thanks.

Cheers,

Roger.
At 17/06/2005 12:57:21, [hidden email] wrote:
>Roger Day wrote:
>
>> I get the same error message. Doesn't the .o go against guessing the
>> format that windres does? Besides, the linker is issuing a *format*
>> problem error. It's not something that I think should really occur? I
>> can't see any switches to the linker to rectify this problem. What
format

>> should the linker be recieving?
>
>Yes I believe it will cause windres to make the output a different
>format, but if you want to link the resources into the binary with the
>gcc linker you need them in object format and not whatever format .res
>files are.
>
>Brian
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>from IBM. Find simple to follow Roadmaps, straightforward articles,
>informative Webcasts and more! Get everything you need to get up to
>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
>_______________________________________________
>MinGW-users mailing list
>[hidden email]
>
>You may change your MinGW Account Options or unsubscribe at:
>https://lists.sourceforge.net/lists/listinfo/mingw-users
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: problems with windres

Roger Day-5
In reply to this post by Roger Day-5
c:\users\rday\tools\mingw_gcc\bin\windres.exe:
.\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\pc-all\rc\INV.o: Invalid bfd
target
--actions--

echo ...COMPILING
c:\users\rday\hoperoot\SW_K\pc\LocalisationKit\pc-all\rc\INV.rc...
set INCLUDE=c:\users\rday\tools\mingw_gcc\include
 
c:\users\rday\tools\mingw_gcc\bin\windres.exe <snip>
-F.\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\pc-all\rc\INV.o
-o.\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\pc-all\rc\INV.o
c:\users\rday\hoperoot\SW_K\pc\LocalisationKit\pc-all\rc\INV.rc

Should I have -F and -o as separate options?

TIA
Roger

At 17/06/2005 13:05:20, [hidden email] wrote:
>Ah *compile* and *link* with the ENG.o</shoe-dropping>
>
>That checks out. Leaves me with a headache with the jam files..but
thanks.

>
>Cheers,
>
>Roger.
>At 17/06/2005 12:57:21, [hidden email] wrote:
>>Roger Day wrote:
>>
>>> I get the same error message. Doesn't the .o go against guessing the
>>> format that windres does? Besides, the linker is issuing a *format*
>>> problem error. It's not something that I think should really occur? I
>>> can't see any switches to the linker to rectify this problem. What
>format
>>> should the linker be recieving?
>>
>>Yes I believe it will cause windres to make the output a different
>>format, but if you want to link the resources into the binary with the
>>gcc linker you need them in object format and not whatever format .res
>>files are.
>>
>>Brian
>>
>>
>>-------------------------------------------------------
>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>>from IBM. Find simple to follow Roadmaps, straightforward articles,
>>informative Webcasts and more! Get everything you need to get up to
>>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
>>_______________________________________________
>>MinGW-users mailing list
>>[hidden email]
>>
>>You may change your MinGW Account Options or unsubscribe at:
>>https://lists.sourceforge.net/lists/listinfo/mingw-users
>>
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>from IBM. Find simple to follow Roadmaps, straightforward articles,
>informative Webcasts and more! Get everything you need to get up to
>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
>_______________________________________________
>MinGW-users mailing list
>[hidden email]
>
>You may change your MinGW Account Options or unsubscribe at:
>https://lists.sourceforge.net/lists/listinfo/mingw-users
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: problems with windres

Greg Chicares
On 2005-06-21 11:53 AM, Roger Day wrote:

> c:\users\rday\tools\mingw_gcc\bin\windres.exe:
> .\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\pc-all\rc\INV.o: Invalid bfd
> target
> --actions--
>
> echo ...COMPILING
> c:\users\rday\hoperoot\SW_K\pc\LocalisationKit\pc-all\rc\INV.rc...
> set INCLUDE=c:\users\rday\tools\mingw_gcc\include
>  
> c:\users\rday\tools\mingw_gcc\bin\windres.exe <snip>
> -F.\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\pc-all\rc\INV.o
> -o.\lkit\obj\win_32-pentium\rel-gcc3\gcc_3_4_2\pc-all\rc\INV.o
> c:\users\rday\hoperoot\SW_K\pc\LocalisationKit\pc-all\rc\INV.rc
>
> Should I have -F and -o as separate options?

Do you really need '-F'? What are you trying to accomplish with it?
Wouldn't '-F' take a 'target' argument instead of a file path?

To compile resource file xyz.rc into an object file that you can
link with an application:

  windres
    -o xyz.rc.o
    --use-temp-file
    -i xyz.rc


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users