unresolved references when compiling gesvd example

General CULA Dense (LAPACK & BLAS) support and troubleshooting. Use this forum if you are having a general problem or have encountered a bug.

unresolved references when compiling gesvd example

Postby rich.welch » Mon Jan 04, 2010 8:08 pm

Hello,

I've been trying to compile a simple CULA program (basically just calling culaInitialize() and culaShutdown()), but was getting linker errors regarding unresolved external symbols relating to CULA. I then tried to compile the gesvd example that ships with CULA, but I also received similar errors. They are pasted below:

1>gesvd.obj : error LNK2001: unresolved external symbol _culaGetErrorInfo
1>gesvd.obj : error LNK2001: unresolved external symbol _culaShutdown
1>gesvd.obj : error LNK2001: unresolved external symbol _culaInitialize
1>gesvd.obj : error LNK2001: unresolved external symbol _culaGetStatusString
1>gesvd.obj : error LNK2001: unresolved external symbol _culaSgesvd

I've Google'd these errors and searched here, but have not seen anyone else post this problem. Does anyone know why I am receiving these linker errors? I followed the setup guide regarding environment installation (I'm using MS Visual Studio 2008 on Windows XP 64).

Thanks!
rich.welch
 
Posts: 2
Joined: Mon Nov 23, 2009 4:51 pm

Re:unresolved references when compiling gesvd example

Postby john » Tue Jan 05, 2010 7:39 am

Hi Rich,
I noticed that it seems you are cross compiling here as underscores only appear in front of Win32 symbols but you are on Win64. I double checked the symbols exported by the 32-bit cula.lib included in the 64-bit installer and they are correct; you can use the dumpbin program to verify this.

c:\cula_1.1a-win64\lib> dumpbin /exports cula.lib
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.


Dump of file cula.lib

File Type: LIBRARY

Exports

ordinal name

(note: this list has been truncated)
_culaGetErrorInfo
_culaGetStatusString
_culaInitialize
_culaSelectDevice
_culaSgesvd
_culaSgetrf
_culaShutdown

I also attempted compiling the gesvd sample project as you did (Win32 target on Win64 machine) and the project built cleanly for me. Can you tell me more about your system and setup? One thing that is notable about our example build is that it performs checks on your environment variables to ensure that CULA is fully installed; can you post the complete build log for me to examine? Also useful would be if you could run examples/sysinfo.bat and send the results to me. We should be able to diagnose this pretty easily.

John
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re:unresolved references when compiling gesvd example

Postby rich.welch » Tue Jan 05, 2010 10:43 pm

John,

Thank you for the reply. I poked around in the build log and noticed that for some reason, it said that the CULA environment variables had not been defined (even though they had). So I rebooted - but still did not solve the problem. This time though, the build log didn't mention anything about the CULA environment variables being undefined. I then noticed that the build target was set for "Win32" (as indicated by the underscore prefixes you mention), so changing this to "x64" to match the linked libraries finally solved this issue for me. I then verified that I can correctly run the demo.

Thanks again,
Rich
rich.welch
 
Posts: 2
Joined: Mon Nov 23, 2009 4:51 pm


Return to CULA Dense Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron