从C ++ DLL导出函数

时间:2016-03-01 01:24:46

标签: c++ dll dllexport

enter code here我试图从C ++ dll导出一个类。我将DLL_TEST_EXPORTS定义为宏并设置公共和私有函数和变量。我的问题是,是否将导出所有公共变量和函数,或者我是否必须执行其他操作才能导出它们?

dll_test.h

#ifdef  DLL_TEST_EXPORTS 
/*Enabled as "export" while compiling the dll project*/
#define DLLEXPORT __declspec(dllexport)  
#else
/*Enabled as "import" in the Client side for using already created dll file*/
#define DLLEXPORT __declspec(dllimport)  
#endif

class DLLEXPORT getWettedNodeForces{ 

private:
long int i, j, z, temp, k;
double Pmax, W, c, theta, R, c0, rho, P0, R2, tx, ty, tz, Angle, Vel, Vel1,   Vel2, Vel3, PT, PT1, Area, FT, T1, T2, T3, T4, T5, T6, tPmax, tV, test, yLow, yHigh, h;
double V1[3], V2[3], V3[3], V4[3], N[4], R3[3];


public:  
void getforce();    
int nodalForce.id; 
double nodalForce.x, nodalForce.y, nodalForce.z, wettedNodeForces;

};

0 个答案:

没有答案