I am working on a project but for some reason my code will not compile and it prints the error message.
''' /usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../x86_64-linux-gnu/crt1.o: In function
`_start': (.text+0x20): undefined reference to `main' clang-7: error: linker command failed
with exit code 1 (use -v to see invocation) <builtin>: recipe for target 'helpers' failed
make: *** [helpers] Error 1 '''
With an emphasis on
undefined reference to 'main'.
I don't see any problems here's my code and i'd appreciate any help.
MY CODE
void sepia(int height, int width, RGBTRIPLE image[height][width])
{
// over height
for (int h = 0; h < height; h++)
{
// over width
for ( int w = 0; w < width; w++)
{
int sepiaRed = .393 * image[h][w].rgbtRed + .769 * image[h][w].rgbtGreen + .189 * image[h][w].rgbtBlue;
int sepiaGreen = .349 * image[h][w].rgbtRed + .686 * image[h][w].rgbtGreen + .168 * image[h][w].rgbtBlue;
int sepiaBlue = .272 * image[h][w].rgbtRed + .534 * image[h][w].rgbtGreen + .131 * image[h][w].rgbtBlue;
// space
if (sepiaRed > 255 || sepiaGreen > 255 || sepiaBlue > 255)
{
sepiaRed = 255;
sepiaGreen = 255;
sepiaBlue = 255;
}
image[h][w].rgbtRed = (sepiaRed);
image[h][w].rgbtBlue = (sepiaBlue);
image[h][w].rgbtGreen = (sepiaGreen);
}
}
return;
}