I compiled the Analysis Situs library with cmake and introduced it into my Qt creator project. There is no problem in simply adding the header file of Analysis Situs library, and my project can run normally. However, as long as I use this library, my program will not run and Iwill be forced to quit.I suppose the problem lies behind the proper Qt Creator configuration - make sure you let this tool to know where VTK library (dlls, libs and includes) locates.
Whether the functions I write in this library are called or not, it will crash my program, why? Thank you for your answerI suppose the problem lies behind the proper Qt Creator configuration - make sure you let this tool to know where VTK library (dlls, libs and includes) locates.
The first picture is a screenshot of the file I imported into the pro file library, the second picture shows the code did not report errors but the program crashed, and the third picture I commented the code and the program was running againThere can be a plenty of reasons for application faulty. To be able to say something meaningful, we need more information - code snippets, stack trace, etc.
I used cmake to compile the generated VS project, which will start normally in the release environment, but not in the debug environment, as shown in the figure. I suspect that this is the cause of the previous problem, but I do not know how to solve itIf I were you, I would turn on the debugger and examined the code step by step to getting out what exactly the problematic place is. Have you tried to run your application in Debug mode?
I suspect there might be a mix of debug and release libraries in your configuration of ASitus. Double-check the paths to 3rd-party dependencies of ASitus which set up for Debug mode.
Which error could cause this problem? I only compiled the Asitus library with cmake. During the compilation process, I only created a build folder to save the generated files and did no other operations.I did the same thing as the picture below.I suspect there might be a mix of debug and release libraries in your configuration of ASitus. Double-check the paths to 3rd-party dependencies of ASitus which set up for Debug mode.
Sorry, I'm new here. I'm not sure I know what you mean. Can I compile the ASitus library and then call the functions of the ASitus and OCCT libraries? Alternatively, I would need to compile both libraries, but I could choose my own installed OCCT as the OCCT dependency when compiling the ASitus libraryYou are free to compile ASitus against OCCT version you need, for that CMAKE proposes the corresponding variable(s) pointing (3RDPARTY_OCCT_DIR) to the OCCT artifacts such as bins, libs and includes. It's normal practice to patch/customize OCCT and then use it for other projects backed on top of OCCT. ASitus is not an exception here. However, what is quite obvious, you can end up with the compilation errors which you'll need to take care of.
View attachment 643
Also keep your eyes open to that ASitus is based on OCCT v 7.6 (not v7.4) since some moment.