0

I try to build the 'lo1' Example for Mosek on MinGW. Unfortunately, it keeps returning undefined reference to ... I think I'm doing something wrong when linking the libraries. Anyone can help?

My build commands are the following:

g++ "-IC:\Program Files\Mosek\7\tools\platform\win64x86\h" "-LC:\Program Files\Mosek\7\tools\platform\win64x86\bin" -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 -o "lo1.o" "lo1.cpp" "-lmosek64_7_1" 

g++ "-LC:\Program Files\Mosek\7\tools\platform\win64x86\bin" -static-libgcc -static-libstdc++ -o lo1.exe "lo1.o" "-lmosek64_7_1" 
user3114639
  • 1,895
  • 16
  • 42
kelia
  • 43
  • 1
  • 6

2 Answers2

0

Is the problem happening while building or while running the final binary?

Are you sure g++ builds a 64bit binary. Maybe you should add a -m64

ErlingMOSEK
  • 391
  • 1
  • 7
0
g++ "-IC:\Program Files (x86)\Mosek\7\tools\platform\win32x86\h" -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 -o "lo1.o" "lo1.cpp" 

g++ "-LC:\Program Files (x86)\Mosek\7\tools\platform\win32x86\bin" -static-libgcc -static-libstdc++ -o lo1.exe "lo1.o" "-lmosek7_1" 

Thanks for your answer. the problem happened while building. The 64bit version did not work. Mosek 32bit works with MinGW. Above build commands were used.

kelia
  • 43
  • 1
  • 6