I want to capture some information from TIFF file and I write a simple “TestTIF.c” and included “tiffio.h”. I compiled the TestTIF.c and get follow errors.
Error as follow:
1. [Linker error] undefined reference to TIFFOpen'
2. [Linker error] undefined reference toTIFFClose'
I am not a professional developer, I just want to get an image width and length. Dev-C++ is a shareware and match I short term need. Actually, I don't know how to use project in Dev-C++.
How to do the next? I am think now. give up or...
Thanks again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using Dev-C++ 4.9.9.2.
I want to capture some information from TIFF file and I write a simple “TestTIF.c” and included “tiffio.h”. I compiled the TestTIF.c and get follow errors.
Error as follow:
1. [Linker error] undefined reference to
TIFFOpen' 2. [Linker error] undefined reference to
TIFFClose'The TestTIF.s as follow:
include <stdio.h>
include <string.h>
include "./include/tiffio.h"
include "./include/tiffconf.h"
include "./include/tiff.h"
main()
{
TIFF* tif = TIFFOpen("300Lx4P.tif", "r");
printf("Test...\n");
TIFFClose(tif);
}
Can you help me, let me know, what happen and how can I do the next?
Thank & regards,
Kuoyang Hu
Seems you have forgotten to include the library...
I have no idea what it's name is but i suspect tiff.lib or tiff.a...
I have put all of files (tiffio.h, tiffconf.h, tiff.h) into folder (./include) and write follow statement as follow:
include "./include/tiffio.h"
include "./include/tiffconf.h"
include "./include/tiff.h"
Is it correctly? If NOT, how to include the library?
I stopped using dev-c++ and instead use code::blocks, but if I remember correctly it's under project->build options...
Also, a complete rebuild might solve the issue
Thanks.
I am not a professional developer, I just want to get an image width and length. Dev-C++ is a shareware and match I short term need. Actually, I don't know how to use project in Dev-C++.
How to do the next? I am think now. give up or...
Thanks again.
What happen.
I created a project and keep the setup as default then copied all of statement “TestTIF.c” into project then compiled it, it done and runnable.
Thank you again. Now I know how to do the next.