Welcome, Guest. Please login or register.

Author Topic: ANSI C++ forbids declaration `res' with no type  (Read 6786 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show all replies
    • http://www.SteamDraw.de
Re: ANSI C++ forbids declaration `res' with no type
« on: April 25, 2009, 10:03:56 PM »
Well, it would have helped had you posted the piece of code in question instead of just the error-message (I only have the MorphOS-Version of the MUI-includes at hand and I'm quite sure the inlines are somewhat different here).

But ....

MUI and C++ don't allways mix that well, so just calling gcc instead of g++ might allready make a differnce.
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show all replies
    • http://www.SteamDraw.de
Re: ANSI C++ forbids declaration `res' with no type
« Reply #1 on: April 25, 2009, 10:17:41 PM »
I would have needed the actual header file (you know the line where "res" is defined (without a type).

But...  ;-)

Since you allready include you might get away with commenting out.
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show all replies
    • http://www.SteamDraw.de
Re: ANSI C++ forbids declaration `res' with no type
« Reply #2 on: April 25, 2009, 10:32:19 PM »
main() certainly is NOT those headers, and if your missing it, something is rotten with your source-code.

I've just located a copy of the MUI3.8SDK on my hard-disk (sometimes being a messy pays ......), and the examples seem to only include when compiled with GNU and otherwise. Could you try some of those ?
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show all replies
    • http://www.SteamDraw.de
Re: ANSI C++ forbids declaration `res' with no type
« Reply #3 on: April 28, 2009, 08:03:32 PM »
DoMethod() is in amiga.lib, so you have to include the stubs for that. set ? I'm not 100% sure, but probraly it's just some macro falling back to SetAttrs() in intuition.

If you don't know how and where to include those stubs, you are obviously trying step 15 before step 8.

You may still go back to downloading the MUI-SDK (it's on the Aminet) adn try one of those examples.
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else