LNK2019 Verweiß auf nicht aufgelöstes Expernes Symbol



  • Hi all,

    habe das folgende Problem :

    Möchte eine dll für das Programm ADAMS erstellen.
    Das ganze sollte auch mit dem Code (siehe unten) funktionieren, aber der compiler (MS VS 2005 Express) schmeißt den folgenden Fehler raus :

    1>custom.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_c_impact" in Funktion "_Sfosub".
    1>custom.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_c_errmes" in Funktion "_Sfosub".
    1>custom.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_c_sysfnc" in Funktion "_Sfosub".

    Hier der Header :

    #ifndef SOLVER_C_UTILS_H
    #define SOLVER_C_UTILS_H
    
    /* fortran calls */
    #ifdef _WIN32
    #   define LINKDLL __declspec(dllexport)
    #   define STDCALL __stdcall
    #else
    #   define LINKDLL
    #   define STDCALL
    #endif
    
    #ifdef __cplusplus
    
    /*
     *   CONTACT:  User defined geometry engine interface      ---------------------------------------
     */
    typedef bool (*INITFUNC)    ( const char *units);
    typedef bool (*TERMFUNC)    ( int partI, int partR);
    typedef int  (*COLLIDEFUNC) ( int body1, double *locI, double rotI[3][3], int body2, double *locR, double rotJ[3][3], int *nCpts);
    typedef bool (*REPORTFUNC)  ( int index, double *ptI, double *nI, double *ptR, double *nR, double *contactArea, double *effectiveRadius );
    typedef bool (*REPORTFREEFUNC)  ( int body1, int body2);
    
    /*
     *   CONTACT:  Utility function interface      ---------------------------------------
     */
    typedef void (*PLUGINFUNC) (void);
    typedef bool (*REPORTSMPFUNC) ( int body1, int body2, int index, double *ptI, double *nI, double *ptR, double *nR, double *contactArea, double *effectiveRadius );
    typedef bool (*REPORTFLXFUNC) ( int body1, int body2, int index, int *numNodesI, int **nodeI, double **penI, int *numNodesR, int **nodeR, double **penR );
    typedef bool (*GETTRIFUNC) ( int body1, int body2, int index, int *numTrisI, int **triI, int *numTrisJ, int **triJ );
    typedef int (*SETPARAMFUNC) (const char *parameter, double *values);
    typedef int (*GETPARAMFUNC) (const char *parameter, double *values);
    typedef void (*FACETINGTOLERANCE)(double tol);
    typedef double (*FFFUNC) ( int parentId, const double xdot, const double xdotdot, const double nForce);
    typedef double (*USERFFFUNC) ( int parentId, const int nPar, const double *pPars, const double xdot, const double xdotdot, const double nForce);
    typedef double (*DFFDGDOTFUNC) ( int parentId, const double xdot, const double xdotdot, const double dnForce );
    typedef double (*DFFDTVFUNC) ( int parentId, const double xdot, const double xdotdot, const double nForce );
    typedef double (*NFFUNC) ( int parentId, const double gap, const double gapdot, double gapdotdot);
    typedef double (*DNFDGDOTFUNC) ( int parentId, const double gap, const double gapdot, double gapdotdot );
    typedef double (*DTFUNC) (void);
    typedef int (*SPHCOLLIDEFUNC) ( int sph, double R, double *Center, double *locI, double rotI[3][3], int body2, double *locR, double rotJ[3][3], int *nCpts );
    typedef int (*ELLCOLLIDEFUNC) ( int sph, double *Center, double* AxX, double* AxY, double* AxZ, double *locI, double rotI[3][3], int body2, double *locR, double rotJ[3][3], int *nCpts );
    typedef int (*FRUCOLLIDEFUNC) ( int sph, double *Center, double* AxZ, double bR, double tR, double hight, double *locI, double rotI[3][3], int body2, double *locR, double rotJ[3][3], int *nCpts );
    typedef int (*BOXCOLLIDEFUNC) ( int sph, double *Center, double* AxX, double* AxY, double* AxZ, double *locI, double rotI[3][3], int body2, double *locR, double rotJ[3][3], int *nCpts );
    typedef void (*CURVEFUNC)(int Id, void* Data, double alpha, int iOrd, double* Values);
    typedef void (*SURFFUNC)(int Id, void* Data, double* alpha, int* iOrd, double* Values, int* iErr);
    typedef bool (*THREADSAFEFUNC)(void);
    typedef int (*CRBOXFUNC) (double diag[3]);
    typedef int (*CRSPHFUNC) (double radius);
    typedef int (*CRCYLFUNC) (double radius, double height, double angle);
    typedef int (*CRELLFUNC) (double rx, double ry, double rz);
    typedef int (*CRFRUFUNC) (double top_rad, double base_rad, double height, double angle);
    typedef int (*CRTORFUNC) (double major_rad, double minor_rad);
    typedef int (*CREXTFUNC) (const char *fileName, const char *partName, const char *elementName, int *errFlag);
    typedef int (*CRSURFUNC) (const char *fileName, const char *partName, const char *elementName, const double *u_min, const double *u_max, const double *v_min, const double *v_max, const int *u_closed, const int *v_closed, int *errFlag);
    typedef int (*CRTESFUNC) (int id, int numVerts, const double *vertices, int numTris, const int *indices, int *errFlag);
    typedef int (*GETVERFUNC) (int tag, int *numVerts, double* vertices, int *numTris, int* indices, int* error_code);
    typedef int (*GETVERFUNC2) (const char *filename, const char *part_name, const char *element_name, int *numVerts, double* vertices, int *numTris, int* indices, int* error_code);
    typedef int (*SETVERFUNC) (int tag, int numVerts, const double* vertices, int* error_code);
    typedef int (*OBBFUNC) (int tag, int* error_code);
    typedef int (*MAXBBFUNC) (int tag, double* maxd, int* error_code);
    #endif
    
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    /*
     * Structures for c user subroutines
     */
    struct sAdamsContact
    {
       int ID;
       int nIGEOM;
       int nJGEOM;
       int* IGEOM;
       int* JGEOM;
       int* IFLIP_GEOM;
       int* JFLIP_GEOM;
    };
    struct sAdamsContactFriction
    {
       struct sAdamsContact contact;
       int NPAR;
       const double* PAR;
    };
    /*
     *   CONTROL        ------------------------------------------------------------------------------
     */
    struct sAdamsControl
    {
       int NPAR;
       const double* PAR;
    };
    
    /*
     *   COUPLER        ------------------------------------------------------------------------------
     */
    struct sAdamsCoupler
    {
       int ID;
       int NPAR;
       const double* PAR;
       int NJOINT;
       int JOINTS[3];
       char TYPE[3];
    };
    
    /*
     *   CURVE          ------------------------------------------------------------------------------
     */
    struct sAdamsCurve
    {
       int ID;
       int NPAR;
       const double* PAR;
       int CLOSED;
       int ORDER;
       double MINPAR;
       double MAXPAR;
    };
    
    /*
     *   DIFF           ------------------------------------------------------------------------------
     */
    
    struct sAdamsDiff
    {
       int ID;
       int NPAR;
       const double* PAR;
       int STATIC_HOLD;
       int IMPLICIT;
       double IC_R1;
       double IC_R2;
    };
    
    /*
     *   FLEX_BODY      ------------------------------------------------------------------------------
     */
    struct sAdamsFlexBody
    {
       int ID;
       /* int NMAT;
       const int* MATRICES;
       int VM;
       int WM; */
    };
    struct sAdamsCratio
    {
       struct sAdamsFlexBody FlexBody;
       int NPAR;
       const double* PAR;
    };
    
    /*
     *   FIELD          ------------------------------------------------------------------------------
     */
    struct sAdamsField
    {
       int ID;
       int NPAR;
       const double* PAR;
       int I;
       int J;
    };
    
    /*
     *   GFORCE         ------------------------------------------------------------------------------
     */
    struct sAdamsGforce
    {
       int ID;
       int NPAR;
       const double* PAR;
       int I;
       int RM;
       int JFLOAT;
    };
    
    /*
     *   GSE            ------------------------------------------------------------------------------
     */
    struct sAdamsGSE
    {
       int ID;
       int NPAR;
       const double* PAR;
       int NI;
       int NO;
       int U;
       int Y;
       int NS;
       int X;
       int IC;
       int STATIC_HOLD;
       int IMPLICIT;
       int ND;
       int XD;
       int ICD;
       double SAMPLE_OFFSET;
    };
    
    /*
     *   EXTSYS         ------------------------------------------------------------------------------
     */
    struct sAdamsEXTSYS
    {
       int ID;
       int NPAR;
       const double* PAR;
       int NI;
       int NO;
       int U;
       int Y;
       int NS;
       int X;
       int IC;
       int STATIC_HOLD;
       int IMPLICIT;
       int ND;
       int XD;
       int ICD;
       double SAMPLE_OFFSET;
    };
    
    /*
     *   MFORCE         ------------------------------------------------------------------------------
     */
    struct sAdamsMforce
    {
       struct sAdamsFlexBody FlexBody;
       int ID;
       int NPAR;
       const double* PAR;
       int JFLOAT;
    };
    
    /*
     *   MOTION         ------------------------------------------------------------------------------
     */
    
    struct sAdamsMotion
    {
       int ID;
       int NPAR;
       const double* PAR;
       int JOINT;
       const char* Type;
       int I;
       int J;
       char Which[2];
       const char* DVA;
    };
    
    /*
     *   REQUEST        ------------------------------------------------------------------------------
     */
    struct sAdamsRequest
    {
       int ID;
       int NPAR;
       const double* PAR;
       const char* COMMENT;
       const char* TITLE[8];
    };
    
    /*
     *   SENSOR         ------------------------------------------------------------------------------
    
    struct sAdamsSensorEval
    {
       int NPAR;
       const double* PAR;
    };
    */
    struct sAdamsSensor
    {
       int ID;
       int NPAR;
       const double* PAR;
       double VALUE;
       double Error;
       char Logic[2];
       /* struct sAdamsSensorEval Eval; */
    };
    
    /*
     *   SFORCE         ------------------------------------------------------------------------------
     */
    struct sAdamsSforce
    {
       int ID;
       int NPAR;
       const double* PAR;
       int I;
       int J;
       int ACTION_ONLY;
       const char* Type;
    };
    
    /*
     *   SPLINE         ------------------------------------------------------------------------------
     */
    struct sAdamsSpline
    {
       int ID;
       const char* FILENAME;
       const char* BLOCKNAME;
    
    };
    
    /*
     *   SURFACE        ------------------------------------------------------------------------------
     */
    struct sAdamsSurface
    {
       int ID;
       int NPAR;
       const double* PAR;
       /* const char* FILENAME; */
       int ORDER[2];
       int CLOSED[2];
       double MINPAR[2];
       double MAXPAR[2];
    };
    
    /*
     *   VARIABLE       ------------------------------------------------------------------------------
     */
    struct sAdamsVariable
    {
       int ID;
       int NPAR;
       const double* PAR;
       double IC;
    };
    
    /*
     *   VFORCE         ------------------------------------------------------------------------------
     */
    struct sAdamsVforce
    {
       int ID;
       int NPAR;
       const double* PAR;
       int I;
       int JFLOAT;
       int RM;
    };
    
    /*
     *   VTORQUE        ------------------------------------------------------------------------------
     */
    struct sAdamsVtorque
    {
       int ID;
       int NPAR;
       const double* PAR;
       int I;
       int JFLOAT;
       int RM;
    };
    
    /*
     * End Structures
     */
    
    /*
     *   CONTACT        ------------------------------------------------------------------------------
     */
    typedef void adams_c_CFFSUB(const struct sAdamsContactFriction* fric, double TIME, const double* LOCI, const double* LOCJ, const double* X, const double* XDOT, double NFORCE, double AREA, int DFLAG, int IFLAG, double* VALUES );
    typedef void STDCALL adams_f77_CFFSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const double* LOCI, const double* LOCJ, const double* X, const double* XDOT, const double* NFORCE, const double* AREA, const int* DFLAG, const int* IFLAG, double* VALUES );
    
    typedef void adams_c_CNFSUB(const struct sAdamsContactFriction* fric, double TIME, const double* LOCI, const double* NI, const double* LOCJ, const double* NJ, double GAP, double GAPDOT, double GAPDOTDOT, double AREA, int DFLAG, int IFLAG, double* VALUES );
    typedef void STDCALL adams_f77_CNFSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const double* LOCI, const double* NI, const double* LOCJ, const double* NJ, const double* GAP, const double* GAPDOT, const double* GAPDOTDOT, const double* AREA, const int* DFLAG, const int* IFLAG, double* VALUES );
    /*
     *   DIFF           ------------------------------------------------------------------------------
     */
    typedef void adams_c_DIFSUB(const struct sAdamsDiff* diff, double TIME, int DFLAG, int IFLAG, double* RESULT);
    
    typedef void STDCALL adams_f77_DIFSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* DFLAG, const int* IFLAG, double* RESULT);
    /*
     *   GFORCE         ------------------------------------------------------------------------------
     */
    typedef void adams_c_GFOSUB(const struct sAdamsGforce* gfo, double TIME, int DFLAG, int IFLAG, double* RESULT);
    typedef void STDCALL adams_f77_GFOSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* DFLAG, const int* IFLAG, double* RESULT);
    /*
     *   MOTION         ------------------------------------------------------------------------------
     */
    typedef void adams_c_MOTSUB(const struct sAdamsMotion* motion, double TIME, int DFLAG, int IFLAG, double* RESULT);
    
    typedef void STDCALL adams_f77_MOTSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* DFLAG, const int* IFLAG, double* RESULT);
    /*
     *   SFORCE         ------------------------------------------------------------------------------
     */
    typedef void adams_c_SFOSUB(const struct sAdamsSforce* sforce, double TIME, int DFLAG, int IFLAG, double* RESULT);
    
    typedef void STDCALL adams_f77_SFOSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* DFLAG, const int* IFLAG, double* RESULT);
    /*
     *   VARIABLE       ------------------------------------------------------------------------------
     */
    typedef void adams_c_VARSUB(const struct sAdamsVariable* variable, double TIME, int DFLAG, int IFLAG, double* RESULT);
    
    typedef void STDCALL adams_f77_VARSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* DFLAG, const int* IFLAG, double* RESULT);
    /*
     *   VFORCE         ------------------------------------------------------------------------------
     */
    typedef void adams_c_VFOSUB(const struct sAdamsVforce* vfo, double TIME, int DFLAG, int IFLAG, double* RESULT);
    typedef void STDCALL adams_f77_VFOSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* DFLAG, const int* IFLAG, double* RESULT);
    /*
     *   VTORQUE        ------------------------------------------------------------------------------
     */
    typedef void adams_c_VTOSUB(const struct sAdamsVtorque* vto, double TIME, int DFLAG, int IFLAG, double* RESULT);
    typedef void STDCALL adams_f77_VTOSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* DFLAG, const int* IFLAG, double* RESULT);
    /*
     *   CURVE          ------------------------------------------------------------------------------
     */
    typedef void adams_c_CURSUB(const struct sAdamsCurve* crv, double ALPHA, int IORD, int IFLAG, double* VALUES  );
    typedef void STDCALL adams_f77_CURSUB(const int* ID, const double* PAR, const int* NPAR, const double* ALPHA, const int* IORD, const int* IFLAG, double*  VALUES  );
    /*
     *   SURFACE        ------------------------------------------------------------------------------
     */
    typedef void adams_c_SURSUB(const struct sAdamsSurface* srf, double ALPHA, double BETA, int IORD, int IFLAG, double* VALUES, int* IERR  );
    typedef void STDCALL adams_f77_SURSUB(const int* ID, const double* PAR, const int* NPAR, const double* ALPHA, const double* BETA, const int* IORD, const int* IFLAG, double*  VALUES, int* IERR  );
    /*
     *   REQUEST        ------------------------------------------------------------------------------
     */
    typedef void adams_c_REQSUB(const struct sAdamsRequest* req, double TIME, int IFLAG, double* OUTPUT);
    typedef void STDCALL adams_f77_REQSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* IFLAG, double* OUTPUT);
    /*
     *   SENSOR         ------------------------------------------------------------------------------
     */
    typedef void adams_c_SENSUB(const struct sAdamsSensor* sensor, double TIME, int IFLAG, double* OUTPUT);
    typedef void adams_c_SEVSUB(const struct sAdamsSensor* sensor, double TIME, int IFLAG, double* OUTPUT);
    
    typedef void STDCALL adams_f77_SENSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* IFLAG, double* OUTPUT);
    typedef void STDCALL adams_f77_SEVSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* IFLAG, double* OUTPUT);
    /*
     *   FIELD          ------------------------------------------------------------------------------
     */
    typedef void adams_c_FIESUB(const struct sAdamsField* fie, double TIME, double* DISP, double* VELO, int DFLAG, int IFLAG,  double* FIELD, double* DFDDIS, double* DFDVEL);
    typedef void STDCALL adams_f77_FIESUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const double* DISP, const double* VELO, const int* DFLAG, const int* IFLAG, double* FIELD, double* DFDDIS, double* DFDVEL);
    /*
     *   CONTROL        ------------------------------------------------------------------------------
     */
    typedef void adams_c_CONSUB(const struct sAdamsControl* con);
    typedef void STDCALL adams_f77_CONSUB(const double* PAR, const int* NPAR);
    /*
     *   COUPLER        ------------------------------------------------------------------------------
     */
    typedef void adams_c_COUSUB(const struct sAdamsCoupler* coupler, double TIME, double*, int IFLAG, double* PHI);
    typedef void adams_c_COUXX(const struct sAdamsCoupler* coupler, double TIME, double*, int IFLAG, double* dFda);
    typedef void adams_c_COUXX2(const struct sAdamsCoupler* coupler, double TIME, double*, int IFLAG, double* d2Fda2);
    typedef void STDCALL adams_f77_COUSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, double* DISP, const int* NDISP, const int* IFLAG, double* F);
    typedef void STDCALL adams_f77_COUXX(const int* ID, const double* TIME, const double* PAR, const int* NPAR, double* DISP, const int* NDISP, const int* IFLAG, double* dFda);
    typedef void STDCALL adams_f77_COUXX2(const int* ID, const double* TIME, const double* PAR, const int* NPAR, double* DISP, const int* NDISP, const int* IFLAG, double* d2Fda2);
    /*
     *   GSE            ------------------------------------------------------------------------------
     */
    typedef void adams_c_GSESUB(const struct sAdamsGSE* gse, double TIME, int DFLAG, int IFLAG, int NSTATE, const double* STATES, int NINPUT, const double* INPUTS, int NPUTPUT, double* STATED, double* OUTPUT);
    typedef void adams_c_GSEXU(const struct sAdamsGSE* gse, double TIME, int IFLAG, int NSTATE, const double* STATES, int NINPUT, const double* INPUTS, int NOUTPUTS, double* DERIVS);
    typedef void adams_c_GSEXX(const struct sAdamsGSE* gse, double TIME, int IFLAG, int NSTATE, const double* STATES, int NINPUT, const double* INPUTS, int NOUTPUTS, double* DERIVS);
    typedef void adams_c_GSEYU(const struct sAdamsGSE* gse, double TIME, int IFLAG, int NSTATE, const double* STATES, int NINPUT, const double* INPUTS, int NOUTPUTS, double* DERIVS);
    typedef void adams_c_GSEYX(const struct sAdamsGSE* gse, double TIME, int IFLAG, int NSTATE, const double* STATES, int NINPUT, const double* INPUTS, int NOUTPUTS, double* DERIVS);
    typedef void STDCALL adams_f77_GSESUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* DFLAG, const int* IFLAG, const int* NSTATE, const double* STATES, const int* NINPUT, const double* INPUTS, const int* NOUTPUT, double* STATED, double* OUTPUT);
    typedef void STDCALL adams_f77_GSEXU(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* IFLAG, const int* NSTATE, const double* STATES, const int* NINPUT, const double* INPUTS, const int* NOUTPUTS, double* DERIVS);
    typedef void STDCALL adams_f77_GSEXX(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* IFLAG, const int* NSTATE, const double* STATES, const int* NINPUT, const double* INPUTS, const int* NOUTPUTS, double* DERIVS);
    typedef void STDCALL adams_f77_GSEYU(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* IFLAG, const int* NSTATE, const double* STATES, const int* NINPUT, const double* INPUTS, const int* NOUTPUTS, double* DERIVS);
    typedef void STDCALL adams_f77_GSEYX(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* IFLAG, const int* NSTATE, const double* STATES, const int* NINPUT, const double* INPUTS, const int* NOUTPUTS, double* DERIVS);
    
    typedef void adams_c_GSEDERIV(const struct sAdamsGSE* gse, double TIME, int DFLAG, int IFLAG, int, double*);
    typedef void adams_c_GSEOUTPUT(const struct sAdamsGSE* gse, double TIME, int DFLAG, int IFLAG, int, double*);
    typedef void adams_c_GSEUPDATE(const struct sAdamsGSE* gse, double TIME, int DFLAG, int IFLAG, int, double*);
    typedef void adams_c_GSESAMPLE(const struct sAdamsGSE* gse, double TIME, int IFLAG, double* OUTPUT);
    
    typedef void STDCALL adams_f77_GSEDERIV(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int*, const int*, const int*, double*);
    typedef void STDCALL adams_f77_GSEOUTPUT(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int*, const int*, const int*, double*);
    typedef void STDCALL adams_f77_GSEUPDATE(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int*, const int*, const int*, double*);
    typedef void STDCALL adams_f77_GSESAMPLE(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* IFLAG, double* OUTPUT);
    
    typedef void adams_c_GSESETNS(int NS, int* ERR);
    typedef void adams_c_GSESETND(int ND, int* ERR);
    typedef void adams_c_GSESETIMPLICIT(int FLAG, int* ERR);
    typedef void adams_c_GSESETSTATICHOLD(int FLAG, int* ERR);
    typedef void adams_c_GSESETSAMPLEOFFSET(int UNTNUM, double* LOGERR);
    
    typedef void STDCALL adams_f77_GSESETNS(int* NS, int* ERR);
    typedef void STDCALL adams_f77_GSESETND(int* ND, int* ERR);
    typedef void STDCALL adams_f77_GSESETIMPLICIT(int* FLAG, int* ERR);
    typedef void STDCALL adams_f77_GSESETSTATICHOLD(int* FLAG, int* ERR);
    typedef void STDCALL adams_f77_GSESETSAMPLEOFFSET(int* UNTNUM, double* LOGERR);
    
    /*
     *   EXTSYS         ------------------------------------------------------------------------------
     */
    typedef void adams_c_EXTSYSDERIV(const struct sAdamsEXTSYS* extsys, double TIME, int DFLAG, int IFLAG, int, double*);
    typedef void adams_c_EXTSYSOUTPUT(const struct sAdamsEXTSYS* extsys, double TIME, int DFLAG, int IFLAG, int, double*);
    typedef void adams_c_EXTSYSUPDATE(const struct sAdamsEXTSYS* extsys, double TIME, int DFLAG, int IFLAG, int, double*);
    typedef void adams_c_EXTSYSSAMPLE(const struct sAdamsEXTSYS* extsys, double TIME, int IFLAG, double* OUTPUT);
    
    typedef void STDCALL adams_f77_EXTSYSDERIV(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int*, const int*, const int*, double*);
    typedef void STDCALL adams_f77_EXTSYSOUTPUT(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int*, const int*, const int*, double*);
    typedef void STDCALL adams_f77_EXTSYSUPDATE(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int*, const int*, const int*, double*);
    typedef void STDCALL adams_f77_EXTSYSSAMPLE(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* IFLAG, double* OUTPUT);
    
    typedef void adams_c_EXTSYSSETNS(int NS, int* ERR);
    typedef void adams_c_EXTSYSSETND(int ND, int* ERR);
    typedef void adams_c_EXTSYSSETIMPLICIT(int FLAG, int* ERR);
    typedef void adams_c_EXTSYSSETSTATICHOLD(int FLAG, int* ERR);
    typedef void adams_c_EXTSYSSETSAMPLEOFFSET(int UNTNUM, double* LOGERR);
    
    typedef void STDCALL adams_f77_EXTSYSSETNS(int* NS, int* ERR);
    typedef void STDCALL adams_f77_EXTSYSSETND(int* ND, int* ERR);
    typedef void STDCALL adams_f77_EXTSYSSETIMPLICIT(int* FLAG, int* ERR);
    typedef void STDCALL adams_f77_EXTSYSSETSTATICHOLD(int* FLAG, int* ERR);
    typedef void STDCALL adams_f77_EXTSYSSETSAMPLEOFFSET(int* UNTNUM, double* LOGERR);
    
    /*
     *   FLEX_BODY      ------------------------------------------------------------------------------
     */
    typedef void adams_c_DMPSUB(const struct sAdamsCratio* flex, double TIME, const double* FREQS, int NMODE, double STEPSIZE, double* CRATIOS);
    typedef void STDCALL adams_f77_DMPSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const double* FREQS, const int* NMODE, const double* STEPSIZE, double* CRATIOS);
    /*
     *   MFORCE         ------------------------------------------------------------------------------
     */
    typedef void adams_c_MFOSUB(const struct sAdamsMforce* mforce, double TIME, int DFLAG, int IFLAG, const double* MODLOADS, int NMODES, int NCASES, double* SCALE, int* CASE, double* LOADVEC);
    
    typedef void STDCALL adams_f77_MFOSUB(const int* ID, const double* TIME, const double* PAR, const int* NPAR, const int* DFLAG, const int* IFLAG, const double* MODLOADS, const int* NMODS, const int* NCASES, double* SCALE, int* CASE, double* LOADVEC);
    /*
     *   SAVE/RELOAD    ------------------------------------------------------------------------------
     */
    typedef void adams_c_RELSUB(int IUNIT, int* IERR);
    typedef void adams_c_SAVSUB(int IUNIT, int* IERR);
    typedef void STDCALL adams_f77_RELSUB(const int* IUNIT, int* IERR);
    typedef void STDCALL adams_f77_SAVSUB(const int* IUNIT, int* IERR);
    /*
     *   SPLINE         ------------------------------------------------------------------------------
     */
    typedef void adams_c_SPLINE_READ(const struct sAdamsSpline* spline, int* IERR);
    #ifdef _WIN32
    typedef void STDCALL adams_f77_SPLINE_READ(const int* ID, const char* FILENAME, int l_FILENAME, const char* BLOCKNAME, int l_BLOCKNAME, int* IERR);
    #else
    typedef void STDCALL adams_f77_SPLINE_READ(const int* ID, const char* FILENAME, const char* BLOCKNAME, int* IERR, int l_FILENAME, int l_BLOCKNAME);
    #endif
    /*
     *   USER MESSAGE FILTER ????         ------------------------------------------------------------
     */
    /* USRMSGFLT. Only function to return an int */
    typedef int adams_c_USRMSGFLT(char*, char*);
    #ifdef _WIN32
    typedef int adams_f77_USRMSGFLT(char*, int, char*, int);
    #else
    typedef int adams_f77_USRMSGFLT(char*, char*, int, int);
    #endif
    
    /*=================================================================================================
     *
     *   UTILITY SUBROUTINES
     *
     *=================================================================================================
     */
    
    LINKDLL void c_adams_needs_partials(int *eval_jac);
    LINKDLL void c_adams_declare_threadsafe();
    LINKDLL void c_adams_smp_group(int groupid );
    
    LINKDLL int c_gse_ns();
    LINKDLL int c_gse_nd();
    LINKDLL int c_gse_ni();
    LINKDLL int c_gse_no();
    LINKDLL void c_gse_x(double* x, int ns);
    LINKDLL void c_gse_xd(double* xd, int nd);
    LINKDLL void c_gse_xdot(double* xdot, int ndot);
    LINKDLL void c_gse_u(double* u, int ni);
    LINKDLL void c_gsepar_x(const double* par_x, int size);
    LINKDLL void c_gsepar_xdot(const double* par_x, int size);
    LINKDLL void c_gsepar_u(const double* par_u, int size);
    LINKDLL void c_gsemap_x(int row, int col);
    LINKDLL void c_gsemap_xdot(int row, int col);
    LINKDLL void c_gsemap_u(int row, int col);
    
    LINKDLL int c_extsys_ns();
    LINKDLL int c_extsys_nd();
    LINKDLL int c_extsys_ni();
    LINKDLL int c_extsys_no();
    LINKDLL void c_extsys_x(double* x, int ns);
    LINKDLL void c_extsys_xd(double* xd, int nd);
    LINKDLL void c_extsys_xdot(double* xdot, int ndot);
    LINKDLL void c_extsys_u(double* u, int ni);
    LINKDLL void c_extsyspar_x(const double* par_x, int size);
    LINKDLL void c_extsyspar_xdot(const double* par_x, int size);
    LINKDLL void c_extsyspar_u(const double* par_u, int size);
    LINKDLL void c_extsysmap_x(int row, int col);
    LINKDLL void c_extsysmap_xdot(int row, int col);
    LINKDLL void c_extsysmap_u(int row, int col);
    LINKDLL void c_extsys_set_x_type(int index, int type);
    LINKDLL int c_extsys_get_x_type(int index);
    LINKDLL void c_set_gse_state_tolerance(int gse_id, int index, double tol, int *ierr);
    
    LINKDLL void c_body_mass_property(char *type, int *id, double *cm, double *mass, double *ip);
    LINKDLL void c_add_mass_property(double *cm, double *mass, double *ip, double *sum_cm, double *sum_mass, double *sum_ip);
    LINKDLL void c_subtract_mass_property(double *cm, double *mass, double *ip, double *sum_cm, double *sum_mass, double *sum_ip);
    
    LINKDLL void c_akispl(double xval, double zval, int id, int iord, double *array, int *errflg);
    LINKDLL void c_analys(const char *antype, const char *cid, double timbeg, double timend, int init, int *istat);
    LINKDLL void c_bistop(double x, double dxdt, double x1, double x2,  double k, double e,
    	      double cmax, double d, int iord, double *vec, int *errflg);
    LINKDLL void c_cheby(double x, double x0, const double *par, int npar, int iord, double *value, int *errflg);
    LINKDLL void c_cubspl(double xval, double zval, int id, int iord, double *array, int *errflg);
    LINKDLL void c_datout(int *istat);
    LINKDLL void c_errmes(int errflg, const char *mesage, int id, const char *endflg);
    LINKDLL void c_forcos(double x, double x0, double w,const double *par, int npar, int iord, double *value, int *errflg);
    LINKDLL void c_forsin(double x, double x0, double w,const double *par, int npar, int iord, double *value, int *errflg);
    LINKDLL void c_getcpu(double *value);
    LINKDLL void c_get_gravity(double *gx, double* gy, double* gz);
    LINKDLL void c_getinm(int *value);
    LINKDLL void c_getint(char *value);
    LINKDLL void c_getmod(int *mode);
    LINKDLL void c_getslv(char *value);
    LINKDLL void c_getstm(double *value);
    LINKDLL void c_getver(char *value);
    LINKDLL void c_gtaray(int id, double *array, int *number, int *istat);
    
    LINKDLL void c_get_matrix_info(int id, int *type, int *nrows, int *ncols, int *size, int *ierr);
    LINKDLL void c_get_sparse_matrix_data(int id, int* rows, int* cols, double* vals, int size, int* ierr);
    LINKDLL void c_get_full_matrix_data(int id, double* vals, int size, int* ierr);
    
    /* NOTE: For C the matrix c should be passed as a vector of
     *       minimum length = 36*nmid**2 and ndim = 6*nmid.
     *       The results will be returned column wise with
     *       iIndex = iRow + 6*iCol*nmid and c[iIndex] = c[iRow][iCol].
     */
    LINKDLL void c_gtcmat(int nmid, const int *mid, int ndim, double *c, int *istat);
    LINKDLL void c_gtcurv(int id, double alpha, int iord, double *array, int *istat);
    LINKDLL void c_gtunts(int *exists, double *scales, char *units );
    LINKDLL void c_gtstrg(int id, char *string, int *nchars, int *istat);
    LINKDLL void c_havsin(double x, double x0, double h0, double x1, double h1, int iord,
    	      double *value, int *errflg);
    LINKDLL void c_impact(double x, double dxdt, double x1, double k, double e, double cmax, double d,
                  int iord, double *vec, int *errflg);
    LINKDLL void c_istrng(int number, char *string, int *length, int *istat);
    LINKDLL void c_modify(const char *comand, int *istat);
    LINKDLL void c_poly(double x, double x0, const double *par, int npar, int iord,
    	    double *value, int *errflg);
    LINKDLL void c_put_spline(int id, int nxvals, int nzvals, const double *xvals, const double *yvals, const double *zvals, int *errflg);
    LINKDLL void c_rcnvrt(const char *sys1, const double *coord1, const char *sys2, double *coord2, int *istat);
    LINKDLL void c_rstrng(double reel, char *string, int *length, int *istat);
    LINKDLL void c_shf(double x, double x0, double a, double w, double phi, double b, int iord,
    	   double *value, int *errflg);
    LINKDLL void c_step(double x, double x0, double h0, double x1, double h1,
    	    int iord, double *value, int *errflg);
    LINKDLL void c_step5(double x, double x0, double h0, double x1, double h1,
    	    int iord, double *value, int *errflg);
    LINKDLL void c_sysary(const char *fncnam, const int *ipar, int nsize, double *states, int *nstate,
    	      int *errflg);
    LINKDLL void c_sysfnc(const char *fncnam, const int *ipar, int nsize, double *states, int *errflg);
    LINKDLL void c_syspar(const char *fncnam, const int *ipar, int nsize, const double *states, int nstate, int *errflg);
    LINKDLL void c_tcnvrt(const char *sys1, const double *coord1, const char *sys2, double *coord2, int *istat);
    LINKDLL void c_timget(double *time);
    LINKDLL void c_tirary(int tireid, const char *fncnam, double *states, int *nstate, int *errflg);
    LINKDLL void c_ucovar(int id, int nparts, const int *lparts, int nvars, const int *lvars);
    LINKDLL void c_usrmes(int msgflg, const char *mesage, int id, const char *msgtyp);
    /* Added by mnp */
    LINKDLL void c_adams_serialize_integers(const int* data, int count);
    LINKDLL void c_adams_unserialize_integers(int* data, int count);
    LINKDLL void c_adams_serialize_doubles(const double* data, int count);
    LINKDLL void c_adams_unserialize_doubles(double* data, int count);
    LINKDLL void c_adams_serialize_characters(const char* data, int count);
    LINKDLL void c_adams_unserialize_characters(char* data, int count);
    
    #ifdef __cplusplus
    }
    #endif
    
    #endif
    

    Hier die Source :

    #include "slv_c_utils.h"
    
    adams_c_SFOSUB   Sfosub;
    void Sfosub(const struct sAdamsSforce* sforce, double time, int dflag, int iflag, double* value)
    {
    /* Assign impact parameters to readable variable names */
       double implth = sforce->PAR[3];
       double stiff  = sforce->PAR[4];
       double expont = sforce->PAR[5];
       double cmax   = sforce->PAR[6];
       double cdepth = sforce->PAR[7];
    /* Load up ipar for call to sysfnc for DZ( PAR(1), PAR(2), PAR(3) ) */
       int    ipar[3]={(int)sforce->PAR[0],(int)sforce->PAR[1], (int)sforce->PAR[2] };
       int    errflg;
       double impary[3];
       double dz;
       double vz;
    
    /* Call SYSFNC for displacement */
    
       c_sysfnc("DZ", ipar, 3, &dz, &errflg);
       c_errmes(errflg, "Error getting disp. in SFOSUB.", sforce->ID, "STOP");
    
    /* Call SYSFNC for velocity */
    
        c_sysfnc("VZ", ipar, 3, &vz, &errflg);
        c_errmes(errflg, "Error getting vel. in SFOSUB.", sforce->ID, "STOP");
    /*
      --- Evaluate force ----------------------------------
    
      Calculate IMPACT force 
    */
    	c_impact(dz, vz, implth, stiff, expont, cmax, cdepth, 0,  impary, &errflg );
        c_errmes(errflg, "Error in IMPACT from SFOSUB.", sforce->ID, "STOP");
    
    /* Assign the returned value */
    
        *value = impary[0];
    }
    

    Hoffe das mir irgendjemand weiterhelfen kann.
    Vielen Dank für Eure Hilfe !!

    Gruß ALDURO !



  • Moin,

    Google: site:msdn.microsoft.com LNK2019

    um Dir noch etwas weiter zu helfen ... Dir musst noch die nötigen *.lib Dateien dem Linker hinzufügen

    hand, mogel



  • BTW: falsches Forum.
    Simon



  • Danke für die Hilfe Mogel !

    Welche .lib Dateien müssen denn noch dazu ?

    ALDURO



  • alduro01 schrieb:

    Welche .lib Dateien müssen denn noch dazu ?

    keine Ahnung ... das verrät Dir das Handbuch welches Du für die Header mitbekommen hast

    theta schrieb:

    BTW: falsches Forum

    ja das auch 🙂


Anmelden zum Antworten