Unable to build Lab::VISA on my system
Posted: 2014-12-04T13:16:12-07:00
Hi,
I am very new to PERL and I have been fighting with this issues for past one week now. It is very disappointing that I am not able to solve this issue. Any help is greatly appreciated.
I downloaded the LAB::VISA module from http://search.cpan.org/dist/Lab-VISA/li ... lation.pod and unzipped it. I downloaded NI-VISA, and my Makefile.PL looks like this:
(($^O =~ /MSWin32/)
? ('LIBS' => ['"-lC:\\Program Files\\IVI Foundation\\VISA\\WinNT\\lib\\msc\\visa32.lib"'],
'INC' => '"-IC:\\Program Files\\IVI Foundation\\VISA\\WinNT\\Include"',
)
: ('LIBS' => ['-lvisa'],
'INC' => '-I/usr/local/include/',
)
),
But when I make the file I get the below error, what am I doing wrong?
C:\Strawberry\cpan\Lab-VISA-3.02>perl Makefile.PL CC=/usr/bin/gcc
Note (probably harmless): No library found for -lvisa
Writing Makefile for Lab::VISA
Writing MYMETA.yml
C:\Strawberry\cpan\Lab-VISA-3.02>make
Skip blib/lib/Lab/VISA.pod (unchanged)
Skip blib/lib/Lab/VISA/Installation.pod (unchanged)
Skip blib/lib/Lab/VISA.pm (unchanged)
/usr/bin/gcc -c -I/usr/local/include/ -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__
-g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -O3 -DVERSION
=\"3.02\" -DXS_VERSION=\"3.02\" "-I/usr/lib/perl5/5.14/i686-cygwin-threads-64i
nt/CORE" visa_wrap.c
visa_wrap.c:1558:18: fatal error: visa.h: No such file or directory
compilation terminated.
Makefile:336: recipe for target `visa_wrap.o' failed
make: *** [visa_wrap.o] Error 1
My Makefile is as follows:
# --- MakeMaker c_o section:
.c.i:
gcc-4 -E -c $(PASTHRU_INC) $(INC) \
$(CCFLAGS) $(OPTIMIZE) \
$(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
$(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
.c.s:
$(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
.c$(OBJ_EXT):
$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
.cpp$(OBJ_EXT):------------------------------------------------>This is where it errors
$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp
.cxx$(OBJ_EXT):
$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx
.cc$(OBJ_EXT):
$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc
.C$(OBJ_EXT):
$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.C
Please help me solve, I have spent many hours trying to debug.
Thanks,
stambi
I am very new to PERL and I have been fighting with this issues for past one week now. It is very disappointing that I am not able to solve this issue. Any help is greatly appreciated.
I downloaded the LAB::VISA module from http://search.cpan.org/dist/Lab-VISA/li ... lation.pod and unzipped it. I downloaded NI-VISA, and my Makefile.PL looks like this:
(($^O =~ /MSWin32/)
? ('LIBS' => ['"-lC:\\Program Files\\IVI Foundation\\VISA\\WinNT\\lib\\msc\\visa32.lib"'],
'INC' => '"-IC:\\Program Files\\IVI Foundation\\VISA\\WinNT\\Include"',
)
: ('LIBS' => ['-lvisa'],
'INC' => '-I/usr/local/include/',
)
),
But when I make the file I get the below error, what am I doing wrong?
C:\Strawberry\cpan\Lab-VISA-3.02>perl Makefile.PL CC=/usr/bin/gcc
Note (probably harmless): No library found for -lvisa
Writing Makefile for Lab::VISA
Writing MYMETA.yml
C:\Strawberry\cpan\Lab-VISA-3.02>make
Skip blib/lib/Lab/VISA.pod (unchanged)
Skip blib/lib/Lab/VISA/Installation.pod (unchanged)
Skip blib/lib/Lab/VISA.pm (unchanged)
/usr/bin/gcc -c -I/usr/local/include/ -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__
-g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -O3 -DVERSION
=\"3.02\" -DXS_VERSION=\"3.02\" "-I/usr/lib/perl5/5.14/i686-cygwin-threads-64i
nt/CORE" visa_wrap.c
visa_wrap.c:1558:18: fatal error: visa.h: No such file or directory
compilation terminated.
Makefile:336: recipe for target `visa_wrap.o' failed
make: *** [visa_wrap.o] Error 1
My Makefile is as follows:
# --- MakeMaker c_o section:
.c.i:
gcc-4 -E -c $(PASTHRU_INC) $(INC) \
$(CCFLAGS) $(OPTIMIZE) \
$(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
$(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
.c.s:
$(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
.c$(OBJ_EXT):
$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
.cpp$(OBJ_EXT):------------------------------------------------>This is where it errors
$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp
.cxx$(OBJ_EXT):
$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx
.cc$(OBJ_EXT):
$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc
.C$(OBJ_EXT):
$(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.C
Please help me solve, I have spent many hours trying to debug.
Thanks,
stambi