Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

LNK 1561: Entry point must be defined

$
0
0

Hello

I used Genetic programming and its result showed as c program code. I cannot compile this code and I saw the LNK1561 or LNK2019 to stop compiling.

Please look at the code and give me some advices.

#include <math.h>
#include <float.h>

#define TRUNC(x)(((x)>=0) ? floor(x) : ceil(x))
#define C_FPREM (_finite(f[0]/f[1]) ? f[0]-(TRUNC(f[0]/f[1])*f[1]) : f[0]/f[1])
#define C_F2XM1 (((fabs(f[0])<=1) && (!_isnan(f[0]))) ? (pow(2,f[0])-1) : ((!_finite(f[0]) && !_isnan(f[0]) && (f[0]<0)) ? -1 : f[0]))

float DiscipulusCFunction(float v[5])
{
  long double f[8];
  long double tmp = 0;
  int cflag = 0;

  f[0]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=0;
//  float v[5];
  v[0]=5;
  v[1]=10;
  v[2]=100;
  v[3]=200;
  v[4]=500;
  double time=v[0] ; 
  double Cu=v[1] ; 
  double Cp=v[2] ; 
  double SO=v[3] ; 
  double Sp=v[4] ; 

  L0:cflag=((_isnan(f[0]) || _isnan(f[0])) ? true : (f[0] < f[0]));
  L1:if (!cflag) f[0] = f[1];
  L2:f[0]+=Sp;
  L3:f[0]-=time;
  L4:tmp=f[1]; f[1]=f[0]; f[0]=tmp;
  L5:f[0]=sqrt(f[0]);
  L6:f[0]+=Sp;
  L7:f[0]=sqrt(f[0]);
  L8:f[0]-=1.366016626358032f;
  L9:f[0]/=f[0];
  L10:f[2]-=f[0];
  L11:f[0]*=f[2];
  L12:f[0]+=time;
  L13:f[0]/=-0.8277468681335449f;
  L14:f[0]+=f[1];
  L15:if (cflag) f[0] = f[1];
  L16:f[0]+=1.744837045669556f;
  L17:cflag=((_isnan(f[0]) || _isnan(f[2])) ? true : (f[0] < f[2]));
  L18:f[0]-=f[1];
  L19:if (cflag) f[0] = f[2];
  L20:f[0]-=time;
  L21:f[0]=sin(f[0]);
  L22:f[0]/=0.1756083965301514f;
  L23:f[0]/=time;
  L24:f[2]+=f[0];
  L25:f[1]+=f[0];
  L26:f[0]=fabs(f[0]);
  L27:f[0]+=1.084159851074219f;
  L28:f[0]+=f[2];
  L29:f[0]-=f[0];
  L30:f[0]+=f[0];
  L31:f[0]=sqrt(f[0]);
  L32:f[0]*=pow(2,TRUNC(f[1]));
  L33:f[0]+=Cu;
  L34:cflag=((_isnan(f[0]) || _isnan(f[0])) ? true : (f[0] < f[0]));
  L35:f[0]-=SO;
  L36:tmp=f[2]; f[2]=f[0]; f[0]=tmp;
  L37:f[0]-=f[1];
  L38:f[0]*=-0.5591294765472412f;
  L39:f[0]+=0.1756083965301514f;
  L40:f[0]-=Cp;
  L41:f[2]-=f[0];
  L42:f[0]*=f[0];
  L43:f[0]/=f[0];
  L44:f[0]/=f[1];
  L45:f[0]-=f[2];
  L46:cflag=((_isnan(f[0]) || _isnan(f[2])) ? true : (f[0] < f[2]));
  L47:f[0]+=f[2];
  L48:f[0]=fabs(f[0]);
  L49:f[0]*=f[1];
  L50:f[0]-=f[1];
  L51:f[0]=cos(f[0]);
  L52:f[0]-=f[0];
  L53:f[1]-=f[0];
  L54:f[0]/=f[1];
  L55:f[1]-=f[0];
  L56:cflag=((_isnan(f[0]) || _isnan(f[0])) ? true : (f[0] < f[0]));
  L57:f[0]=-f[0];
  L58:tmp=f[0]; f[0]=f[0]; f[0]=tmp;
  L59:f[0]=-f[0];
  L60:cflag=((_isnan(f[0]) || _isnan(f[1])) ? true : (f[0] < f[1]));
  L61:f[0]=sqrt(f[0]);
  L62:f[0]/=f[1];
  L63:f[0]=-f[0];
  L64:cflag=((_isnan(f[0]) || _isnan(f[0])) ? true : (f[0] < f[0]));
  L65:f[0]=cos(f[0]);
  L66:f[0]/=f[0];
  L67:f[0]=sin(f[0]);
  L68:if (cflag) f[0] = f[0];
  L69:f[0]=fabs(f[0]);
  L70:cflag=((_isnan(f[0]) || _isnan(f[1])) ? true : (f[0] < f[1]));
  L71:f[0]+=f[1];
  L72:tmp=f[0]; f[0]=f[0]; f[0]=tmp;
  L73:if (cflag) f[0] = f[0];
  L74:if (cflag) f[0] = f[2];
  L75:if (!cflag) f[0] = f[0];
  L76:if (cflag) f[0] = f[2];
  L77:f[0]-=f[0];
  L78:f[0]=-f[0];
  L79:if (cflag) f[0] = f[1];
  L80:f[0]+=Sp;
  L81:f[0]=fabs(f[0]);
  L82:f[0]+=f[2];
  L83:cflag=((_isnan(f[0]) || _isnan(f[2])) ? true : (f[0] < f[2]));
  L84:cflag=((_isnan(f[0]) || _isnan(f[2])) ? true : (f[0] < f[2]));
  L85:f[0]=fabs(f[0]);
  L86:f[0]/=f[0];
  L87:cflag=((_isnan(f[0]) || _isnan(f[2])) ? true : (f[0] < f[2]));
  L88:f[0]-=Cu;
  L89:if (cflag) f[0] = f[2];
  L90:f[0]/=f[0];
  L91:f[0]=sin(f[0]);
  L92:f[0]=sqrt(f[0]);
  L93:f[0]=sin(f[0]);
  L94:tmp=f[0]; f[0]=f[0]; f[0]=tmp;
  L95:tmp=f[0]; f[0]=f[0]; f[0]=tmp;
  L96:f[2]/=f[0];
  L97:f[0]*=f[1];
  L98:tmp=f[1]; f[1]=f[0]; f[0]=tmp;
  L99:f[0]+=f[0];
  L100:f[0]=fabs(f[0]);
  L101:f[0]-=f[1];
  L102:f[0]+=f[2];
  L103:if (cflag) f[0] = f[1];
  L104:tmp=f[1]; f[1]=f[0]; f[0]=tmp;
  L105:f[0]+=0.7233922481536865f;
  L106:f[0]+=f[0];
  L107:f[0]-=-1.924433708190918f;
  L108:cflag=((_isnan(f[0]) || _isnan(f[1])) ? true : (f[0] < f[1]));
  L109:if (!cflag) f[0] = f[2];
  L110:f[0]+=SO;
  L111:f[0]+=Cu;
  L112:f[2]/=f[0];
  L113:f[0]-=SO;
  L114:f[0]/=time;
  L115:f[0]-=f[1];
  L116:f[0]*=-0.6667284965515137f;
  L117:f[0]=fabs(f[0]);
  L118:f[2]*=f[0];
  L119:f[0]/=0.2877938747406006f;
  L120:f[2]-=f[0];
  L121:f[0]=-f[0];
  L122:cflag=((_isnan(f[0]) || _isnan(f[2])) ? true : (f[0] < f[2]));
  L123:f[0]-=SO;
  L124:if (cflag) f[0] = f[1];
  L125:f[0]-=f[1];
  L126:f[0]*=-0.5591294765472412f;
  L127:f[0]-=SO;
  L128:cflag=((_isnan(f[0]) || _isnan(f[0])) ? true : (f[0] < f[0]));
  L129:f[0]*=1.086833715438843f;
  L130:f[0]-=f[1];
  L131:f[0]*=-0.5591294765472412f;
  L132:f[0]+=1.505081653594971f;
  L133:f[0]-=SO;
  L134:f[0]*=0.9177978038787842f;
  L135:f[0]-=-0.7297487258911133f;
  L136:f[0]-=f[1];
  L137:f[0]*=-0.5591294765472412f;
  L138:tmp=f[0]; f[0]=f[0]; f[0]=tmp;
  L139:f[0]-=SO;
  L140:f[0]/=0.9955191612243652f;
  L141:cflag=((_isnan(f[0]) || _isnan(f[0])) ? true : (f[0] < f[0]));
  L142:f[0]/=0.9955191612243652f;
  L143:if (cflag) f[0] = f[1];
  L144:f[0]-=f[1];
  L145:f[0]*=-0.5591294765472412f;
  L146:f[0]+=1.450522422790527f;
  L147:f[0]+=1.501374244689941f;
  L148:

  if (!_finite(f[0])) f[0]=0;

  return f[0];
}
float DiscipulusCRegressionFunction(float  v [])
{
   float ret = DiscipulusCFunction(v) ;
   return ret;
}

// Copyright, 2014, RML Technologies.
// This program was evolved with Discipulus(tm).
// This program and any information derived from this program
// may be used solely for pure research purposes and publication
// of results threrefrom in accordance with the Discipulus
// License agreement. This notice may not be removed from this
// program or any copy thereof.


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>