Microsoft C++ Compiling and linking error during using Abaqus ODB Access with c++

64 views Asked by At

I'm going to using C++ to accessing an Abaqus output database. I'm using Ms Visual Studio 2022 and Abaqus 2023. This is my C++ code to open the odb file.

#include "pch.h"
#include <iostream>
typedef long long int64;
typedef unsigned long long uint64;


#include <odb_API.h>
#include <odb_String.h>
#include <odb_Repository.h>



int ABQmain(int argc, char** argv)
{
    std::cout << "\n\nHello from Visual Studio 2022\n\n";
    std::cout << "Initializing API" << std::endl;
    odb_initializeAPI();
    odb_String odbFilePath = "Job-DC-M-14.odb";

    try
    {
        odb_Odb& odb = openOdb(odbFilePath);

        odb.close();
    }
    catch (odb_BaseException& ex)
    {
        std::cout << "Exception message : " << ex.UserReport().CStr() << std::endl;
    }
    catch (const std::exception& ex)
    {
        std::cout << "Default Exception message : " << ex.what() << std::endl;
    }
    std::cout << "Hello World!\n";
    odb_finalizeAPI();

    return 0;
}

If I tried to compile the project from the Visual Studio environment, I encountered the following error

The code execution cannot proceed because ABAQSMABasCoreUtilis.dll was not found. Reinstall the program may fix this problem

ABAQSMABasCoreUtilis.dll was not found

I added the ABAQSMABasCoreUtilis.dll but it didn't work.

Also, if I used the make command in the Developer Command Prompt for VS 2022 environment, I encountered the following error.

LINK: fatal error LINK1104: cannot open file 'LIBIFCOREMD.LIB' Abaqus Error: Problem during Linking

fatal error

0

There are 0 answers