January 31, 2007Re: Qs about structs and their references WRT C functions and variables
Posted in reply to Rick Mann
Rick Mann wrote: > torhu Wrote: >> If you link dynamically with the C lib, you are supposed to to add 'export' too, even if it works without that in some cases. > > "export" just before the rest of it, I suppose? > > Can you tell me how "export" changes things? It's working right now without it, and I don't see where it is in the spec... > export is mentioned on these pages, the first two being most relevant to what you're doing: http://www.digitalmars.com/d/attribute.html http://www.digitalmars.com/d/htomodule.html http://www.digitalmars.com/d/dll.html http://www.digitalmars.com/d/windows.html I don't know much more than what's on those pages. But like I said, some variables seem to link correctly without 'export'. Which ones might depend on the compiler or linker you're using. Using 'export' means that you can't link statically to the C lib and expect things to work. Not sure what to do about that, I just use search and replace to remove export.