2022.04: insert version you are using (i.e. 2021.11) Windows 10: insert platform, incl. version (i.e. Ubuntu 20.04)
**Can not find the definition of CubitInterface::init() when compiling /Coreform Cubit 2022.4/examples/CubitLib/main.cpp through Visual Studio 2022 on windows 10 *
I want to integrate coreform cubit into my C++ code to do mesh generation without Cubit GUI. Where is Cubit API lib? How to link Cubit API library to my C++ code? *
There is an include directory in the Cubit install that includes the headers for the Cubit SDK. There is also a directory of documentation in docs/Cubit-SDK.
We use the open source tool cmake, CMake, for our build system. The document
[Coreform-Cubit: How to Create a Plugin](file:///C:/Program%20Files/Coreform%20Cubit%202022.4/docs/Cubit-SDK/cubit_plugins.html) gives a sample cmake file that shows how to add the link libraries that are located in the bin folder.
Right, as Karl said you need to use cmake to link the libraries. Specifically you need two calls in that CMake file, find_package( Cubit REQUIRED CONFIG) and target_link_libraries(<Name of your library or executable> cubiti cubit_util). Both of these calls are illustrated in the examples/CubitLib/CMakeLists.txt. Because you’re on Windows, be sure that the bin directory of the Cubit installation is in the PATH environment variable when you compile and run your code.