Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6251323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:35:33+00:00 2026-05-24T13:35:33+00:00

The short version: I try to compile MAGMA and get complains about missing symbols:

  • 0

The short version:

I try to compile MAGMA and get complains about missing symbols:

testing_cgemm.o:testing_cgemm.cpp:(.text+0x2e7): undefined reference to `cudaMalloc' 
testing_cgemm.o:testing_cgemm.cpp:(.text+0xbff): undefined reference to `cudaFree'

Checking for these symbols in both 32 and 64 bit in the cuda libs I get the following:

$ /C/Coding/Mingw-w64-tdm/bin/nm C:/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v4.0/lib/x64/cudart.lib | grep cudaMalloc
 0000000000000000 I __imp_cudaMalloc
 0000000000000000 T cudaMalloc

$ nm C:/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v4.0/lib/Win32/cudart.lib | grep cudaMalloc
 00000000 I __imp__cudaMalloc@8
 00000000 T _cudaMalloc@8

So the 64 bit libs look ok and they link right. However the 32bit lib (the second output) has some decorations at the method name. This is where I’m stuck.

The questions

What does those decorations mean? Are the 32bit not plain C? Is there any chance to link them right?

The context

I want to compile MAGMA on Windows 7 (64 bit) (both 32 and 64 bit finally) and link it to my program compiled with gcc. The problem is that Cuda on Windows does not support the Mingw/MSys toolchain, I’m familiar with. Cuda compilation using nvcc on Windows seems to require the Visual Studio C compiler cl.exe. I installed Cuda 4.0 (64bit downloads) and built the examples (using VS2008) successfully in both 32 and 64 bit variants – proving that Cuda is installed in both bitnesses.

MAGMA however does not provide a solution for Visual Studio, and I’m not experienced enough to generate one since it involves also a good portion of Fortran code to be compiled. Therefore I tried to use both toolchains (MinGW & VS2008) together. I adopted the make.inc file to my paths and perform the build in three steps. First using Msys/Mingw for the compilation of all the Fortran stuff, and after running into the errors of nvcc which is not able to find cl.exe I switch over to the VS command promt (x86 or x64, depending on the bitness to be built). The latter steps finishes with an library archive file libmagmablas.a which looks right.

However then the problems begin. Using the TDM 64bit compiler (gcc-4.5) everything seems to work correctly also for the compilation and linking of the MAGMA examples, but the .exe files fail promptly upon calling cuInit(). (I think it’s a compiler bug/incompatability since the same happens when I compile the Cuda examples using this Mingw-w64 toolchain).
Therefore, I switched to the 32bit Mingw-w64 toolchain which were able to compile the Cuda examples. Compiling MAGMA with it, repeating all the steps above goes well until the linking step of the MAGMA examples. There is complains about missing symbols:

testing_cgemm.o:testing_cgemm.cpp:(.text+0x2e7): undefined reference to `cudaMalloc' 
testing_cgemm.o:testing_cgemm.cpp:(.text+0xbff): undefined reference to `cudaFree'

Checking for these symbols in the cuda libs I get the following:

$ /C/Coding/Mingw-w64-tdm/bin/nm C:/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v4.0/lib/x64/cudart.lib | grep cudaMalloc
 0000000000000000 I __imp_cudaMalloc
 0000000000000000 T cudaMalloc

$ nm C:/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v4.0/lib/Win32/cudart.lib | grep cudaMalloc
 00000000 I __imp__cudaMalloc@8
 00000000 T _cudaMalloc@8

So the 64 bit libs look ok and they link right. However the 32bit lib (the second output) has some decorations at the method name. This is where I’m stuck.

What does those decorations mean? Are the 32bit not plain C? Is there any chance to link them right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:35:35+00:00Added an answer on May 24, 2026 at 1:35 pm

    The 32-bit symbols are the standard Windows decoration for __stdcall functions (also known as __pascal in the 16-bit days). Given CUDA’s lack of support for GCC on Windows (and seriously, this is not a path you want to go down), my guess is that the cuda.h headers aren’t defining CUDAAPI properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Short version: I have a similar setup to StackOverflow. Users get Achievements. I have
Edited: Look at comments below. Short version: Screen simply flashes when I try to
The short version: My Spring-WS SOAP EchoEndpoint responds 404 whenever I try to access
Short version: How can I get a regex that matches a@a.aaaa but not a@a.aaaaa
Short version: When I try to use Access's DatePart function via ODBC, it cannot
Short version: I want to trigger the Form_Load() event without making the form visible.
Short version: I'm wondering if it's possible, and how best, to utilise CPU specific
Short version: assuming I don't want to keep the data for long, how do
Short Version: When I've created a Channel using ChannelFactory on a client which uses
Short version : echo testing | vim - | grep good This doesn't work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.