cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

mael
Journeyman III

Name mangling in OpenCL.dll

Hello,

I'm using OpenCL from another language (Delphi). When importing the API-functions from OpenCL.dll the name-mangling requires me to specify the mangled name instead of the real function name. Since name-mangling is compiler dependent and it differs from the function names found in the header files it makes importing more fragile than necessary.

Please disable it by using something like

#ifdef __cplusplus
extern "C" {
#endif

// exports go here
#ifdef __cplusplus
}
#endif

Regards, Maël Hörz

0 Likes
6 Replies
jcpalmer
Adept I

I concur.  I am using Java, via OpenCL4Java, http://code.google.com/p/nativelibs4java/wiki/OpenCL.  At the C bindings level, it runs flawlessly on OSX & NVidia Windows.  I have my own OO abstraction level, but the one that now comes with is probably fine too.  It did not exist when I started, so I ended up build my own.

I have not actually been running this beta, obviously ( I keep close attention though).  I am not sure if OpenCL is a source code or runtime specification, but any implementation whose names of API entry points do not match the specification will not be considered to exist.  Support nightmares are best avoided, even if if means losing customers, IMO.

0 Likes

I eventually remembered a thread on this forum which discussed this (It got swapped out).

http://forums.amd.com/devforum/messageview.cfm?catid=390&threadid=118316&enterthread=y

0 Likes

I am happy to report that as of the 9/24 Beta 3, the OpenCL4Java bindings are now functioning!  Looking at the forum announcement of Beta 3, i did not see anything that would highlight this.  Maël, hope you were running Beta 2, when you posted.

It was OpenCL4Java's author who re-did the test.  I am still in the other camps on the testing front, but I have a HD 4890 sitting in it's box, anytime you are ready.

0 Likes
mael
Journeyman III

When I was writing this topic I was using Beta 3. And the name mangling was still present.

I'll check again to make sure I didn't confuse anything.

0 Likes

Originally posted by: mael When I was writing this topic I was using Beta 3. And the name mangling was still present.

 

I'll check again to make sure I didn't confuse anything.



I can confirm that this is still present on 2.0 beta 3. It is also blocking our .Net OpenCL bindings in OpenTK.

0 Likes

Beta 4 fixes the issues with name mangling/decoration.

0 Likes