← Back to team overview

yade-users team mailing list archive

Re: [Question #159123]: how to link an external library with YADE

 

Question #159123 on Yade changed:
https://answers.launchpad.net/yade/+question/159123

    Status: Answered => Open

Tao is still having a problem:
Hi Bruno,
The information in scons.profile-default is:

PREFIX = '/home/tao/YADE'
features = 'gts,log4cxx,opengl,openmp,qt4,vtk'
CPPPATH = '/usr/include/vtk-5.0:/usr/include/vtk-5.2:/usr/include/vtk-5.4:/usr/include/vtk-5.6:/usr/include/vtk:/home/tao/yadeopenfoam:/usr/include/eigen2'
LIBPATH = '/home/tao/yadefluid'
CXXFLAGS = []
SHCCFLAGS = ['-lIcoFoam', '-fPIC']

As for the last line, I have to add '-fPIC' to process the compilation.
If not, some problems will occur. The compilation is correct with the
message: "scons: done building targets." However, when I tried to test
this engine in my script, problems as posted before occur.

The output of "scons -h" are listed as bellow:

tao@ubuntu:~/trunk$ scons -h
scons: Reading SConscript files ...
@@@ Using profile default (scons.profile-default) @@@
Eigen 2 math library will be used
Yade version is `bzr2866' (bzr2866), installed files will be suffixed with `-bzr2866'.
All intermediary files will be in `/home/tao/build-bzr2866'.
Checking whether c++ compiler "g++" works...(cached) yes
Finding libstdc++ library... (cached) /usr/lib/libstdc++.so.6
Checking for pthread_exit(NULL) in C library pthread... (cached) yes
Checking for Python development files... (cached) ok
Checking for C++ header file numpy/ndarrayobject.h... (cached) yes
Checking for required python modules... (cached) all ok
Checking boost libraries... (cached) all ok
Checking for C++ header file boost/foreach.hpp... (cached) yes
Checking for C++ header file Eigen/Core... (cached) yes
Checking for C++ header file loki/NullType.h... (cached) yes
Checking for glutGetModifiers() in C++ library glut... (cached) yes
Checking for QGLViewer() in C++ library qglviewer-qt4... (cached) yes
Checking for vtkInstantiator::New() in C++ library vtkCommon... (cached) yes
Checking for gts_object_class() in C++ library gts... (cached) yes
Checking for log4cxx::Logger::getLogger("") in C++ library log4cxx... (cached) yes
scons: done reading SConscript files.

PREFIX: Install path prefix
    default: /usr/local
    actual: /home/tao/YADE

runtimePREFIX: Runtime path prefix; DO NOT USE, inteded for packaging only.
    default: None
    actual: /home/tao/YADE

variant: Build variant, will be suffixed to all files, along with version.
    default: 
    actual: 

debug: Enable debugging information (yes|no)
    default: 0
    actual: False

gprof: Enable profiling information for gprof (yes|no)
    default: 0
    actual: False

optimize: Turn on optimizations (-1, 0 or 1); negative value sets optimization based on debugging: not optimize with debugging and vice versa.
    default: -1
    actual: True

PGO: Whether to "gen"erate or "use" Profile-Guided Optimization (|gen|use)
    default: 
    actual: 

features: Optional features that are turned on
    (all|none|comma-separated list of names)
    allowed names: opengl log4cxx cgal openmp gts vtk gl2ps qt4 sphere-padder never_use_this_one subdomains
    default: log4cxx,opengl,gts,openmp,vtk,qt4
    actual: gts log4cxx opengl openmp qt4 vtk

jobs: Number of jobs to run at the same time (same as -j, but saved)
    default: 2
    actual: 2

buildPrefix: Where to create build-[version][variant] directory for intermediary files
    default: ..
    actual: ..

hotPlugins: Files (without the .cpp extension) that will be compiled separately even in the monolithic build (use for those that you modify frequently); comma-separated.
    default: 
    actual: 

chunkSize: Maximum files to compile in one translation unit when building plugins. (unlimited if <= 0, per-file linkage is used if 1)
    default: 7
    actual: 7

version: Yade version (if not specified, guess will be attempted)
    default: None
    actual: None

realVersion: Revision (usually bzr revision); guessed automatically unless specified
    default: None
    actual: None

CPPPATH: Additional paths for the C preprocessor (colon-separated)
    default: /usr/include/vtk-5.0:/usr/include/vtk-5.2:/usr/include/vtk-5.4:/usr/include/vtk-5.6:/usr/include/vtk
    actual: /usr/include/vtk-5.0 /usr/include/vtk-5.2 /usr/include/vtk-5.4 /usr/include/vtk-5.6 /usr/include/vtk /home/tao/yadeopenfoam /usr/include/eigen2

LIBPATH: Additional paths for the linker (colon-separated)
    default: None
    actual: /home/tao/yadefluid

libstdcxx: Specify libstdc++ location by hand (opened dynamically at startup), usually not needed
    default: None
    actual: None

QT4CXX: Specify a different compiler for files including qt4; this is necessary for older qt version (<=4.7) which don't compile with clang
    default: None
    actual: None

QT4DIR: Directory where Qt4 is installed
    default: /usr/share/qt4
    actual: /usr/share/qt4

PATH: Path (not imported automatically from the shell) (colon-separated)
    default: None
    actual: None

CXX: The c++ compiler
    default: g++
    actual: g++

CXXFLAGS: Additional compiler flags for compilation (like -march=core2).
    default: None
    actual: 

march: Architecture to use with -march=... when optimizing
    default: native
    actual: native

execCheck: Name of the main script that should be installed; if the current one differs, an error is raised (do not use directly, only intended for --rebuild
    default: None
    actual: None

defThreads: No longer used, specify -j each time yade is run (defaults to 1 now)
    default: -1
    actual: -1

SHCCFLAGS: Additional compiler flags for linking (for plugins).
    default: None
    actual: -lIcoFoam -fPIC

QUAD_PRECISION: typedef Real as long double (=quad) (yes|no)
    default: 0
    actual: False

brief: Don't show commands being run, only what files are being compiled/linked/installed (yes|no)
    default: True
    actual: True

Use scons -H for help about command-line options.


Thanks a lot.

Cheers,
Tao

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.