64 vs 32 bit

Hello, I have a question regarding this sample code. I created a new source containing this code in both examples_lp64 and examples_ilp64 folders and added the new file to the both makefiles to compile it. For the 32-bit version it works well and outputs the correct result ( Value of r: 0.123400 ) but for the 64-bit one, it results in an error (NMAKE : fatal error U1077: 'test.exe' : return code '0xc0000005' ). Am I doing something wrong, or what can the problem be ? 

 

#include <stdlib.h>
#include <stdio.h>

float x[4] = { 1, 2, 3, 4 };
float y[4] = { .1, .01, .001, .0001 };
int four = 4;
int one = 1;
extern float sdot_();
int main() {
  int i;
  double r = sdot_(&four, x, &one, y, &one);
  printf("Value of r: %f\n", r);
  return 0;
}

Parents Reply Children
No data