libMesh / libmesh

libMesh github repository
http://libmesh.github.io
GNU Lesser General Public License v2.1
647 stars 285 forks source link

Cygwin compilation of libmesh -- linking issues to static library "libnetcdf" #1340

Open ghost opened 7 years ago

ghost commented 7 years ago

Hello: I would like to compile libmesh on Windows. I tried using Cygwin but got linking warnings related to linking to static library "libnetcdf." I set the LD_FLAG to -no-undefined and some of the warnings go away. But I go a lot of undefined reference errors. I am not familiar with the Unix makefile environment. Is there an option to make the libmesh link with static libraries or force netcdf to export appropriate interfaces? Or better yet, do you have a MSVC project?

Thanks

jwpeterson commented 7 years ago

I would like to compile libmesh on Windows.

Hi, unfortunately we don't really put any effort into Windows/Cygwin support.

But I go a lot of undefined reference errors.

Hmm... I'm curious if you can you build netcdf by itself on your system, or if it's something wrong with our vendored version? You might also ask the netcdf developers for assistance.

Or better yet, do you have a MSVC project?

No, but you might have a look at the Windows Subsystem for Linux. We've had some success building and installing libmesh on Windows using that.

ghost commented 7 years ago

Thanks for your prompt response. I think the problem is that the flag the force the linker to export functions were not set in the netcdf makefile. Hence the linker generate a static library for netcdf and libmesh did not link to the static library.

Thanks,

Jide

From: John W. Peterson [mailto:notifications@github.com] Sent: Tuesday, May 9, 2017 10:47 AM To: libMesh/libmesh libmesh@noreply.github.com Cc: bkolade jide.kolade@gmail.com; Author author@noreply.github.com Subject: Re: [libMesh/libmesh] Cygwin compilation of libmesh -- linking issues to static library "libnetcdf" (#1340)

I would like to compile libmesh on Windows.

Hi, unfortunately we don't really put any effort into Windows/Cygwin support.

But I go a lot of undefined reference errors.

Hmm... I'm curious if you can you build netcdf by itself on your system, or if it's something wrong with our vendored version? You might also ask the netcdf developers for assistance.

Or better yet, do you have a MSVC project?

No, but you might have a look at the Windows Subsystem for Linux https://msdn.microsoft.com/en-us/commandline/wsl/install_guide . We've had some success building and installing libmesh on Windows using that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/libMesh/libmesh/issues/1340#issuecomment-300207354 , or mute the thread https://github.com/notifications/unsubscribe-auth/AXqnFcOLRbWY8IPmNvEZXga1u6RQNppKks5r4IqDgaJpZM4NVdT_ . https://github.com/notifications/beacon/AXqnFcMsBSG8BPFFlrR91GGddHNfdPakks5r4IqDgaJpZM4NVdT_.gif