You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Porter Schermerhorn <ps...@oneil.com> on 2003/11/04 21:31:58 UTC

Help Compiling Subversion Under Win32

Greetings.  I am attempting to compile the Perl SWIG bindings for
Subversion in Visual Studio .NET 2003.  In doing so I have come across a
number of problems.  Most of them involved the VS .NET project files
generated by gen_make.py not having the proper project dependencies,
which I managed to correct.  Now I have reached the point where I am
trying to compile the swig_perl_delta project.  VS .NET complains that
it cannot find 'delta_editor.hi'.  Looking at the Makefile.PL in
subversion/bindings/swig/perl I noticed that it runs a Perl script
called h2i.pl in this fashion:

 perl h2i.pl ../../../include/svn_delta.h svn_delta_editor_t >
delta_editor.hi

I did this by hand and then copied delta_editor.hi up one directory
level so that VS .NET could find it.  Now VS .NET is complaining:

subversion\bindings\swig\perl\svn_delta.c(631) : error C2010: '.' :
unexpected in macro formal parameter list
subversion\bindings\swig\perl\svn_delta.c(631) : error C2010: '.' :
unexpected in macro formal parameter list
subversion\bindings\swig\perl\svn_delta.c(631) : error C2010: '.' :
unexpected in macro formal parameter list
subversion\bindings\swig\perl\svn_delta.c(631) : error C2010: ')' :
unexpected in macro formal parameter list

Is it illegal to use variable arguments for macros in Visual C?  Or does
the problem lie elsewhere and the compiler is just getting confused?

Any light any could shed on this build process would be greatly
appreciated.  This is my first time using Visual Studio, it is required
that I access Subversion via Perl on the Windows platform for work.
What version of Visual Studio is Subversion targeted at?  I noticed
after I generated the VS .NET project files with gen_make.py that my
copy of Visual Studio had to convert some of the project files.  I am
using Visual Studio .NET 2003:  Microsoft Development Environment 2003
v7.1.3088 and Microsoft .NET Framework 1.1 v1.1.4322.

As a side note I've also tried building in Visual Studio 6 SP5 using the
dsp target of gen_make.py.  However, the source was attempting to use
constants which are not defined in the VC98 SHLOBJ.H.  Since I found
these constants defined in the VC7 ShlObj.h I am assuming that
Subversion is not meant to be compiled under Visual Studio 6?  If this
is the case it might be wise to indicate that the dsp target of
gen_make.py is deprecated.

Thank you for any help you can give.

Sincerely,
Porter Schermerhorn
Lead Web Application Engineer

O'NEIL & ASSOCIATES, INC.
495 Byers Rd.
Miamisburg, Ohio 45342-3662
Phone: (937) 865-0846 ext. 3813
Fax: (937) 865-5858
E-mail: pschermerhorn@oneil.com 



Confidentiality Notice
The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Help Compiling Subversion Under Win32

Posted by Porter Schermerhorn <ps...@oneil.com>.
I am using SWIG 1.3.19.  Do I need to tell SWIG somehow that it needs to
generate VC compliant code?  I understand that variable arguments for
preprocessor macros was introduced in C99 which MSVC does not support.
I did find a replacement preprocessor that can be used with VC7.1 that
is C99 compliant.  I was also looking into the Borland C++ Builder which
is apparently C99 compliant.  Suggestions?

Sincerely,
Porter Schermerhorn
Lead Web Application Engineer

O'NEIL & ASSOCIATES, INC.
495 Byers Rd.
Miamisburg, Ohio 45342-3662
Phone: (937) 865-0846 ext. 3813
Fax: (937) 865-5858
E-mail: pschermerhorn@oneil.com 



Confidentiality Notice
The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Help Compiling Subversion Under Win32

Posted by Branko Čibej <br...@xbc.nu>.
Porter Schermerhorn wrote:

>Thanks to all who have helped so far.  Unfortunately, I am still plagued
>by the fact that neither VC6 nor VC7.1 seem to like preprocessor macros
>with variable arguments.  The source of the problem is in
>subversion/bindings/swig/perl/svn_delta.c:
>
>#define EDITOR_INVOKER(method, ...) \
>  svn_error_t *svn_delta_editor_invoke_ ## method \
>  (const svn_delta_editor_t *editor, __VA_ARGS__)
> 
>#define EDITOR_INVOKER_FUNC(method, ...) \
>  { return editor->method (__VA_ARGS__); }
>  
>
What? AFAIK that file is generated by SWIG. Which version of SWIG are
you using?

>Anyone know how to get Visual C to accept '...' as an identifier in the
>macro parameter list?
>  
>
Wait for a version that supports C99?


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Help Compiling Subversion Under Win32

Posted by Porter Schermerhorn <ps...@oneil.com>.
Thanks to all who have helped so far.  Unfortunately, I am still plagued
by the fact that neither VC6 nor VC7.1 seem to like preprocessor macros
with variable arguments.  The source of the problem is in
subversion/bindings/swig/perl/svn_delta.c:

#define EDITOR_INVOKER(method, ...) \
  svn_error_t *svn_delta_editor_invoke_ ## method \
  (const svn_delta_editor_t *editor, __VA_ARGS__)
 
#define EDITOR_INVOKER_FUNC(method, ...) \
  { return editor->method (__VA_ARGS__); }

Anyone know how to get Visual C to accept '...' as an identifier in the
macro parameter list?

Sincerely,
Porter Schermerhorn
Lead Web Application Engineer

O'NEIL & ASSOCIATES, INC.
495 Byers Rd.
Miamisburg, Ohio 45342-3662
Phone: (937) 865-0846 ext. 3813
Fax: (937) 865-5858
E-mail: pschermerhorn@oneil.com 



Confidentiality Notice
The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Help Compiling Subversion Under Win32

Posted by Branko Čibej <br...@xbc.nu>.
Porter Schermerhorn wrote:

>Barry, thank you for the information.  A few questions though.  How do I
>installed the MS Platform SDK core for MSVC6?
>
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Help Compiling Subversion Under Win32

Posted by Porter Schermerhorn <ps...@oneil.com>.
Barry, thank you for the information.  A few questions though.  How do I
installed the MS Platform SDK core for MSVC6?  I installed the MSVC6
stuff off the CD and then patched up to SP5, this gives me
VC98/Include/SHLOBJ.H.  I noticed with MSVC7.1 I have a
PlatformSDK/Include/ShlObj.h though, but this is not for MSVC6.  I am
using an Apache2/mod_perl/Perl bundle produced by theoryx5 so I will
have to inquire what version of MSVC it is built with.  Thanks again for
all your help.

Sincerely,
Porter Schermerhorn
Lead Web Application Engineer

O'NEIL & ASSOCIATES, INC.
495 Byers Rd.
Miamisburg, Ohio 45342-3662
Phone: (937) 865-0846 ext. 3813
Fax: (937) 865-5858
E-mail: pschermerhorn@oneil.com 

> -----Original Message-----
> From: Barry Scott [mailto:barry@barrys-emacs.org] 
> Sent: Wednesday, November 05, 2003 6:34 AM
> To: pschermerhorn@oneil.com; users@subversion.tigris.org
> Subject: Re: Help Compiling Subversion Under Win32
> 
> 
> You need to install the MS Platform SDK core to get the right 
> header files. Then you can build for MSVC6. Note you may not 
> be able to use the extension with MSVC7.1 (aka new 2003) if 
> the perl.exe was built with MSVC6 because you get two copies 
> of the C runtime in memory. Python extensions potentially 
> have this problem as well. I'm using MSVC6 as it matches how 
> Python is built.
> 
> Look up #define in MSDN for VS .NET 2003 to answer your "is 
> it supported 
> question?".
> 
> Barry



Confidentiality Notice
The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Help Compiling Subversion Under Win32

Posted by Barry Scott <ba...@barrys-emacs.org>.
You need to install the MS Platform SDK core to get the right header files.
Then you can build for MSVC6. Note you may not be able to use the extension
with MSVC7.1 (aka new 2003) if the perl.exe was built with MSVC6 because
you get two copies of the C runtime in memory. Python extensions potentially
have this problem as well. I'm using MSVC6 as it matches how Python is
built.

Look up #define in MSDN for VS .NET 2003 to answer your "is it supported 
question?".

Barry



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org