I try to get the combination of netgen and fc up and running.
Both packages build, but currently I get runtime errors when I switch to fem-wb in fc about unresolved externals.
@midgetfc found out, that the netgen author experimented with cmake instructions and that the experiment was not finished.
nglib definitions might be the source of trouble.
As sf.net is stil out of order, I try to get into the problem.
This is the CMakeList.txt of nglib - that I changed without really knowing what to do
Code: Select all
# dist_pkgdata_DATA = cube.surf
add_definitions(-DNGLIB_EXPORTS)
set(nglib_sources nglib.cpp)
# ADD_LIBRARY(nglib SHARED nglib.cpp)
# TARGET_LINK_LIBRARIES( nglib interface geom2d csg stl occ mesh ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} )
#//FC needs csg gen geom2d gprim la mesh occ stlgeom
#if(WIN32)
# set(nglib_objects
# $<TARGET_OBJECTS:interface>
# $<TARGET_OBJECTS:geom2d>
# $<TARGET_OBJECTS:csg>
# $<TARGET_OBJECTS:stl>
# $<TARGET_OBJECTS:occ>
# $<TARGET_OBJECTS:mesh>
# $<TARGET_OBJECTS:general>
# $<TARGET_OBJECTS:linalg>
# $<TARGET_OBJECTS:gprim>
#
# $<TARGET_OBJECTS:visual>
# $<TARGET_OBJECTS:csgvis>
# $<TARGET_OBJECTS:stlvis>
## $<TARGET_OBJECTS:geom2dvis>
## $<TARGET_OBJECTS:occvis>
# )
#else
set(nglib_objects
interface geom2d csg stl occ mesh visual stlvis occvis geom2dvis csgvis
# gen la gprim
)
#endif(WIN32)
#add_library(nglib SHARED ${nglib_sources} ${nglib_objects})
add_library(nglib SHARED ${nglib_sources})
target_link_libraries( nglib ${nglib_objects} ${LIBPTHREAD} ${OCC_LIBRARIES} ${LIBTOGL} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} )
if(USE_PYTHON)
target_link_libraries(nglib ${PYTHON_LIBS})
endif(USE_PYTHON)
# if(NOT WIN32)
# add_executable(ng_vol ng_vol.cpp ${nglib_objects})
# target_link_libraries( ng_vol nglib ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} )
# target_link_libraries( ng_vol nglib interface geom2d csg stl occ mesh )
#
# add_executable(ng_stl ng_stl.cpp ${nglib_objects})
# target_link_libraries( ng_stl nglib ${OCC_LIBRARIES} ${OCC_OCAF_LIBRARIES} ${MPI_CXX_LIBRARIES} )
# target_link_libraries( ng_stl nglib interface geom2d csg stl occ mesh )
#
# install(TARGETS nglib ng_vol ng_stl ${ng_install_dir})
# endif(NOT WIN32)
install(TARGETS nglib ${ng_install_dir})
Using nglib_objects at add_library fails with error
Code: Select all
no source for interface. Tried ...
but FC still fails to switch to fem wb - now error message is
Code: Select all
/opt/netgen/lib/liboccvis.so: undefined symbol: _ZN6netgen25SelectFaceInOCCDialogTreeEi
... and apparently liboccvis does not know, how to load netgen lib for that symbol.
So I guess, this is a cmake issue.
I don't know, how to proceed