Well, I didn' t know it was possible to use the .a file with windows. This already helps.
To use the .a file I do it this way
- I create a console application project
- I include the .a file + all the headers (.h files)
- I also include a main.cpp program that mentions the headers to be able to use the functions
- I tells the linker to look for the .a file (Project --> Build options --> linker settings --> link libraries, in Debug mode)
Then at compilation
mingw32-g++.exe -o bin\Debug\SigmaClipping2.exe obj\Debug\main.o obj\Debug\libcfitsio.o "C:\Documents and Settings\Jerome Caron\Desktop\MODELS\CandC++projects\Audine\SigmaClipping2\libcfitsio.a"
mingw32-g++.exe: obj\Debug\libcfitsio.o: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
I don't understand why it is asking for the .o file. All the information should be in the library. So I thought it could be due to the fact that a .lib file is required.
What do you think ?
Jerome