Linking to LAPACK library with g++ on Windows?

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2004
Posts: 42
Reputation: Kadence is an unknown quantity at this point 
Solved Threads: 0
Kadence Kadence is offline Offline
Light Poster

Linking to LAPACK library with g++ on Windows?

 
0
  #1
Jul 14th, 2009
I have LAPACK and am having problems trying to compile while linking to it with g++ (MinGW and MinGW 64, have and tried both) using the following command:
  1. g++ main.cpp -I"C:\Program Files (x86)\University Of Tennessee\LAPACK 3.1.1\lib\x64" -L"C:\Program Files (x86)\University Of Tennessee\LAPACK 3.1.1\lib\x64" -llapack -lblas
Even though I'm adding the include path and linking to the library, I'm still getting an
undefined reference to `sgels_'
collect2: ld returned 1 exit status
error. I also tried lib\win32 for the include and library paths instead of lib\x64.

I do have
  1. extern "C" void sgels_ ( ... );
At the top of the file using sgels_().

How am I linking incorrectly, or doing incompletely?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC