Replies: 2 comments
-
|
So far I had no issues with fparser and MSVC I think. But Windows and MSVC are just a fractal PITA. I have not tries to build on Windows in a long while. I guess I have to get into that hell soon again... |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
After modifying fparser like this (and other changes to other things): diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e97475..9035aa0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,8 @@ if(APPLE AND NOT CMAKE_INSTALL_NAME_DIR)
set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
endif()
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
#set(HEADERS fparser.hh fpconfig.hh fptypes.hh)
set(SOURCES fparser.cc fpoptimizer.cc), it builds on Ubuntu/macOS/MSVC without using package managers: see https://github.com/dsa-t/openEMS-Project/actions/runs/13481863830 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
To build this project on MSVC I've had to apply this patch to fparser:
Then in
ExternalProject_Add( CSXCAD->CMAKE_ARGSadd:
-Dfparser_LIBRARIES=${CMAKE_INSTALL_PREFIX}/lib/fparser.libWhen I was specifying
-Dfparser_LIBRARIES=${CMAKE_INSTALL_PREFIX}/lib/fparser.dll, there was an error:fatal error LNK1107: invalid or corrupt file: cannot read at 0x360Is there a reason for fparser to be shared?
Is there a reason why MSVC gives this error when using the .dll?
Also
CSXCAD/CMakeLists.txtspecifiesNO_CMAKE_FIND_ROOT_PATHforfparser'sfind_library, so-Dfparser_LIBRARIES=must be specified.Is there a reason for that instead of using the cmake find path?
Beta Was this translation helpful? Give feedback.
All reactions