Comments (3)
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.
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_PATH
and 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.
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 whichlibcre2.a
is installed and to select the directory under whichlibre2.a
orlibre2.so
is installed. -
You must use the command line option
-l
of gcc twice: to request linking oflibcre2.a
and to request linking oflibre2.a
orlibre2.so
. -
You must use the command line option
-I
of gcc once: to select the directory under whichcre2.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)
- Error while installing from release HOT 3
- configure.sh points to non-existant file HOT 1
- failure during configure. HOT 2
- Hi, Can you provide a cre2.a file to use like libre2.a? HOT 3
- hi, I have a static library compilation problem, How to use libcre2.a at compilation time? HOT 2
- Doesn't build on alpine linux (unknown type `int64_t`) HOT 2
- Error while building from source HOT 5
- Iterator API for Named Capturing Groups HOT 1
- Doesn't build on latest Ubuntu and Debian HOT 2
- make fail
- Whether to support RE2::Set
- crash caused by confusing return type of cre2_set_compile
- crash in cre2_find_named_capturing_groups
- error building from release tar HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cre2.