| 361 |
dpurdie |
1 |
#-------------------------------------------------------------------------------
|
|
|
2 |
# Documentation
|
|
|
3 |
#
|
|
|
4 |
|
|
|
5 |
=pod
|
|
|
6 |
|
|
|
7 |
=for htmltoc FAQ::Windows::Compile Resources
|
|
|
8 |
|
|
|
9 |
=head1 NAME
|
|
|
10 |
|
|
|
11 |
How to compile in Windows Resources
|
|
|
12 |
|
|
|
13 |
=head1 SYNOPSIS
|
|
|
14 |
|
|
|
15 |
The following fragment will add a resource file to a Program or a DLL. It is
|
|
|
16 |
also possible to create a static library from resources.
|
|
|
17 |
|
|
|
18 |
Src ( '*', "CSCEdit.rc" );
|
|
|
19 |
Src ( '*', "res/Toolbar.bmp" );
|
|
|
20 |
Src ( '*', "res/CSCEdit.ico" );
|
|
|
21 |
Src ( '*', "res/CSCEdit.rc2" );
|
|
|
22 |
Src ( '*', "res/CSCEditDoc.ico" );
|
|
|
23 |
|
|
|
24 |
Prog ( '*', 'MyProg', @OBJS , "--Resource=CSCEdit.rc,CSCEdit.ico,CSCEditDoc.ico,Toolbar.bmp,CSCEdit.rc2" );
|
|
|
25 |
|
|
|
26 |
SharedLib ( '*', 'MyDLL', @OBJS , "--Resource=CSCEdit.rc,CSCEdit.ico,CSCEditDoc.ico,Toolbar.bmp,CSCEdit.rc2" );
|
|
|
27 |
|
|
|
28 |
A Resource Only DLL can be created with:
|
|
|
29 |
|
|
|
30 |
SharedLib ( '*',
|
|
|
31 |
'MyResDLL',
|
|
|
32 |
@OBJS ,
|
|
|
33 |
"--Resource=CSCEdit.rc,CSCEdit.ico,CSCEditDoc.ico,Toolbar.bmp,CSCEdit.rc2", "--ResourceOnly" );
|