[News] AIO Interviews The Bitmap Brothers | ANN.lu |
Posted on 22-May-2002 09:58 GMT by Chris | 38 comments View flat View list |
Amiga Information Online interviews The Bitmap Brothers. Creators of Speedball I & II, Choas Engine and many other classics. @ AIO Website - Click interviews link on left.
|
|
List of all comments to this article |
AIO Interviews The Bitmap Brothers : Comment 36 of 38 | ANN.lu |
Posted by [JC] on 23-May-2002 21:32 GMT | In reply to Comment 30 (Martin Blom): > The thing is that you need dllexport in the header file when building
> the module, and dllimport when you're using the header file from the
> rest of the application. (That's not the fault of the IDE, of
> course, but more the Win32 platform itself. And it's most often not
> really an isse.)
In all honesty, dllimport is a bad idea. The correct method for importing a symbol from a .dll is to use the matching .lib file with a header containing prototypes for the functions. I suspect that's what you mean by "not really an issue" since as you'd rarely use a DLL you don't have the libs or headers for.
> Static or dynamic linking doesn't matter. Each module still has it's
> own settings. If I wan't to add a preprocessor symbol, for example,
> I still have to add this symbol to each module project (but not the
> other projects I have in my workspace). It's easy to forget one of
> them, if you have many.
Oh, I see.. I don't often use the define symbols bit for this, but usually a header file containing settings, like a config.h file or so.
> Heh ... How about "Symbol std::fskdjl:fdsfdfsd.:fdsjh483889fds.
> :fsdhj...... truncated to 255 characters"? :-)
Aye, that one's a pain, but more to do with limits in the COFF object format I think. Anyway, it can be suppressed with a pragma.
I had an example of GCC's pathetic error reporting today. I'd missed a semicolon from a typedef, and it was moaning about errors 20 lines down into a header file, where there was nothing wrong. A small error, in my haste I kept overlooking it, but when I ran it in MSVC, it reported the error in the right place.
> Well, at least it handles "for( int i0 ... )"
Is still a problem although maybe not in VC.NET. I haven't yet tested this. It's also easily worked around.
> and static class variables in dynamic libraries correctly. :-)
> (operator new in one module and delete it in another?
That's nothing to do with VC, that's to do with address space mapping between the DLL and your code. If you read the Platform SDK, you will see there are special circumstances for this.
> Return a std::list from a method in a dll? Nope sorry. Man, did
> *those* random memory trashing errors take time to find!)
See above.
> And don't get me started on <Windows.h>.
It's too large aye. I usually always define WIN32_LEAN_AND_MEAN, and often use it in a precompiled header to avoid slowdown.
> Have you ever tried to name a method "GetMessage"? ;-)
I've never had a problem with that, if you mean clashing between the windows header files and your own function methods. Of course, if you want to call Win32 GetMessage in a class containing a GetMessage function, you have to use ::GetMessage and so on. |
|
List of all comments to this article (continued) |
|
- User Menu
-
- About ANN archives
- The ANN archives is powered by #AmigaZeux. It was updated daily (news last: 22-Oct-2004; comments last: 18-May-2005).
ANN.lu was created, previously owned and maintained by Christian Kemp, www.ckemp.com.
- Contribute
- Not possible at this time!
- Search ANN archives
- Advanced search
- Hosting
- ANN.lu was hosted by Dreamhost. Sign up through this link, mention "ckemp" as referrer and he will get a 10% commission on any account you purchase.
Please show your appreciation for any past, present and future work on ANN.lu by making a contribution via PayPal.
|