Take the 2-minute tour ×

How do you reference DLLs from Objective-C? I use GNUStep Make files on Windows.


share|improve this question

1 Answer 1

Ooh... this takes me back. A bit of a guess from the most common problem I ever ran into.

If GNUStep's DLLs on Windows work like they did a decade ago, then you:

  1. Link to the DLL like you would any other DLL. I don't remember the explicit syntax, but there should be about a zillion examples available

  2. Make sure you have a static reference to a symbol in each DLL from the main program (or from some other DLL).

In particular, when compiling something that is pure Objective-C, it is quite easy to end up in a situation where the Windows link loader doesn't load a DLL because it doesn't see a hard reference to any symbol in that DLL. When I ran into this with WebObjects applications, I would typically export something like:

int businessLogicDLLVersion;

And then refer to that symbol quite specifically in my main program. That static reference was enough to cause the link loader to load the DLL and the runtime to hook up all the classes.

share|improve this answer

Your Answer


