hmm... i think i know what youre talking about, but is there an obvious difference in filenames or any other way?
i noticed that my files have a suffix 'lib' in them and their extension is .a, for example: libOgreMain.dll.a
then theres others like libBulletCollision.a
would the '.dll.' part of the file mean something? |
I use Visual Studio so I'm used to the Windows linking paradigm (.lib, .dll) so what I say here might not be entirely correct so if someone could correct me I would appreciate it. The .a files (archives) are part of the Unix linking paradigm where essentially .a files replace .libs and .so files (shared objects) replace dlls. The one difference, I think, is that you can be sure that an archive (.a) only contains a static library. The reason I'm unsure is your example "libOgreMain.dll.a" hints that it might be a library needed on top of a shared library (.dll or .so). However, everything I've read thus far points to archives being equivalent to static libraries so idk. This might be a by-product of everyones over-simplification of .lib files, though. To re-iterate, they may contain the full object code or they may not and thus need to be supplemented with a .dll (.so). Something tells me this "libOgreMain.dll.a" needs to be supplemented with a .so. If you're confused that's OK 'cause I think I've confused myself at this point :D
if so then is there a way to get around this problem? |
If you have DLLs that are part of the OGRE library, then being dependant on their DLLs might be doing your program a favor. The reason I say this is if you statically linked with the OGRE library, then your exe might bloat to an unreasonable size. To get rid of a dependency on a DLL (when you know how the library was built) is to get a static version of the library and link with that. This
might be something like "libOgreMain.a" as opposed to "libOgreMain.dll.a", but again, unsure.
also one more question: how would i go about setting up a static library in my game |
This you would set up with your IDE. I haven't used Code::Blocks so here's a resource I found randomly
http://turrier.fr/tutoriels/c_05/create-and-use-a-static-library-with-c-or-c++.html
But, why would you set up a static library in your game? I would see this being useful if, say, you had a library for 2D/3D Vector and matrix math, a physics library, a rendering library (but you have OGRE), etc. and then you would link those into your main game code. Otherwise, I think you'd want your game to be a .exe and leave it at that.
OR, how would I add the DLL file in the executable before-hand? |
A DLL file means dynamic linkage, hence a link with a .lib (or .a?) file that did not contain all the object code. The DLL file is necessary for running. To get rid of the DLL you need to find a static version of the library you linked with.
In terms of other DLLs that seem to just be randomly imposed on your exe, it might be like what acorn suggested, and you might have to switch IDEs for less restriction.