Giter VIP home page Giter VIP logo

Comments (3)

marcomaggi avatar marcomaggi commented on August 29, 2024

Yes, configure the package to build static libraries, build it, then configure your compiler to search for the header file in the subdirectory src of cre2's source directory and to search for cre2's static library in the subdirectory .libs of the build directory.

from cre2.

sty945 avatar sty945 commented on August 29, 2024

Thank you very much, when i install CRE2 in my linux system, it generates the directories in my computer ,like:

├── include
│   └── cre2.h
├── lib
│   ├── libcre2.a
│   ├── libcre2.la
│   ├── libcre2.so -> libcre2.so.0.0.0
│   ├── libcre2.so.0 -> libcre2.so.0.0.0
│   └── libcre2.so.0.0.0
└── share
    └── doc
        └── cre2
            ├── COPYING
            ├── LICENSE.re2
            └── README

I moved this directory to a computer which not install the CRE2, and add the add the include directory to the C_INCLUDE_PATHand use the static libraries libcre2.a to generate binary file like:

gcc main.cc -g -o main libcre2.a

But it always failed.Could you please show me some example how to configure the packageto build the static libraries, and how to use use it? Thank you very very much!!

from cre2.

marcomaggi avatar marcomaggi commented on August 29, 2024

Moving around compiled code like this is not a good idea if you are not at least a bit expert on using the compiler and linking libraries. Anyway, you can still try.

I will assume that the build system and the target system are both 32-bit or both 64-bit. I will assume that the target system has re2 installed. You should really read the documentation of gcc:

  • You must use the command line option -L of gcc twice: to select the directory under which libcre2.a is installed and to select the directory under which libre2.a or libre2.so is installed.

  • You must use the command line option -l of gcc twice: to request linking of libcre2.a and to request linking of libre2.a or libre2.so.

  • You must use the command line option -I of gcc once: to select the directory under which cre2.h is installed.

You never write which error do you see when things go wrong. Surprisingly, this is a useful information!

from cre2.

Related Issues (15)

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.