OpenSees Build with Win 10 and Visual Studio 2019 - Latest Experience

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
bariserkus
Posts: 4
Joined: Sun May 22, 2011 6:12 am
Location: Istanbul, Turkey

OpenSees Build with Win 10 and Visual Studio 2019 - Latest Experience

Post by bariserkus » Sat Nov 07, 2020 6:39 am

Hello,

There are couple of things I would like to get opinion on and provide my experience on while compiling tcl OPS with Windows 10 and Visual Studio 2019. This is as of today, which I cloned the OPS repo from Github just couple of days ago. So, some of the comments here may not be valid for the upcoming changes in the Github repo.

1. Is there a specific or suggested order of builds of the libraries and OpenSees.exe?

Based on the error I encountered, I ended up building the projects according to the following order:

- actor
- material
- element
- OpenSees

When I tried to build OpenSees directly, I found out that errors occur mostly in the above projects, so instead of directly going for OpenSees, I followed the above order of builds.

2. The _DLL issue similar to this one . What is the Solution Configuration option is used while compiling: Debug, Debug.DLL Build, Build.DLL? Do these options have smtg to do with the Runtime Library option in VC2019 (i.e., /MT, /MTd, /MD, /MDd). I understand that some variables related with Rayleigh Damping are defined based on the value of _DLL, which prevents successful build if correct options are not selected. I also 'more or less' understand the Run Time Lib options; how DLLs are called dynamically or integrated into the build statically depending on our selection. My question is what is the usual/suggested way of selecting these?

The way I solved the issue I had, I have built -actor, - material, - element with "Build" Solution Configuration. For OpenSees, both Build and Debug worked but Debug.DLL and Build.DLL configurations did not work. But the funny thing, the repo came with the Debug.DLL is selected by default. Also, OpenSees Project Runtime Lib option came with /MTd is selected but other projects have /MD selected. Is this normal?

3. There is an issue with the relative path of include folders if the build is done directly running VC from the search or start of Windows. Almost all the folder paths are defined with '..\..\..\' (except tcl folder, which is defined with the absolute path of C:\Program Files\tcl) This requires the starting folder of VC be in one of the project folders. So, what I did was I created a shortcut of VC2019, where I erased the "Start in" folder and placed this shortcut into the OpenSees project folder. This helped VC2019 find the include paths correctly. There were also two header files that were not found. I included the "..\..\..\SRC\element\PFEMElement" and 1..\..\..\OTHER\CSPARSE" folders to include those header files.

Of course I could have modified the include paths manually or ask VC2019 shortcut to start in one of the project folders, but these did not seem to be useful solutions. For tcl, I changed the path to C:\tcl, which I have on my computer.

What is the usual/proper way of starting VC2019 to get the paths correctly?

4. The ifconsol.lib files. I downloaded these files from here and placed under "..\OpenSees\Win64\lib" folder. Is this usual/suggested way of keeping these libs?

BTW, I got the OpenSees.exe finally ;) Now I am gonna head for the OpenSeesPy and probably go for Code::Blocks with msys2 + mingWG.
Baris Erkus, PhD, PE
Celik Construction Co.

mhscott
Posts: 872
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: OpenSees Build with Win 10 and Visual Studio 2019 - Latest Experience

Post by mhscott » Fri Nov 27, 2020 7:21 am

Thanks! I ran into similar issues recently with the OpenSees.exe compilation. I recorded the process, but haven't edited the video yet.

But here's a video on compiling openseespy.pyd https://youtu.be/l5-vJDZR_hA

bariserkus
Posts: 4
Joined: Sun May 22, 2011 6:12 am
Location: Istanbul, Turkey

Re: OpenSees Build with Win 10 and Visual Studio 2019 - Latest Experience

Post by bariserkus » Sat Nov 28, 2020 1:00 am

mhscott wrote:
Fri Nov 27, 2020 7:21 am
Thanks! I ran into similar issues recently with the OpenSees.exe compilation. I recorded the process, but haven't edited the video yet.

But here's a video on compiling openseespy.pyd https://youtu.be/l5-vJDZR_hA
Thanks Michael! I will look into the video.

While I find you here conveniently, can I ask these two questions ?:

1. Has there been any attempt to generate static or dynamics libraries of OpenSees classes (maybe without TCL + OpenSees Command Line classes)? It seems like I will be heading to C++ environment for programming rather than TCL or Python.

2. Is there a way to get rid of the spams in the forum? Looks ugly and not encouraging to new users.

Thanks again.
Baris Erkus, PhD, PE
Celik Construction Co.

mhscott
Posts: 872
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: OpenSees Build with Win 10 and Visual Studio 2019 - Latest Experience

Post by mhscott » Sat Nov 28, 2020 5:06 am

Here is a video: https://youtu.be/BLcY1w7a5Ec

1. Yes, you can compile libraries from OpenSees source code, without Tcl or Python
2. There is not a way to block spam as far as I know

Post Reply