Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Jose on April 30, 2007, 04:41:13 PM
-
Hi. Can someone advise a good source of information on the environment to make a C link libary, specially if it possible to access some internal information like variable types.
:pint:
-
In C variable type isn't saved anywhere in binary format, so the answer is "no".
-
Ah, ok, reason I'm asking is that I've almost completed a very complicated macro to make serialization easier and less bulkier. The internal code to actually do it is not finished so I was hoping making it a link libarry would make it more easier.
Anyway, what environment would you advise to make a link library, might be stupid question indeed but it's the 1st time I do it :-D
-
Ahh, you're making your own link library then?
Well then the tools differ depending on the compiler used. For example the GNU tool is ar (http://en.wikipedia.org/wiki/Ar_(Unix)).
-
"Ahh, you're making your own link library then?"
Yes, would that make any difference to the 1st question ? Surely, types are not available to the coder, but I had a vague hope that the library could access some extra info..
-
Well, obviously the same rules apply. If you need some information of the actual types, you need to provide that yourself in some way.
Déjà vu, didn't we go thru all this before already?
-
With SASC you use OML (Object Module Linker).
It is totally easy and works every time. :-)
-
"Déjà vu, didn't we go thru all this before already?"
Yes, but I've changed the method completely a few times since then. 1st I thought about using strings as some of you purposed, then realized macros would provide way much better syntax. Since then I've changed the initial macro concept I was going to use and the macros themselves are in the 7th incarnation :)
Maybe tomorrow I'll have another idea and change it all over again but I don't think so, this is probably the one that will stay since I've already lost so much time thinking about the different possibilities.
-
@ChaosLord
Cool, I got a SASC install here and it rules. Might try to use VBCC though, as I'd like it to run on AOS4 and MOS too.