Hi,

Thanks for the suggestions. I've forgotten to  point out, that

R CMD COMPILE and
R CMD SHLIB

works fine, the dll file was indeed created. I get these undefined
references when I'm trying to run R CMD INSTALL.

I've read through the "Writing R extensions" and the archives, but I really
don't know what am I doing wrong.

More suprising, when I run the same package in windows with R CMD check,
the dll for src-i386 was created, but not the 64 -bit, i'm getting: sorry,
64 bit compilation not supported (or someting similar)

If anyone have an idea, comments welcome.

Thanks,

Zalan

On 9 May 2012 14:11, Dirk Eddelbuettel <e...@debian.org> wrote:

>
> On 9 May 2012 at 00:35, Zalan Szakolci wrote:
> | Hi there,
> |
> | I am trying to interface c++ code in R and make a package. With R CMD
> SHLIB
> | the dll was created, but when I try R CMD check, I am getting 'undefined
> | reference to..' linkage error messages.
> |
> | The relevant c++ source from conf-infomap.cpp:
>
> [...]
>
> | Now when I run R CMD check, in file 00install.out I am getting the
> | following linking errors:
> |
> | * installing *source* package ‘DyA’ ...
> | ** libs
> | ** arch -
> | g++ -I/usr/share/R/include -DNDEBUG      -fpic  -I -Wall -O3
> -funroll-loops
> | -pipe -c conf-infomap.cpp -o conf-infomap.o
> | g++ -I/usr/share/R/include -DNDEBUG      -fpic  -I -Wall -O3
> -funroll-loops
> | -pipe -c GreedyBase.cpp -o GreedyBase.o
> | g++ -I/usr/share/R/include -DNDEBUG      -fpic  -I -Wall -O3
> -funroll-loops
> | -pipe -c Greedy.cpp -o Greedy.o
> | g++ -I/usr/share/R/include -DNDEBUG      -fpic  -I -Wall -O3
> -funroll-loops
> | -pipe -c Node.cc -o Node.o
> | g++ conf-infomap.o GreedyBase.o Greedy.o Node.o mersenne.cpp stoc1.cpp
> | userintf.cpp -lm -o conf-infomap
>
> What is your src/Makevars file?
>
> This looks very wrong as you are obviously not linking against R itself.
>
> I would recommend a good long look at both the 'Writing R Extensions'
> manual
> as well as some of the existing CRAN packages uses C++ sources.
>
> You can (and should) also try
>
>    R CMD COMPILE ...
>
>    R CMD SHLIB ...
>
>    R CMD INSTALL ...
>
> etc as 'R CMD check' is really only the final bit.
>
> Dirk
>
> --
> R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
> See agenda, registration details and more at http://www.RinFinance.com
>

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to