Coder Social home page Coder Social logo

Comments (6)

eddelbuettel avatar eddelbuettel commented on June 18, 2024

As a start, I could export the parse and format functions for you at the C level. Would that help?

from rcppcctz.

vspinu avatar vspinu commented on June 18, 2024

Not really. I need full CCTZ API. Would really help if you could somehow put an object archive into the include folder so that I can pull it with -lcctz from Makevars.

from rcppcctz.

eddelbuettel avatar eddelbuettel commented on June 18, 2024

That is beyond the scope of this package and project. Look at the line count of CCTZ and all the classes.

I'd rather talk to upstream about to ensure the build is header only, if only for subsets. Boost is similar. You can use Boost date_time header-only for as long as you forgo string operations (either parsing or formatting or both).

Here, I went to CCTZ to get the parsing and formatting explicitly so I don't mind the fact that the package itself is linking.

But in general you can't "just" assume a C++ library from another R package. Once you are at the linking stage you are in the hands of the OS. Now, carefully done header libraries can help here. Maybe there is scope. Talk to upstream -- it is not an RcppCCTZ issue.

from rcppcctz.

vspinu avatar vspinu commented on June 18, 2024

That is beyond the scope of this package and project. Look at the line count of CCTZ and all the classes.

I actually meant to create an archive of compiled objects and keep it in RcppCCTZ path somewhere accessible. Something along these lines:

LIBCCTZ=cctz/time_tool.o \
   cctz/time_zone_fixed.o \
    cctz/time_zone_format.o \
    cctz/time_zone_if.o \
    cctz/time_zone_impl.o \
    cctz/time_zone_info.o \
    cctz/time_zone_libc.o \
    cctz/time_zone_lookup.o \
    cctz/time_zone_posix.o

$(SHLIB): libcctz.a

libcctz.a: $(LIBCCTZ)
	$(AR) rcs libcctz.a $(LIBCCTZ)

Then move libcctz.a into an accessible place. Isn't this doable?

from rcppcctz.

eddelbuettel avatar eddelbuettel commented on June 18, 2024

I would tend to say "No", and quite firmly.

I don't think I have seen this suggested, let alone, recommended on r-devel or in Writing R Extension.

from rcppcctz.

eddelbuettel avatar eddelbuettel commented on June 18, 2024

I understood your question as asking whether the RcppCCTZ could provide the static library, and I still don't think so.

Compiling locally at your use for use in the same is possible. That is closer to you embedding the sources yourself. May still be brittle.

from rcppcctz.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.