Building native windows DLL
Dear all,
What is the current status with respect to building dolfin natively on Windows (preferably with the MSVC compilers, but possibly with the Intel compilers)? I.e., for the purpose of linking native windows binaries that do not depend on the MinGW libraries.
Is it currently possible? If it is not, do you have a rough idea about the amount of work needed to add a native WIN32 build target? For example, are there parts of the code the contain Unix-specific idioms?
Thanks very much in advance!
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
AFAIK, no one has attempted this with the current CMake build system in DOLFIN. That said, I don't see any reason it shouldn't work. If you decide to try it out, we would very much like to hear the result. And don't hesitate to ask us if you are stuck at some point. We might be able to help.
Revision history for this message
|
#2 |
I gave this a try and I am stuck with the error below. I noticed that when compiling Armadillo with Visual Studio 2010 armadillo.dll is generated but armadillo.lib is not. Mayble that's the problem but any idea is welcome.
Thanks,
Chaffra
Performing C++ SOURCE FILE Test ARMADILLO_
Change Dir: E:/Fenics/
Run Build Command:
Microsoft (R) Build Engine Version 4.0.30319.1 [Microsoft .NET Framework, Version 4.0.30319.239] Copyright (C) Microsoft Corporation 2007. All rights reserved. Build started 12/12/2011 11:59:27 AM. Project "E:\Fenics\
Return value: 1
Source file was:
#include <armadillo>
using namespace arma;
int main()
{
int n = 20;
double h = 1.0/(n-1);
mat A(n, n);
vec b(n);
vec u(n);
double beta = 0.2;
double gamma = 1000;
A.fill(0.0);
b.fill(0.0);
double x; int i;
i = 0;
A(i, i) = 1;
b(i) = 0;
for (i=1; i<n-1; i++) {
x = (i-1)*h;
A(i, i-1) = 1; A(i, i) = -2; A(i, i+1) = 1;
b(i) = - h*h*gamma*
}
i = n-1; x = (i-1)*h;
A(i, i-1) = 2; A(i, i) = -2;
u = solve(A, b);
return 0;
}
Revision history for this message
|
#3 |
Yes, you will need to create an import library (.lib) for Armadillo.
Revision history for this message
|
#4 |
I'd like to reopen this problem. Has anyone made progress in compiling dolfin natively on windows? I am giving it a try again.
I compiled armadillo, cgal and umfpack successfully using visual studio 10. I can pass the ARMADILLO_
For CGAL I am getting the error
LINK : fatal error LNK1104: cannot open file 'CGAL-vc100-
The library is present but where do I need to check to see if cmake has the right path for it?
For UMFPACK I am getting the error:
(1) -> (Link target) -> E:\Fenics\
I know libumfpack.lib is valie because I can run the demo in suitsparse. Any idea for this one?
Thanks,
Chaffra
---cmake output---
UFC version: 2.0.5
Checking for package 'Armadillo'
A library with BLAS API found.
A library with BLAS API found.
A library with LAPACK API found.
Found SWIG: E:/src/
Checking for package 'AMD'
A library with BLAS API found.
Checking for package 'UMFPACK'
Checking for package 'AMD'
A library with BLAS API found.
Checking for package 'CHOLMOD'
Checking for package 'AMD'
A library with BLAS API found.
A library with BLAS API found.
A library with LAPACK API found.
ParMETIS could not be found/configured. (missing: PARMETIS_LIBRARIES PARMETIS_TEST_RUNS PARMETIS_
CHOLMOD could not be found. Be sure to set CHOLMOD_DIR. (missing: CHOLMOD_TEST_RUNS)
UMFPACK could not be found. Be sure to set UMFPACK_DIR. (missing: UMFPACK_TEST_RUNS)
Checking for package 'CHOLMOD'
Checking for package 'AMD'
A library with BLAS API found.
A library with BLAS API found.
A library with LAPACK API found.
ParMETIS could not be found/configured. (missing: PARMETIS_LIBRARIES PARMETIS_TEST_RUNS PARMETIS_
CHOLMOD could not be found. Be sure to set CHOLMOD_DIR. (missing: CHOLMOD_TEST_RUNS)
Checking for package 'CGAL'
CGAL could not be found. Be sure to set CGAL_DIR (missing: CGAL_TEST_RUNS) (Required is at least version "3.8")
checking for module 'cppunit'
package 'cppunit' not found
CPPUNIT could not be found. Be sure to set CPPUNIT_DIR. (missing: CPPUNIT_LIBRARIES CPPUNIT_
Checking for package 'Sphinx'
Could NOT find Sphinx (missing: SPHINX_EXECUTABLE SPHINX_VERSION_OK) (Required is at least version "1.0.7")
The following optional packages were found:
-------
(OK) ZLIB
(OK) PYTHON
The following optional packages were not enabled:
-------
(--) OPENMP
(--) MPI
(--) PETSC
(--) SLEPC
(--) TRILINOS
(--) MTL4
(--) PASTIX
(--) SCOTCH
(--) PARMETIS
(--) SPHINX
The following optional packages could not be found:
-------
(**) UMFPACK
(**) CHOLMOD
(**) CGAL
CMake Warning at CMakeLists.txt:610 (message):
Disabling generation of documentation because Sphinx is missing.
Configuring done
--cmake error log for CGAL--
Performing C++ SOURCE FILE Test CGAL_TEST_RUNS failed with the following output:
Change Dir: E:/Fenics/
Run Build Command:
Microsoft (R) Build Engine Version 4.0.30319.1 [Microsoft .NET Framework, Version 4.0.30319.269] Copyright (C) Microsoft Corporation 2007. All rights reserved. Build started 7/31/2012 9:25:19 AM. Project "E:\Fenics\
Return value: 1
Source file was:
Can you help with this problem?
Provide an answer of your own, or ask James Avery for more information if necessary.