Welcome, Guest. Please login or register.

Author Topic: Is this "Invalid types for assignment" freaking out?  (Read 2185 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Is this "Invalid types for assignment" freaking out?
« on: September 04, 2004, 07:28:02 PM »
You lack prototypes for various functions, namely OpenLibrary, CloseLibrary, and exit.

By default C compiler defaults to something like "int foo(...)", and obviously you can't assign integer to pointer with a cast.

Add
Code: [Select]

#include <stdlib.h>

#include <proto/exec.h>


stdlib.h for exit(), which btw needs an argument (return value).

proto/exec.h for OpenLibrary and CloseLibrary.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Is this "Invalid types for assignment" freaking out?
« Reply #1 on: September 04, 2004, 07:33:45 PM »
@Karlos

I'm always fast after sauna. :-)