0

I have a C++ project, in .cpp file, I declared a struct, and now I want to export this struct (test) in .dll, so the Main program could call some functions in the struct, I only know how to export functions in the .cpp, but not struct object.

    // CtLibrary.cpp : Defines the exported functions for the DLL.
#include "pch.h" // use stdafx.h in Visual Studio 2017 and earlier
#include <utility>
#include <limits.h>
#include "CtLibrary.h"
#include <algorithm>
#include <vector>
#include <cmath>

struct Point {
    float _x, _y;
};
struct test {
    float a,b;
    float functions_1();
       {
          ...
        } 
     float functions_2();
       {
          ...
        } 
};

0 Answers0