English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 18 November 2021, 20:51   #1
makaron
Registered User
 
Join Date: Nov 2021
Location: Edinburgh
Posts: 2
Issues with compiling examples from NDK3.2

Hi

I am having issues with setting cross compiler to allow me to compile examples from NDK3.2 (I did try examples from NDK3.9 and I had similar issue)

I built https://github.com/bebbo/amiga-gcc targeting NDK3.2 and everything went ok.

But when I try to use it for 3.2 examples using following command 4
Code:
m68k-amigaos-gcc -noixemul -m68030 -I/mnt/c/Repo/\!AmigaDev/include -o main main.c

I got following errors

Code:
main.c:458:0: error: unterminated argument list invoking macro "NewObject"
main.c:60:16: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
     Win_Object = WindowObject,
                ^
main.c:60:5: error: expected ';' at end of input
     Win_Object = WindowObject,
     ^~~~~~~~~~
main.c:60:5: error: expected declaration or statement at end of input

what am I missing?
makaron is offline  
Old 18 November 2021, 22:25   #2
javierdlr
Registered User
 
Join Date: Sep 2021
Location: Donostia (GUIPUZCOA)
Posts: 7
Quote:
Originally Posted by makaron View Post
Hi
...
Code:
main.c:458:0: error: unterminated argument list invoking macro "NewObject"
main.c:60:16: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
     Win_Object = WindowObject,
                ^
main.c:60:5: error: expected ';' at end of input
     Win_Object = WindowObject,
     ^~~~~~~~~~
main.c:60:5: error: expected declaration or statement at end of input

what am I missing?
AFAIK for every "[Window]Object," you create, you need the "End" if you're using macros or "TAG_END)" and comma "," or semicolon ";"
Take a llook at those source examples: http://aminet.net/dev/c/reaction_dn.lha
javierdlr is offline  
Old 18 November 2021, 22:27   #3
makaron
Registered User
 
Join Date: Nov 2021
Location: Edinburgh
Posts: 2
Those are examples from NDK3.2 example folder, so I would be very surprised that they contain errors?
makaron is offline  
Old 21 November 2021, 10:10   #4
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by makaron View Post
Those are examples from NDK3.2 example folder, so I would be very surprised that they contain errors?

the default inline calls for varargs to not support nesting.
=> add -DNO_INLINE_STDARG
e.g.


m68k-amigaos-gcc -noixemul -DNO_INLINE_STDARG -Os Buttons.c -o Buttons
bebbo is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
AMOS examples alain.treesong Coders. AMOS 38 03 December 2023 19:27
gcc and NDK3.2 alancfrancis Coders. C/C++ 2 17 August 2021 14:36
midi asm examples? motosega Coders. Asm / Hardware 8 20 September 2017 15:45
OS 3.9 Includes headers missing(as installed from NDK3.9) frotzen Coders. General 4 09 July 2007 02:40
Plasma examples anyone? jobro Coders. General 5 27 November 2005 17:25

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:22.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08103 seconds with 13 queries