I found error on compile to palabos:
…
gcc -o lib/libplb_mpi -Wl,–no-as-needed lib/libplb_mpi.a
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/…/…/…/…/lib64/crt1.o: In function _start': (.text+0x20): undefined reference to
main’
collect2: ld returned 1 exit status
scons: *** [lib/libplb_mpi] Error 1
scons: building terminated because of errors.
make: *** [compile] Error 2
I don’t understand to link to the library. please tell me hot to compile.
thanks…
------ Makefile -------
##########################################################################
Makefile for the Palabos example program permeability.
The present Makefile is a pure configuration file, in which
you can select compilation options. Compilation dependencies
are managed automatically through the Python library SConstruct.
If you don’t have Python, or if compilation doesn’t work for other
reasons, consult the Palabos user’s guide for instructions on manual
compilation.
##########################################################################
USE: multiple arguments are separated by spaces.
For example: projectFiles = file1.cpp file2.cpp
optimFlags = -O -finline-functions
Leading directory of the Palabos source code
palabosRoot = /opt/palabos
Name of source files in current directory to compile and link with Palabos
projectFiles = #permeability.cpp
Set optimization flags on/off
optimize = true
Set debug mode and debug flags on/off
debug = false
Set profiling flags on/off
profile = false
Set MPI-parallel mode on/off (parallelism in cluster-like environment)
MPIparallel = true
Set SMP-parallel mode on/off (shared-memory parallelism)
SMPparallel = false
Decide whether to include calls to the POSIX API. On non-POSIX systems,
including Windows, this flag must be false, unless a POSIX environment is
emulated (such as with Cygwin).
usePOSIX = true
Path to external libraries (other than Palabos)
libraryPaths =
Path to inlude directories (other than Palabos)
includePaths =
Dynamic and static libraries (other than Palabos)
libraries =
Compiler to use without MPI parallelism
serialCXX = g++
Compiler to use with MPI parallelism
parallelCXX = mpicxx
General compiler flags (e.g. -Wall to turn on all warnings on g++)
compileFlags = #-Wall -Wnon-virtual-dtor
General linker flags (don’t put library includes into this flag)
linkFlags = -Wl,–no-as-needed
Compiler flags to use when optimization mode is on
optimFlags = -O2 -fPIC -m64 -fno-strict-aliasing
Compiler flags to use when debug mode is on
debugFlags = #-g
Compiler flags to use when profile mode is on
profileFlags = #-pg
##########################################################################
All code below this line is just about forwarding the options
to SConstruct. It is recommended not to modify anything there.
##########################################################################
SCons = $(palabosRoot)/scons/scons.py -j 2 -f $(palabosRoot)/SConstruct
SConsArgs = palabosRoot=$(palabosRoot)
projectFiles="$(projectFiles)"
optimize=$(optimize)
debug=$(debug)
profile=$(profile)
MPIparallel=$(MPIparallel)
SMPparallel=$(SMPparallel)
usePOSIX=$(usePOSIX)
serialCXX=$(serialCXX)
parallelCXX=$(parallelCXX)
compileFlags="$(compileFlags)"
linkFlags="$(linkFlags)"
optimFlags="$(optimFlags)"
debugFlags="$(debugFlags)"
profileFlags="$(profileFlags)"
libraryPaths="$(libraryPaths)"
includePaths="$(includePaths)"
libraries="$(libraries)"
compile:
python $(SCons) $(SConsArgs)
clean:
python $(SCons) -c $(SConsArgs)
/bin/rm -vf find $(palabosRoot) -name '*~'