jxjo / Xoptfoil-JX

Xoptfoil-JX - modified version
GNU General Public License v3.0
14 stars 5 forks source link

build not working on Linux / Fedora 34 #28

Closed Pulsar07 closed 2 years ago

Pulsar07 commented 3 years ago

When running the build script build_linux.sh the loader gives this error: ".... can not be used when making a shared object; recompile with -fPIC"

In my environment setting the -fPIC option for position independent code in the file CMakeLists.txt solves the problem.

if (Fortran_COMPILER_NAME MATCHES "gfortran")
 set (CMAKE_Fortran_FLAGS_RELEASE "-fPIC -O3 ${OPENMP_FLAG} -cpp ${OS_FLAG} ${STATIC_FLAG}")

Regards Rainer

jxjo commented 3 years ago

...thanks Rainer. I will add the flag to the build script...