Compilation on Windows

Quaoar

Administrator
Staff member
Compilation on the Windows platform can be simplified by the help of a libpack. Prerequisites are as follows:
  • Visual Studio 2019.
  • OpenCascade 7.4.0 (Analysis Situs would not compile for the recent version of OpenCascade): https://gitlab.com/ssv/opencascade
  • VTK 8.2.
  • Other 3-rd parties are not that restricted in their versions, so you can use the most recent ones.
Here is the link to the libpack: https://analysissitus.org/files/libpacks/analysissitus-libpack-msvc2019.zip

Here is the CMake configuration that allows to build Analysis Situs GUI with the minimal set of dependencies (click on the image to enlarge):

1624004834048.png

There are some other juicy options, like building only the SDK libs, but let's start from the basics, and I'll expand on the possible options a bit later.
 
Last edited:

Quaoar

Administrator
Staff member
I made a fork for OpenCascade 7.4.0 with restored forward compatibility of BREP format (the BREP files stored in OpenCascade 7.5 won't open in OpenCascade 7.4 without any logical reason). Therefore, it's recommended to build Analysis Situs with this fork instead of the official 7.4.0: https://gitlab.com/ssv/opencascade
 

Quaoar

Administrator
Staff member
Also, Active Data 3-rd party is now eliminated (this Active Data framework is now a part of Analysis Situs). That should simplify a bit the compilation workflow. The more detailed release notes will be posted separately.
 

kavingp

Looking around for some CAD
HI Quaoar, Is there a way to build libraries for msvc2015 with C++14?
 
Last edited:

Quaoar

Administrator
Staff member
HI Quaoar, Is there a way to build libraries for msvc2015 with C++14?
Hello @kavingp

I haven't tried this for a while. The code uses optional and that's the only reason to have C++17. I think it's overkill though and it can be eliminated (although optionals are cool). I added a ticket for that: https://gitlab.com/ssv/AnalysisSitus/-/issues/117

It's planned for the next version (1.2) but hopefully, I can figure this out soon and update the master.
 

Quaoar

Administrator
Staff member
@kavingp I removed the C++17 requirement when the NetGen bridge is disabled (USE_NETGEN=off in cmake). You may want to try to compile master. Let me know if any problems remain, I do not have Visual Studio 2015 at hand.
 

jianbaoxia

CAD master
@Quaoar Hello Bro, I have compile Analysis Situs follow the requirements.
  • Visual Studio 2019.
  • OpenCascade 7.4.0 (Analysis Situs would not compile for the recent version of OpenCascade): https://gitlab.com/ssv/opencascade
  • VTK 8.2.
  • Other 3-rd parties are not that restricted in their versions, so you can use the most recent ones.
I success through Cmake, but when I build it in VS2019 with "RelWithDebInfo X64", I get some error:
1647173764824.png

It means the system can find the "setup" file. yes I set the package “setup” as the start project. I have no idea to set which project as start project.
And I have try to set other project, also can't access.
 

jianbaoxia

CAD master
@Quaoar Hello Bro, I have compile Analysis Situs follow the requirements.

I success through Cmake, but when I build it in VS2019 with "RelWithDebInfo X64", I get some error:
View attachment 208

It means the system can find the "setup" file. yes I set the package “setup” as the start project. I have no idea to set which project as start project.
And I have try to set other project, also can't access.
compile in window is easy, and the "asiExe" can be set as start project.
1647442007737.png
 

hello

Active CAD practitioner
I don't know why that is, please advise, thank you
 

Attachments

  • 1679648543999.png
    1679648543999.png
    97 KB · Views: 20

hello

Active CAD practitioner
Hello, the file you need to see is here. I compiled directly with CMake and just created the build folder to store the build files. I installed visual studio2019 for Windows and compiled open Casa De 7.4 with Qt version 5.14.2
 

Attachments

  • CMakeCache.txt
    14.8 KB · Views: 4

lbw

CAD practitioner
Hi,I have comliled analysisitus on windows by cmake,but when I generate the solution in VS2022.i click this circled file and enter into vs2022.
1679925176914.png
and I generate the solution.there are some errors,such as can not open source file "mobius/cascade.h" the error on 35th line of asiAlgo_AppSurfUtils.cpp
that mean i do not have the file?
1679924619488.png
 

Quaoar

Administrator
Staff member
Mobius is our NURBS lib (http://openmobius.org/) and it is optional (normally you do not need it except for some specific algorithms like B-spline surface fitting or fairing). What you spotted is a real problem, `master` branch is not currently compilable without Mobius. I'll make a quick fix in a few minutes and update you here.

Update: fixed in the commit 2207b7fdaae7fbf54a4635cc65429969ec9d71a9, you want to give it another try without Mobius.
 
Last edited:

hello

Active CAD practitioner
I also met a similar problem, but I did not understand the above reply. What should I do specifically?Thank you.
1679985497078.png
 

Quaoar

Administrator
Staff member
Try checking out the master branch again, this issue should have been fixed yesterday evening.
 

Lv_yuanxing

CAD practitioner
Hello, we have finished compiling and installing (via camke and VS for Windows), but there are problems when executing asiExe. What should I do? thank you

屏幕截图 2023-03-28 170747.png

The above Chinese meaning is:

Unable to locate program input point xxx on dynamic link library xxx.
 

Quaoar

Administrator
Staff member
How do you launch asiExe.exe? Right from the IDE (Visual Studio)? Or from the installation directory? Would it run from IDE if you set asiExe as a startup project?
 
Top