'Why doesn't MinGW's linker recognise libgslcblas.dll.a?

Solution: I can now include libgsl and libgslcblas when I compile minimal code in the /home/HORTICULTIST location in cygwin's directory. Before I set the environment variables in Windows when I should've used export in cygwin's interface.

I'm trying to compile a C/C++ library from github which depends on GSL, using MinGW version 9.2.0 and Cygwin, but we get the error below. I'm unfamiliar with makefiles, and the relevant Stack Overflow sugestion isn't magically fixing the issue in this case.

The error:

C:/cygwin64/lib/libgslcblas.dll.a: file not recognized: file format not recognized

The makefile:

CC = g++
LDFLAGS = -lgsl -lm -lgslcblas 

LSOURCE = main.cpp corpus.cpp slda.cpp utils.cpp opt.cpp
LHEADER = corpus.h slda.h utils.h opt.h settings.h

slda: $(LSOURCE) $(HEADER)
      $(CC) $(LSOURCE) -o $@ $(LDFLAGS)

clean:  -rm -f *.o slda

What needs to change?

Thanks~



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source