SCons - Titles / Libraries in a Non-Standard Place

I am trying to use SCons to compile a program that requires a set of dependencies that I installed in a non-standard location.

I installed the dependencies in / home / dja / ocr. Now I am trying to compile the main program and cannot figure out how to tell SCons where to look for libraries and headers.

I tried (among others):

scons prefix=/home/dja/ocr

scons includepath=/home/dja/ocr/include libpath=/home/dja/ocr/lib

env LIBPATH=/home/dja/ocr/lib INCLUDEPATH=/home/dja/ocr/include scons

...etc...

The results are always the same:

scons: Reading SConscript files ...  
Currently supported OS version: Ubuntu 10.04  
Checking for C++ library iulib... no  
AssertionError: :  
  File "/home/dja/ocr/src/ocropus/SConstruct", line 107:  
    assert conf.CheckLibWithHeader("iulib","iulib/iulib.h","C++");  

I could not find the answer on Google.

What is the right SCons foo to get this to work?

+3
source share
5 answers

make --with-X configure, SConstruct . scons .

(. , ), . , , scons --help, SConstruct ( Make ).

, , scons .

+3

:

env = Environment(
          CPPPATH=['/home/dja/ocr/include'],
          LIBPATH=['/home/dja/ocr/lib'],
          LIBS=['iulib'])
env.Program('my_executable', Glob('*.c'))

CPPPATH C Pre-Processor Paths (: 3 P). LIBPATH , . , LIBS .

+4
0

LINKPATH = "- L/blah/" , LDFLAGS = "- L/blah/".

0
source

sudo scons --32 --libpath = / home / test / project / stage / lib / - cpppath = / home / test / project / boost / - prefix = / home / test / mongClient / output - dbg = on - -opt = on install

If libpath is intended to link the library to a non-standard location. cpppath is designed to include header files from a non-standard location.

0
source

Source: https://habr.com/ru/post/1785150/


All Articles