cant compile matrix multiplication ( C ) : Hey i got this error and i tried like 10 solutions and either works. I want to load 2 matrix, each one from its own txt file then to multiply them. I cant compile casue of LNK1120 and LNK2019 errors. Here is my code: 

 

    int main(int argc, char *argv[])
    {
	

    FILE *macierz1, *macierz2, *fw;
	char *line = malloc(1000);
	int count = 0;
	macierz1 = fopen("macierz1.txt", "r");
		if (macierz1 == NULL) {``
		printf("nie można otworzyć", argv[1]);
		exit(1);
	}


	macierz2 = fopen("macierz2.txt", "r");
	if (macierz2 == NULL) {
		printf("nie można otworzyć", argv[2]);
		exit(1);
	}

	double *data = (double*)malloc(1000 * sizeof(double));
	if (data == NULL)
	{
		printf("błąd lokowania pamięci");
		return EXIT_FAILURE;
	}
	getline(&line, &count, macierz1);
	int read = -1, cur = 0, columCount1 = 0;
	while (sscanf(line + cur, "%lf%n", &data[columCount1], &read) == 1)
	{
		cur += read; columCount1++;
	}

	int rowCount1 = 1;
	while (getline(&line, &count, macierz1) != -1) { rowCount1++; }
	printf("%d\n", columCount1);
	printf("%d\n", rowCount1);

	getline(&line, &count, macierz2);
	read = -1, cur = 0;
	int columCount2 = 0;
	while (sscanf(line + cur, "%lf%n", &data[columCount2], &read) == 1)
	{
		cur += read; columCount2++;
	}

	int rowCount2 = 1;
	while (getline(&line, &count, macierz2) != -1) { rowCount2++; }
	printf("%d\n", columCount2);
	printf("%d\n", rowCount2);
	int i = 0;
	int j = 0;

	int **mat1 = (int **)malloc(rowCount1 * sizeof(int*));
	for (i = 0; i < rowCount1; i++)
		mat1[i] = (int *)malloc(columCount1 * sizeof(int));

	fseek(macierz1, 0, SEEK_SET);

	for (i = 0; i < rowCount1; i++)
	{
		for (j = 0; j < columCount1; j++)
			fscanf(macierz1, "%d", &mat1[i][j]);
	}

	i = 0;
	j = 0;

	printf("\n\n");
	//print matrix 1
	for (i = 0; i < rowCount1; i++)
	{
		for (j = 0; j < columCount1; j++)
			printf("%d", mat1[i][j]);

		printf("\n");
	}

	i = 0;
	j = 0;
	int **mat2 = (int **)malloc(rowCount2 * sizeof(int*));
	for (i = 0; i < rowCount2; i++)
		mat2[i] = (int *)malloc(columCount2 * sizeof(int));

	fseek(macierz2, 0, SEEK_SET);

	for (i = 0; i < rowCount2; i++)
	{
		for (j = 0; j < columCount2; j++)
			fscanf(macierz2, "%d", &mat2[i][j]);
	}

	i = 0;
	j = 0;

	printf("\n\n");
	//print matrix 2
	for (i = 0; i < rowCount2; i++)
	{
		for (j = 0; j < columCount2; j++)
			printf("%d", mat2[i][j]);

		printf("\n");
	}

	i = 0;

	int **mat3 = (int **)malloc(rowCount1 * sizeof(int*));
	for (i = 0; i < rowCount1; i++)
		mat3[i] = (int *)malloc(columCount2 * sizeof(int));
	i = 0;
	j = 0;
	int k = 0;
	int sum = 0;

	if (columCount1 != rowCount2)
	{
		puts("The number of columns in Matrix 1 is not same as the number of rows in Matrix 2");
		exit(1);
	}

	//multiplication of two matrices
	for (i = 0; i<rowCount1; i++)
	{
		for (j = 0; j<columCount2; j++)
		{
			mat3[i][j] = 0;
			for (k = 0; k<columCount1; k++)
			{
				mat3[i][j] = mat3[i][j] + mat1[i][k] * mat2[k][j];
			}
		}
	}


	//print multiplication result
	printf("\n\nResult = \n\n");

	for (i = 0; i < rowCount1; i++)
	{
		for (j = 0; j < columCount2; j++)
			printf("%d", mat3[i][j]);

		printf("\n");
	}
	for (i = 0; i< rowCount1; i++)
		free(mat1[i]);
	free(mat1);

	for (i = 0; i< rowCount2; i++)
		free(mat2[i]);
	free(mat2);

	for (i = 0; i< rowCount1; i++)
		free(mat3[i]);
	free(mat3);

	free(data);

	return 0;
    }

