On 16 May 2002, at 11:29, [EMAIL PROTECTED] wrote:
> Dear Gurus,
>
> I got the following problem, which I could not solve for three days, maybe
> someone of you is expert enough to help. It really makes me hard times (as I
> write code in C++ usually having very few experience/ment with Perl).
>
> I made the following:
> 1. Created stuff with h2xs
> 2. Added perlobject.map
> 3. Created typemap
> 4. Edited the code (created a class into it)
> 5. Edited Makefile.PL and this is where I suspect the problem, since have no
> clue what to put into $CC when using MS VC6, nmake. Other thing is that it
> seems generates C instead of C++.
>
This may also be problematic because MS have different standard
libraries for C and C++. Perl is all C, I doubt it will compile with a
C++ compiler.
> Thank you very much,
> Sandor
>
> Here you are the Makefile.PL and the code
> <Makefile.pl>
> use ExtUtils::MakeMaker;
> # See lib/ExtUtils/MakeMaker.pm for details of how to influence
> # the contents of the Makefile that is written.
>
> ###$CC = 'cl'; ???
>
> WriteMakefile(
> 'NAME' => 'PerlWrapper',
> 'VERSION_FROM' => 'PerlWrapper.pm', # finds $VERSION
> 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
> ($] >= 5.005 ? ## Add these new keywords supported since 5.005
> (ABSTRACT_FROM => 'PerlWrapper.pm', # retrieve abstract from module
> AUTHOR => 'A. U. Thor <[EMAIL PROTECTED]>') : ()),
> 'LIBS' => [''], # e.g., '-lm'
> 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
> # Insert -I. if you add *.h files later:
> 'INC' => '', # e.g., '-I/usr/include/other'
> # Un-comment this if you add C files to link with later:
> # 'OBJECT' => '$(O_FILES)', # link all the C files too
> 'XSPROTOARG' => '-noprototypes',
> 'TYPEMAPS' => ['perlobject.map' ],
>
> #CC => $CC,
> #LD => '$(CC)',
> XSOPT => '-C++',
> #XSOPT => '-extern',
> );
>
> <PerlWrapper.xs>
> #ifdef __cplusplus
> extern "C" {
> #endif
> #include "EXTERN.h"
> #include "perl.h"
> #include "XSUB.h"
> #ifdef __cplusplus
> }
> #endif
>
> class PerlComm {
> public:
> int i;
> };
>
> PerlComm::PerlComm() {
> }
>
> PerlComm::~PerlComm() {
> }
>
> MODULE = PerlWrapper PACKAGE = PerlWrapper
>
> PerlComm *
> PerlComm::new()
>
> void
> PerlComm::DESTROY()
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
--
The information in this e-mail is for use by the addressee(s) only. If you
are not the intended recipient, please notify us immediately and delete the
message from your computer. No liability or responsibility is accepted for
viruses and it is your responsibility to scan attachments (if any).
Opinions and views expressed in this email are those of the sender and
do not reflect the opinions and views of antenova Ltd.
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs