Re: Redefinition of target errors
- From: martin.evans@xxxxxxxxxxxx (Martin Evans)
- Date: Thu, 21 Feb 2008 15:36:06 +0000
Michael Leonida wrote:
I got nmake from one of the links, thank you. Also, thanks for all your help.
No problem - just bare in mind Windows is neither a platform I work on regularly nor one I want to work on regularly so you should probably take any windows advice from me with a pinch of salt.
I still get an error that cl is not recognized as an internal or external command (there is a call to cl with a lot of parameters that also gets printed on the screen).
ExtUtils::MakeMaker is now thinking you are building with the VC compiler instead of the Borland compiler. I see in ExtUtils::MM_Win32
my $BORLAND = 1 if $Config{'cc'} =~ /^bcc/i;
so I'd guess your Config.pm does not contain bcc or bcc32 i.e. your Perl was not built with Borland's compiler. I can't remember if you said your Perl was activestate. All the modules you build with a C compiler need to built with the same compiler used for Perl itself and that is why ExtUtils gets 'cc' from Config.pm.
Do I need the Visual C++ compiler in order to use nmake, or is it good to go as is? If I need VC++, what's the cheapest way to get it?
No, nmake just runs the commands in the Makefile some of which will be commands to compile code (and hence use your compiler). Your first problem was you were generating an nmake/dmake Makefile which Borland's make did not understand. However, if your Perl was not built with Borlands compiler you will need to get hold of the compiler, used to build Perl:
perl -MConfig -le "print $Config{cc};"
You can get Visual Studio Express (for free) from Microsoft but you might want to read the README.Windows (or whatever it is) in the Perl source tree as it makes recommendations on other stuff you need to get.
Also as far as Borland goes my compiler is called bcc32. I wasn't able to find a link or a way to get dmake for Borland.
See above.
The Perl version of make link in the other thread is not working.
ok, it was worth a shot.
I am finally getting the emails from this mailing list.
:-)
The last time I tried to compile a perl module written in C for Windows it was a real PITA (I think I was trying to build DBD::ODBC to run with ActiveState Perl). I gave up in the end and built my own Perl from scratch. Welcome to the wonderful world of Microsoft Windows ;-) If you have something like ActiveState perl try and get a DBD::ODBC binary from them too.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
On 2/21/08, *Martin Evans* <martin.evans@xxxxxxxxxxxx <mailto:martin.evans@xxxxxxxxxxxx>> wrote:.
Martin Evans wrote:
> Michael Leonida wrote:
>> I am getting 3 duplicate (3*2=6 total) redefinition of target errors
>> when I
>> try to make the latest DBD::ODBC 1.15 from CPAN. I am using the
>> Borland C++
>> compiler on Windows XP Pro. The duplicate redefinitions occur
after these
>> two lines in the Makefile on blank lines:
>>
>> $(OBJECT) : $(PERL_HDRS)
>>
>> $(OBJECT) : $(FIRST_MAKEFILE
>>
>> I am also using ActivePerl 5.10.0. During running Makefile.PL I
get a
>> bunch
>> of "probably harmless" Notes that some libraries were not found,
>> including
>> ODBC32.LIB.
>>
>> Here are the errors:
>>
>> Error makefile 908: Redefinition of target 'ConvertUTF.obj'
>>
>> Error makefile 908: Redefinition of target 'ODBC.obj'
>>
>> Error makefile 908: Redefinition of target 'dbdimp.obj'
>>
>> Error makefile 915: Redefinition of target 'ConvertUTF.obj'
>>
>> Error makefile 915: Redefinition of target 'ODBC.obj'
>>
>> Error makefile 915: Redefinition of target 'dbdimp.obj'
>>
>>
>>
>> Any ideas?
>>
>> Thanks,
>>
>> Mike
>>
>
> What make are you using (nmake? dmake?) and did you specify the
make you
> are using on the command line for perl Makefile.PL e.g.,
>
> perl Makefile.PL MAKE=nmake
>
> Martin
This thread continued off the dbi-users list as Michael was not getting
dbi-users list emails for some reason.
As it turned out, Michael was using Borland Make which it appears is not
well supported by ExtUtils::MakeMaker. The following may be useful for
anyone else using Borland Make:
ExtUtils::MakeMaker only specifically supports dmake and nmake on
Windows and not Borland make although it does support Borlands C
compiler.
There is an interesting thread on perlmonks about Borland make:
http://www.perlmonks.org/?node_id=62924
which mentions a Perl version of make and changing your Config.pm
<http://Config.pm> to use it.
Also, from the Perl README for Windows (perldoc perlwin32):
Borland C++
If you are using the Borland compiler, you will need dmake. (The make
that Borland supplies is seriously crippled and will not work for
MakeMaker builds.)
You can get nmake from the following links:
ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe
http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
Hope this proves useful.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
- References:
- Redefinition of target errors
- From: Michael Leonida
- Re: Redefinition of target errors
- From: Martin Evans
- Re: Redefinition of target errors
- From: Martin Evans
- Re: Redefinition of target errors
- From: Michael Leonida
- Redefinition of target errors
- Prev by Date: Re: Redefinition of target errors
- Next by Date: RE: make error-> ld: Unrecognized argument: -Wl,+b...
- Previous by thread: Re: Redefinition of target errors
- Next by thread: DBD::ODBC - default timeout is 30 seconds instead of none
- Index(es):
Relevant Pages
|
|