diff options
author | Jan Jezabek <jezabek@poczta.onet.pl> | 2008-09-16 16:04:16 +0000 |
---|---|---|
committer | Jan Jezabek <jezabek@poczta.onet.pl> | 2008-09-16 16:04:16 +0000 |
commit | 5d4de6e1a15d559227688934a9a67b1d6dc96674 (patch) | |
tree | daf11374f0ecd081958e4337a0cb8356425974d0 | |
parent | 86ae1fad9cb26e21283f9c71eb712c7c5f41d5c2 (diff) | |
download | swig-5d4de6e1a15d559227688934a9a67b1d6dc96674.tar.gz |
Fixed documentation for 'masterguid' (turns out I had fixed the incosistency earlier but forgot to change the doc). Dropped '_rc' from the generated resource file and updated the build system and docs.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-jezabek@10857 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r-- | Doc/Manual/COM.html | 24 | ||||
-rw-r--r-- | Examples/Makefile.in | 6 | ||||
-rw-r--r-- | Source/Modules/com.cxx | 2 | ||||
-rw-r--r-- | configure.in | 2 |
4 files changed, 20 insertions, 14 deletions
diff --git a/Doc/Manual/COM.html b/Doc/Manual/COM.html index 08553818d..37a561ee3 100644 --- a/Doc/Manual/COM.html +++ b/Doc/Manual/COM.html @@ -140,7 +140,7 @@ $ swig -c++ -com example.i <p> This will generate four files: <tt>example_wrap.c</tt> (or <tt>example_wrap.cxx</tt>), -<tt>example.idl</tt>, <tt>example.def</tt> and <tt>example_rc.rc</tt>. The first file +<tt>example.idl</tt>, <tt>example.def</tt> and <tt>example.rc</tt>. The first file contains code responsible for object layout, reference counting, etc. The <tt>example.idl</tt> file contains a description of the interface exposed to the client applications. The remaining two files are used during compilation. All these files need to be linked with the rest of @@ -197,8 +197,8 @@ This process is compiler specific. Examples are provided below for Visual C++: <div class="code"><pre> $ # MS Visual Studio 2008 $ midl example.idl -$ rc example_rc.rc -$ cl /LD /Feexample.dll example_wrap.c example.def example_rc.res ole32.lib uuid.lib advapi32.lib oleaut32.lib +$ rc example.rc +$ cl /LD /Feexample.dll example_wrap.c example.def example.res ole32.lib uuid.lib advapi32.lib oleaut32.lib </pre></div> <p> @@ -208,21 +208,27 @@ and for MinGW under Linux (using WIDL): <div class="code"><pre> $ # MinGW and WIDL $ widl -t -I /usr/include/wine/windows example.idl -$ i586-mingw32msvc-windres example_rc.rc example_rc.o +$ i586-mingw32msvc-windres example.rc example_rc.o $ i586-mingw32msvc-gcc -shared -o example.dll example_wrap.c example.def example_rc.o -lole32 -luuid -ladvapi32 -loleaut32 </pre></div> <p> On a Windows installation of MinGW the names of the executables will most probably simply be <tt>windres</tt> and -<tt>gcc</tt>, and <tt>midl</tt> can be used in place of <tt>widl</tt>. Instructions for some other toolchains +<tt>gcc</tt>, and <tt>midl</tt> can be used in place of <tt>widl</tt>. Note that the output of <tt>windres</tt> +is an object file and may cause naming conflicts if you have a source file called <tt>example.c</tt> or +<tt>example.cpp</tt>. A simple solution is to rename the object file as was done above (e.g. to <tt>example_rc.o</tt>). +</p> + +<p> +Build instructions for some other toolchains may be found on <a href="http://www.dabeaz.com/cgi-bin/wiki.pl?DeveloperInfo/COMTesting">this page</a> of the SWIG Wiki. </p> <p> <b>Warning</b> <br> -A common source of mistakes is the omission of <tt>example_rc.[res|o]</tt> during compilation. This produces no -errors or warnings but results in a non-working module. +A common source of mistakes is the omission of <tt>example.res</tt> (or <tt>example_rc.o</tt>) during compilation. +This produces no errors or warnings but results in a non-working module. </p> <p> @@ -1201,13 +1207,13 @@ you can define a 'master' GUID which will serve as a seed value for automaticall <div class="code"> <pre> -%module(master_guid="12345678-1234-1234-1234-000000000005") example +%module(masterguid="12345678-1234-1234-1234-000000000005") example </pre> </div> <p> When SWIG wraps a class for which no IID or CLSID has been specified it will concatenate the -binary representation of master_guid, the module name, the class name and a suffix +binary representation of the master GUID, the module name, the class name and a suffix specifying whether the GUID is generated for a class, interface or type library. Then it will compute the SHA-1 hash of this string and use the resulting bits for generating a GUID (this process has been described in RFC 4122 as variant 5 of the generation algorithm). diff --git a/Examples/Makefile.in b/Examples/Makefile.in index adf9488c0..317d2ffff 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -1096,8 +1096,8 @@ r_clean: ################################################################## # COM intermediate files -COM_RC_FILE = $(INTERFACE:.i=_rc.rc) -COM_RES_FILE = $(INTERFACE:.i=_rc@COM_RES_SUFFIX@) +COM_RC_FILE = $(INTERFACE:.i=.rc) +COM_RES_FILE = $(INTERFACE:.i=@COM_RES_SUFFIX@) COM_IDL_FILE = $(INTERFACE:.i=.idl) COM_DEF_FILE = $(INTERFACE:.i=.def) COM_TLB_FILE = $(INTERFACE:.i=.tlb) @@ -1133,5 +1133,5 @@ com_compile: $(COMPILETOOL) $(COM_CC) $(COM_CC_SWITCHES) $(COM_CC_OUT_SWITCHES)$(TARGET)$(COM_EXEC_SUFFIX) $(COMSRCS) $(COM_LIBS) com_clean: - rm -f *_wrap* *.idl *.def *_rc.* *.o *.obj *.map *.lib *.tlb *.exp *.dll$(COM_EXEC_SUFFIX) *~ + rm -f *_wrap* *.idl *.def *.res *.o *.obj *.map *.lib *.tlb *.exp *.dll$(COM_EXEC_SUFFIX) *~ diff --git a/Source/Modules/com.cxx b/Source/Modules/com.cxx index c454f0a0e..bd8c8350c 100644 --- a/Source/Modules/com.cxx +++ b/Source/Modules/com.cxx @@ -494,7 +494,7 @@ public: } if (rcfile_flag) { - String *filen = NewStringf("%s%s_rc.rc", SWIG_output_directory(), module_class_name); + String *filen = NewStringf("%s%s.rc", SWIG_output_directory(), module_class_name); f_rcfile = NewFile(filen, "w"); if (!f_rcfile) { FileErrorDisplay(filen); diff --git a/configure.in b/configure.in index 7d79c85b4..d5ce3e518 100644 --- a/configure.in +++ b/configure.in @@ -1929,7 +1929,7 @@ if test "gcc" = "$COM_CC" -o "i586-mingw32msvc-gcc" = "$COM_CC" -o "winegcc" = " COM_RES_SUFFIX=.res else COM_EXEC_SUFFIX= - COM_RES_SUFFIX=.o + COM_RES_SUFFIX=_rc.o fi elif test "dmc" = "$COM_CC" ; then COM_CC_SHARED_SWITCHES='-WD -L/exetype:nt' |