Hey everyone. For some strange reason my program won't read in from the libraries I'm including at the top:
The error I'm getting is the following:Code:#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> #define BUFFER_SIZE 70 #define TRUE 1 #define FALSE 0 int** img; int numRows; int numCols; int maxVal; FILE* fo1; void addtopixels(int** imgtemp, int value); void writeoutpic(char* fileName, int** imgtemp); int** readpic(char* fileName); void readHeader(FILE* imgFin); int isComment(char* line); void readImgID(char* line); void readImgSize(char* line); void readMaxVal(char* line); int** setImage(); void readBinaryData(FILE* imgFin, int** imgtemp); void choice1(); void choice2(); void choice3(); void sobelfunc(int** pic, int** edges, int** tempx, int** tempy); void subtractpic(int** img1, int** img2, int** img3); int** temppicx; int** temppicy; int** img; int** sobelout; int choice; int brightness; char fileName1, fileName2; int main() { char fileName[BUFFER_SIZE]; int i,j,rows,cols; char ci; printf("Successfully read image file '%s'\n", fileName); printf("Which action would you like to perform?\n"); printf("1. Edit the brightness.\n"); printf("2. Subtract 2 images.\n"); printf("3. Sobel edge highlighter.\n"); prinft("4. Exit\n"); scanf("%d", &choice); while (choice != 4) { if (choice == 1) { option1(); } if (choice == 2) { option2(); } if (choice == 3) { option3(); } } return(EXIT_SUCCESS); void option1() { printf("Enter image filename: "); scanf("%s", fileName); img = readpic(fileName); printf("By how much would you like to change the brightness?\n"); scanf("%d", &brightness); addtopixels(img,brightness); writeoutpic("out1.pgm",img); free(img); img = NULL; }
[Linker error] undefined reference to 'readpic'
Then where it says readpic is has a bunch of lines where it says the same for things like 'addtopixels', 'setImage', etc.
Does anybody know what might be going wrong?



LinkBack URL
About LinkBacks



