aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-10-29 10:27:08 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-10-29 10:27:08 -0400
commit0f982e7efcf0a1eb1e3b8054206ad940cd3e2ea4 (patch)
treea39fef5ed55667e898bd224a97571954e46a09c0
parenta53e0ecf6d3e5d3bb3ca32fa800f9eb17ff8ba1e (diff)
downloadclp_fortran-0f982e7efcf0a1eb1e3b8054206ad940cd3e2ea4.tar.gz
clp_fortran-0f982e7efcf0a1eb1e3b8054206ad940cd3e2ea4.zip
Added projects for building and using DLLs for Clp
-rw-r--r--.gitignore12
-rw-r--r--clp-dll/README.md41
-rw-r--r--clp-example-using-dlls.prj78
-rw-r--r--libClpFortran.dll.prj85
4 files changed, 216 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..69c66d8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,12 @@
+*.a
+*.lib
+*.dll
+*.def
+*.exe
+
+modules
+build
+example
+
+Makefile.*
+Makefile
diff --git a/clp-dll/README.md b/clp-dll/README.md
new file mode 100644
index 0000000..5e15171
--- /dev/null
+++ b/clp-dll/README.md
@@ -0,0 +1,41 @@
+# Using Pre-Build Clp Libraries
+
+The COIN Linear Programming libraries are distributed as Windows DLLs that have been compiled using Microsoft's tools. The resultant distributions can be used with modern GNU Compiler tools in the MinGW64 toolchain, including the compilers shipped with Simply Fortran. The following documents the necessary steps to deploy and use these prebuilt libraries.
+
+## Acquiring COIN Linear Programming binaries
+
+The binaries for the Clp library and required dependencies can be downloaded from:
+
+https://bintray.com/coin-or/download/Cbc
+
+The page lists multiple builds corresponding to different platforms and compiler versions. For simplicity and interoperability, the proper archive to download for Windows 10 64-bit is:
+
+**Cbc-refactor-win64-msvc16-md.zip**
+
+The version of the compiler (*msvc16*) does help indicate on what versions of Windows the libraries will work. If Windows 7 compatibility is necessary, an older archive (*msvc14*) might be superior.
+
+## Extract the Necessary Files
+
+To use the DLLs, we will need to pull three things from the downloaded archive:
+
+ * The DLLs themselves
+ * Additional DLLs that provide dependencies
+ * The static libraries for linking purposes
+
+Within the archive, there will be four directories and some additional text files. To use Clp, the following files should be copied *into this directory* such that they can be used with the example Simply Fortran project:
+
+ bin\Clp-0.dll
+ bin\CoinUtils-0.dll
+ bin\coinasl-2.dll
+ bin\coinglpk-40.dll
+ lib\Clp.dll.lib
+ lib\CoinUtils.dll.lib
+
+The files *Clp-0.dll* and *CoinUtils-0.dll* are the base libraries implementing Clp. These DLLs, in turn, depend on *coinasl-2.dll* and *coinglpk-40.dll* at runtime. All four DLLs must be in the same directory as any executale that is using them.
+
+The files *Clp.dll.lib* and *CoinUtils.dll.lib* are static libraries providing the necessary linking interface to these DLLs. The libraries are Microsoft-format, but modern GNU tools, including those shipped with Simply Fortran, can link against this format without any changes.
+
+The above are the only files necessary for compiling and linking against the COIN Linear Programming library from Fortran. If using C/C++ is planned, the corresponding header files would also be necessary.
+
+## Compiling the Clp-Fortran Interface
+
diff --git a/clp-example-using-dlls.prj b/clp-example-using-dlls.prj
new file mode 100644
index 0000000..539c1dc
--- /dev/null
+++ b/clp-example-using-dlls.prj
@@ -0,0 +1,78 @@
+{
+ "Root":{
+ "Folders":[{
+ "Folders":[],
+ "Name":"+deps",
+ "Files":[{
+ "filename":".\\libClpFortran.dll.prj",
+ "enabled":"1"
+ }]
+ },{
+ "Folders":[],
+ "Name":"+src",
+ "Files":[{
+ "filename":".\\src\\main.f90",
+ "enabled":"1",
+ "panel":1,
+ "open":"1"
+ }]
+ }],
+ "Name":"+clp-example-using-dlls (clp-dll\\example.exe)",
+ "Files":[]
+ },
+ "Name":"clp-example-using-dlls (clp-dll/example.exe)",
+ "Options":{
+ "Compiler Options":{
+ "Fortran Flags":"",
+ "Link Flags":"clp-dll\\libClpFortran.dll.a clp-dll\\Clp.dll.lib clp-dll\\CoinUtils.dll.lib",
+ "C Flags":""
+ },
+ "Architecture":1,
+ "Type":0,
+ "Revision":2,
+ "Windows GUI":0,
+ "File Options":{
+ "Library Directories":["Default Add-On Directory"],
+ "Build Directory":"example\\build",
+ "Module Directory":"example\\modules",
+ "Include Directories":["Default Add-On Include Directory","clp-dll/modules"]
+ },
+ "Target":"clp-dll\\example.exe",
+ "Fortran Options":{
+ "Use C Preprocessor":"false",
+ "Runtime Diagnostics":"false",
+ "Cray Pointers":"false",
+ "Enable Coarrays":"false",
+ "Enable OpenMP":"false",
+ "Initialize Variables to Zero":"false",
+ "Default Double for Real":"false"
+ },
+ "Code Generation Options":{
+ "CPU Specific":"false",
+ "Processor":"generic",
+ "Aggressive Loops":"false",
+ "Debugging":"true",
+ "Optimization Mode":0,
+ "Floating Point Trap":"false",
+ "Profiling":"false"
+ },
+ "Build Dependencies":1,
+ "Launch Options":{
+ "Working Directory":"",
+ "Launch Using MPI":"false",
+ "Keep Console":"true",
+ "External Console":"false",
+ "Command Line Arguments":"",
+ "Build Before Launch":"true"
+ },
+ "Build Options":{
+ "Makefile":"Makefile.example",
+ "Auto Makefile":"true"
+ },
+ "Linker Options":{
+ "Static Linking Mode":7,
+ "Link MPI Library":"false",
+ "Link LAPACK":0
+ }
+ }
+} \ No newline at end of file
diff --git a/libClpFortran.dll.prj b/libClpFortran.dll.prj
new file mode 100644
index 0000000..a004f9f
--- /dev/null
+++ b/libClpFortran.dll.prj
@@ -0,0 +1,85 @@
+{
+ "Root":{
+ "Folders":[{
+ "Folders":[],
+ "Name":"+src",
+ "Files":[{
+ "filename":".\\src\\clp.f90",
+ "enabled":"1",
+ "panel":1,
+ "open":"1"
+ },{
+ "filename":".\\src\\clp_constants.F90",
+ "enabled":"1",
+ "panel":1,
+ "open":"1"
+ },{
+ "filename":".\\src\\clp_interface_utils.f90",
+ "enabled":"1",
+ "panel":1,
+ "open":"1"
+ },{
+ "filename":".\\src\\clp_types.f90",
+ "enabled":"1"
+ }]
+ }],
+ "Name":"+libClpFortran.dll (clp-dll\\libClpFortran.dll)",
+ "Files":[]
+ },
+ "Name":"libClpFortran.dll (clp-dll/libClpFortran.dll)",
+ "Options":{
+ "Compiler Options":{
+ "Fortran Flags":"",
+ "Link Flags":"clp-dll\\Clp.dll.lib clp-dll\\CoinUtils.dll.lib",
+ "C Flags":""
+ },
+ "Architecture":1,
+ "Type":1,
+ "Revision":2,
+ "Windows GUI":0,
+ "File Options":{
+ "Library Directories":["Default Add-On Directory"],
+ "Build Directory":"build",
+ "Module Directory":"clp-dll\\modules",
+ "Include Directories":["Default Add-On Include Directory"]
+ },
+ "Target":"clp-dll\\libClpFortran.dll",
+ "Fortran Options":{
+ "Use C Preprocessor":"false",
+ "Runtime Diagnostics":"false",
+ "Cray Pointers":"false",
+ "Enable Coarrays":"false",
+ "Enable OpenMP":"false",
+ "Initialize Variables to Zero":"false",
+ "Default Double for Real":"false"
+ },
+ "Code Generation Options":{
+ "CPU Specific":"false",
+ "Processor":"generic",
+ "Aggressive Loops":"false",
+ "Debugging":"true",
+ "Optimization Mode":0,
+ "Floating Point Trap":"false",
+ "Profiling":"false"
+ },
+ "Build Dependencies":1,
+ "Launch Options":{
+ "Working Directory":"",
+ "Launch Using MPI":"false",
+ "Keep Console":"true",
+ "External Console":"false",
+ "Command Line Arguments":"",
+ "Build Before Launch":"true"
+ },
+ "Build Options":{
+ "Makefile":"Makefile",
+ "Auto Makefile":"true"
+ },
+ "Linker Options":{
+ "Static Linking Mode":7,
+ "Link MPI Library":"false",
+ "Build Import Library":"true",
+ "Link LAPACK":0
+ }
+ }
+} \ No newline at end of file