[Qt-interest] Problem perl into Qt Programme
Pascal Patry
iscy at invalidip.com
Thu Apr 28 22:24:53 CEST 2011
On Thursday, April 28, 2011 16:10:41 yogesh upreti wrote:
> Hello All,
>
> I am trying to run some perl command in my Qt programme.
> I made a test programme according to
> http://perldoc.perl.org/perlembed.html#Adding-a-Perl-interpreter-to-your-C-
> program
>
> in my .pro file I have
>
> #-------------------------------------------------
>
> #
>
> # Project created by QtCreator 2011-04-27T23:08:23
>
> #
>
> #-------------------------------------------------
>
> QT += core gui
>
> TARGET = testProcess
>
> TEMPLATE = app
>
> SOURCES += main.cpp\
>
> testprocess.cpp
>
> HEADERS += testprocess.h
>
> FORMS += testprocess.ui
>
> INCLUDEPATH += C:/Perl/lib/CORE
>
> LIBS += -LC:/Perl/lib/CORE
Look at your "LIBS" right here.
-L <= adds the path for the linker
-l <= adds the library itself to tell the linker to link it
> [...]
> D:\Work\Programming\QT\testProcess-build-desktop/../testProcess/testprocess
> .cpp:20: undefined reference to `Perl_sys_term'
>
> collect2: ld returned 1 exit status
Since the linker doesn't know which library to link with, none of these
functions (Perl_sys_term & others) are defined at link time. I'm not
sure what's the name of your library should be, but something like this
might work better:
LIBS += -LC:/Perl/lib/CORE \
-lperlcore
this is *IF* the library is called "perlcore"
More information about the Qt-interest-old
mailing list