Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
196 user(s) are online (184 user(s) are browsing Forums)

Members: 0
Guests: 196

more...

Support us!

Headlines

 
  Register To Post  

« 1 (2)
Re: New stuff on OS4Depot for AmigaO4.1 crashes on AmigaOS4.0
Just can't stay away
Just can't stay away


See User information
@orgin

Yes.

Go to top
Re: New stuff on OS4Depot for AmigaO4.1 crashes on AmigaOS4.0
Supreme Council
Supreme Council


See User information

Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
Go to top
Re: New stuff on OS4Depot for AmigaO4.1 crashes on AmigaOS4.0
Supreme Council
Supreme Council


See User information
@salass00

Btw, how to you obtain the Library base? OpenLibrary() ?

What happens if the library doesn't exist at all in the client system?

Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
Go to top
Re: New stuff on OS4Depot for AmigaO4.1 crashes on AmigaOS4.0
Just can't stay away
Just can't stay away


See User information
@salass00

Quote:
[...]
int main () {
    if (!
CheckLibrary(MiniGLBaseMIN_VERSIONMIN_REVISION)) {
        
printf("Newer minigl.library needed! Upgrade ASAP.\n");
        return 
100;
    }
    
/* go on with program */
}
Don't return some random number from main() but always one of the defines from dos/dos.h
#define RETURN_OK 0 /* No problems, success */
#define RETURN_WARN 5 /* A warning only */
#define RETURN_ERROR 10 /* Something wrong */
#define RETURN_FAIL 20 /* Complete or severe failure*/

Go to top
Re: New stuff on OS4Depot for AmigaO4.1 crashes on AmigaOS4.0
Supreme Council
Supreme Council


See User information
@joerg

Changed it now, totally overlooked that :)

Simon

Go to top
Re: New stuff on OS4Depot for AmigaO4.1 crashes on AmigaOS4.0
Just popping in
Just popping in


See User information
@ZeroG

Quote:
And this link library only does a OpenLibrary("whatever.library", 0) call. It will open any version and the app will crash.


That still doesn't release you from the responsibility to check for the system revision when you use features added in that revision

Go to top
Re: New stuff on OS4Depot for AmigaO4.1 crashes on AmigaOS4.0
Supreme Council
Supreme Council


See User information
@tfrieden

How about a future OpenLibrary("my.library", version, revision) function in exec?

Of course, people could just add something like this to their programs:

struct LibraryOpenLibrary(STRPTR libraryNameULONG versionULONG revision)
 {
  
struct Library *base OpenLibrary(libraryName,0);

  if(
base==NULL)
  {
   return 
NULL;
  }

  if (
base->lib_Version version || (base->lib_Version == version && base->lib_Revision >= revision))
  {
    return 
base;
  }
  return 
NULL;
 }


Edited by orgin on 2008/9/8 19:01:23
Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
Go to top
Re: New stuff on OS4Depot for AmigaO4.1 crashes on AmigaOS4.0
Supreme Council
Supreme Council


See User information
I have updated the library checking tutorial quite a bit (mainly for SpotUp :), and there is some new code sections at the bottom which may prove useful.

Simon

Go to top
Re: New stuff on OS4Depot for AmigaO4.1 crashes on AmigaOS4.0
Amigans Defender
Amigans Defender


See User information
@tfrieden

People shouldn't be adding functions to libraries without bumping the version number, generally.

Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 2 ( 0 members and 2 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project