Welcome, Guest. Please login or register.

Author Topic: put library in code  (Read 2262 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show all replies
Re: put library in code
« on: March 01, 2005, 09:51:47 AM »
You really do not need to pack executables anymore. Packing is ugly, unnecessary, and fscks up the DOS loader. I'll admit, everything in one file looks cool. But there really is little difference between creating a directory and dumping all stuff there and a single file. Second, if library versions are so important, you embed a check in your code with the OpenLibrary() call to print a warning that if the right version is not present, the program will not run correctly. You ship the program with the correct version of the library. If the code is so sensitive to the correct version, you might want to think about coding a workaround, bugging the author, or if he is not active any longer, creating your own library to do the job. Finally, embedding code into your own executable requires you to know a lot about the library's own code and data segments and making sure those sections end up in the right kind of memory. Under OS3- that doesn't make one iota of difference, but OS4+ might actually respect certain flags and allocate memory appropriately. In other words, you need to mimick the OpenLibrary()-process on your own: bad, bad idea.

It is sooo much easier just to ship the right version with your code and issue a warning otherwise, it's almost painful.
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.