Is it possible to cross compile for Windows, from linux, when static libraries are not available?
I am trying to compile a project using Qt, OpenCV and FlyCapture2 libraries into an executable for a Windows 8 target system. I am running ubuntu 14.04. Unfortunately the FlyCapture2 SDK only provides shared libraries so I cannot compile these statically.
It is fine for me to simply include the libraries in the same directory as the executable but seeing as how i'm building the project on Linux (using Qt Creator) I am not sure how to appropriately link for a Windows target system. Here is my current .pro file:
CONFIG+=static INCLUDEPATH += /usr/local/include/ LIBS += -L/usr/local/lib -static -lopencv_core -lopencv_imgcodecs -lopencv_highgui -lopencv_videoio -lopencv_imgproc LIBS += -L/usr/lib -lflycapture -lflycapture-c -lflycapturegui ## Is it possible to link to a .dll for windows here?
Is it possible to link to a .dll for the Windows target system? Is there a solution for this problem that I am not seeing? This is my first attempt at cross-compilation. Your help is appreciated, thanks.
You can try this: export LD_LIBRARY_PATH= your_curreny_so_lib_path then make
You can try Something as follows:
LIBS += -Wl,--start-group LIBS += -L/usr/local/lib -static -lopencv_core -lopencv_imgcodecs -lopencv_highgui -lopencv_videoio -lopencv_imgproc LIBS += -L/usr/lib -lflycapture -lflycapture-c -lflycapturegui LIBS += -Wl,--end-group
This may Work for you. Hope this Helps.