Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Dll Conundrum

Author
Message
Dr Laz
18
Years of Service
User Offline
Joined: 25th Sep 2006
Location: Bristol UK
Posted: 26th Feb 2007 23:24
Hi List,

I've been trying to wrap GDK for a while now, but have an issue with the entry point (yeah, I know. What a place to have issues). The scripting language I'm trying to wrap GDK for requires the entry point function name to be passed to a macro. This function needs to be of the signature void->void, which I was sure the DarkGDK entry point function is. However, on passing this function, I get the error

C2732: Linkage specification contradicts earlier specification for "DarkGDK".

Does anyone know the actual specification for this function, or of a way around this issue?

Thanks
Laz

Laz
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 26th Feb 2007 23:45
Are you getting a conflict with the original DarkGDK function in that you've implemented a version of the function yourself that changes the original prototype, i.e. void DarkGDK( void ); to something else?

Paul.

Dr Laz
18
Years of Service
User Offline
Joined: 25th Sep 2006
Location: Bristol UK
Posted: 27th Feb 2007 10:58
No, the code can be as simple as



And it still complains. The entry point macro expects and externs



However, I'm guessing it might be something more like



or something similar. Problem is, any deviation will cause the error.

Laz
Dr Laz
18
Years of Service
User Offline
Joined: 25th Sep 2006
Location: Bristol UK
Posted: 27th Feb 2007 14:42
I actually fixed this, as it turned out I had been using a cpp extension as opposed to a c extension... However, I now get



which I'm sure shouldn't be happening

Laz
Dr Laz
18
Years of Service
User Offline
Joined: 25th Sep 2006
Location: Bristol UK
Posted: 27th Feb 2007 15:01
Great! It seems, unfortunately, that GDK won't compile with the file containing a .c extension... I get the following if I do:



Is there a way to get this compiling with a .c extension?

Thanks,
Laz

Laz
Dr Laz
18
Years of Service
User Offline
Joined: 25th Sep 2006
Location: Bristol UK
Posted: 27th Feb 2007 15:55
I've also tried faking this, so that instead of



I do



But, although that compiles, the DarkGDK functions cause a crash! :-( So that's no go, either.

Laz

Laz

Login to post a reply

Server time is: 2024-11-19 11:37:27
Your offset time is: 2024-11-19 11:37:27