Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link Errors with 0.2.13 prebuilt for Windows #505

Closed
imikejackson opened this issue Feb 17, 2015 · 3 comments
Closed

Link Errors with 0.2.13 prebuilt for Windows #505

imikejackson opened this issue Feb 17, 2015 · 3 comments

Comments

@imikejackson
Copy link

When compiling I get the following error on windows using the Visual Studio compilers.

CalculateMeanInnerProducts.cpp.obj : error LNK2019: unresolved external symbol cblas_sgemm referenced in function "protected: void __cdecl CalculateMeanInnerProducts::computeMeanInnerProduct(void)" (?computeMeanInnerProduct@CalculateMeanInnerProducts@@IEAAXXZ)

the code I am using looks like this:

cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasTrans,
              msize,// M: Number of rows in matrices A and C.
              nsize, // N: Number of columns in matrices B and C.
              K, // K: Number of columns in matrix A; number of rows in matrix B.
              1.0f, // Scaling factor for the product of matrices A and B.
              A+i*lda,
              lda, //The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.
              B+j*ldb,
              ldb, //The size of the first dimention of matrix B; if you are passing a matrix B[m][n], the value should be m.
              0.f, // Scaling factor for matrix C.
              C,
              nsize //LDC: The size of the first dimension of matrix C; if you are passing a matrix C[m][n], the value should be m.
              );

This same code compiles on OS X against the Accelerate Framework and on Linux against LAPACK/CBLAS, I am just looking for something that is open-source and works on Windows. We would like to use it in the http://github.com/dream3d/dream3d.git project.

Thanks for any help
MJackson

@martin-frbg
Copy link
Collaborator

Trivial question: Do you see any indication that VS is actually trying to link against OpenBLAS ?

@xianyi
Copy link
Collaborator

xianyi commented Feb 17, 2015

@imikejackson , how did you link OpenBLAS at Visual Studio? Could you try this wiki page https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio ?

@imikejackson
Copy link
Author

I am using the prebuilt binaries that I downloaded from your website. I use CMake to find and link against OpenBLAS. The OpenBLAS library seems to be in the list of libraries to link against when I look at the command that gets executed to link. I have made sure that I am trying to link against the .lib files and not the actual DLL itself. (I know this from experience). Sort of weird as I have used earlier versions of OpenBLAS a few years ago and got things to work, but with a different project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants