kalininei / SuiteSparseWrap_cpp_cs

Simple wrapper libraries (cpp, c#) for SuiteSparse sparse matrix solvers. Linux and Windows build scripts are included.
6 stars 5 forks source link

i get alot of errors when compiling against vs 2017 #1

Open bigworld12 opened 6 years ago

bigworld12 commented 6 years ago

when building the "INSTALL" project with visual studio 2017 i get the following errors

image

and in the $(CMAKE_INSTALL_PREFIX) folder i get only one file "suitesparse_wrap.lib" which i don't think can be used i the c# wrapper

bigworld12 commented 6 years ago

also in "build\bin\Release" i only got these files image and when i try to run cpptest.exe it gives an error because it can't find "suitesparse_wrap.dll"

kalininei commented 6 years ago

You need to compile this program with vs2010.If you have a modern compiler you still can switch to older version.1) In solution explorer right click on projects (both cpptest and suitesparse_wrap)2) properties->general->platform toolset.3) choose "Visual Studio (v100)" Of course vs2010 should be available. I tested it with vs2017+vs2010Express on win7. After a successful build suitesparse_wrap.dll will appear in your bin/Release directory. 

borisal commented 6 years ago

Hi, I have Visual Studio 2017 Pro installed and don't have VS 2010 Express installed, so I don't see vs110 platform toolset. How should I approach it? Do I need to update dependent libraries under winlib ? Any advice will be appreciated.

Thanks

kalininei commented 6 years ago

I have updated project to include modern compilers support. See README. Hope this will help.

borisal commented 6 years ago

Thanks for your quick reply. I still have an issue unfortunately.

I already had VS C++ 2010 redistributable installed (when I tried to install it from your links it told me that I had a newer Microsoft Visual C++ 2010 Redistributable). I don't see vs110 under "Platform Toolset" in VS and get a linker error when I try to compile suitesparse_wrap.dll.

"Error LNK2038 mismatch detected for '_MSC_VER': value '1600' doesn't match value '1900' in suitesparse_wrap.obj suitesparse_wrap"

Thanks

kalininei commented 6 years ago

You don't need to change toolset or anything else with the new version of the package. Static linking is not needed too. suitesparse_wrap.dll is already compiled and placed to winlib so you should not build it.

Download new version and copy libs from winlib to your system PATH. Then try to compile SuiteSparseCSWrap or SuiteSparseCppVSWrap VS project. This should work. BTW, what language do you use?

borisal commented 6 years ago

Thanks a lot. All worked great. I was able to compile and run your SolverTest. I will use the wrapper for C#.