English Amiga Board


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

 
 
Thread Tools
Old 25 November 2012, 21:55   #1
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
SDL problem.

I have installed SDL 1.2.14 into CubicIDE to program with GCC. It finds the includes and link with lSDL but when I try to compile a simple example i get this error:

/gg/os-include/SDL/SDL_stdinc.h:66 inttypes.h: No such file or directory.

Any idea of the problem?

Thanks!
tolkien is offline  
Old 26 November 2012, 04:16   #2
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Building the SDL will be a bit painful, I've tried it myself and had to give up because the code was giving me a headache.

I do have a copy of inttypes.h but I think that will only be the start of your issues.
NovaCoder is offline  
Old 26 November 2012, 06:49   #3
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
So Its better use another thing in 68k instead of SDL...What a shame. Any other recomendation to program in windows and amigaos? Allegro?

Thanks NovaCoder.
tolkien is offline  
Old 26 November 2012, 09:44   #4
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
I've uploaded the version that I've been using in the Zone for you, it's useful for prototyping but I wouldn't want to use it to actually release anything again.

Quote:
Short: Version 1.2.6 of Amiga SDL audio/video library
Author: Gabriele Greco
Uploader: gabriele.greco@aruba.it
Version: 1.2.6
Type: dev/misc
Replaces: SDL-Amiga.lha

This is the porting of 1.2.6 version of SDL (the latest stable one)
to AmigaOS 68k and MorphOS.

OpenGL is temporary left out from this version since at the moment is quite
unusable and it will be so until we have a complete OpenGL hardware implementation
on a NATIVE operative system (SDL Warpos + Warp3D is NOT enough to run modern OpenGL
games without a lot of reworking).

All the bugs known of the past version have been corrected. And I've
added all the new SDL features.

This version of SDL needs Cybergraphx V3 (r69+) or CyberGraphX V4
and AHI v3+. It works also with P96, althrough there are still some color
problems with certain bitperpixel values.
Maybe it works also with CGXAga, but it's untested.

Implemented:

- 8/16/24/32bit video modes, both fullscreen and windowed.
- CGX hardware surfaces (blitting acceleration, also in colorkey blitting)
- AHI audio (8/16 bit, with any audio format), always uses unit 0 for now.
- Thread & semaphores support through exec/execppc.
- Window resizing and backdrop windows
- Joystick/Joypad support.
- OpenGL (through StormMESA and Warp3D) (not compiled in in this version)

To do:

- CDRom audio playing support

The SASC/GCC/Morphos libraries are distributed with debug enabled, to strip debug info
with SASC simply add STRIPDEBUG argument to the linker and define a FAKE kprintf, with gcc
run "strip" on your binaries.
Otherwise if you want to see debug infos link with the included debug.lib/libdebug.a.

Installation:

1) Shared library (every language/compiler, 68k)

- cd the main directory SDL

- copy libs/SDL.library libs:

- If your compiler is SAS:
copy include/clib/#? include:clib/
copy include/pragmas/#? includeragmas/
copy include/SDL include:SDL all

- If your compiler is GCC:
copy include/inline/#? gg:include/inline
copy include/SDL gg:include/SDL all
copy bin/sdl-config gg:bin

- Otherwise:
use the provided file fd/SDL.fd with include/clib/SDL_protos.h to produce a working
stub library/inline/pragma suited for your compiler/language, one program that does
this for various compilers is fd2pragma, available in Aminet.

2) SAS/C:
- copy lib/#?.lib sc:lib
- add the directory where SDL includes are stored to your makefile with IDIR=dir or
copy includes to your include: assign (copy include/#? include
- Add to your link directive in the makefile "LIB lib:sdl.lib lib:debug.lib" for
nonGL apps and "LIB lib:sdlgl.lib lib:mesa.lib lib:debug.lib" for GL apps.
- You can get rid by debug.lib if you define an empty kprintf() in your code.


3) GCC/68k:
- copy lib/#?.a gg:lib/
- copy bin/sdl-config gg:bin
- place the SDL includes in ggs-include or in a custom directory and add it to your
include search path with -Idir.
- link with -lSDL -ldebug -lpthread (-lSDLgl -lGL -ldebug -lpthread for gl apps).
Pthread is required since ixemul libc is not multithread safe (you can omit it if
you are using a single thread).
- you can both link it with or without ixemul, but libnix executables (-noixemul) has
better performances

4) GCC/MorphOS:
- copy lib_mos/#?.a gg:lib/
- copy bin/sdl-config gg:bin
- place the SDL includes in ggs-include or in a custom directory and add it to your
include search path with -Idir.
- link with -lSDL -ldebug (gl apps NOT supported).
- debug kprintf are disabled by default unless you have ggdebug.library (on aminet) in
your libs directory, you can anyway build a fake kprintf and link without -ldebug.
- you can both link it with or without ixemul, but libnix executables (-noixemul) has
better performances, also note that libnix is almost threadsafe while morphos ixemul
is not, so you may have problems with ixemul multithread programs.

The provided examples and SDLroids use the shared 68k library.

More info on my webpage (http://ggreco.interfree.it/sdl.html) or the SDL Amiga related
mailinglist:
SDL-Amiga@yahoogroups.com


Source:

The source of SDL is available in a separate archive on my web page or in the official
source package at www.libsdl.org (get the CVS version if you have cvs installed).

You can find a lot of stuff that often compiles with a simple "make" on the
OFFICIAL libSDL website:

http://www.libsdl.org

This site includes lots of games, utility, docs about SDL and SDL programming,
with your contribution we will be able to port TONS of application to AmigaOS!

You can find some informations and download specific of the SDL amiga
implementation at the following URL:

http://ggreco.interfree.it/sdl.html
NovaCoder is offline  
Old 26 November 2012, 18:35   #5
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
Hey! Thanks! I have to download now. You´re a helpful man!
tolkien is offline  
Old 26 November 2012, 22:50   #6
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
Good....Now I can compile the examples that come with the archive but I have to learn how to compile the rest of examples cos have the same error... What libs are necessary to link? What flags? Lets go to study a bit more...
tolkien is offline  
Old 26 February 2015, 14:20   #7
AF2013
Registered User
 
Join Date: Apr 2013
Location: .
Posts: 250
How it going now with SDL? it is getting better or worse?
AF2013 is offline  
Old 26 February 2015, 17:30   #8
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
It works well with some limitations. I can use it only with amidevcpp. I have tried with other compilers but have errors. Also the lack of timers is an issue to me.
Novacoder has used it un various ports and you can see examples in youtube.
tolkien is offline  
Old 23 March 2015, 06:31   #9
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
I am working (slowly) on a new version that uses v1.2.15 which was the last one before they completely changed everything with v2.

This version will support Timers and RTG + AGA

Last edited by NovaCoder; 24 March 2015 at 06:05.
NovaCoder is offline  
Old 23 March 2015, 20:48   #10
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
Yeah! Timers support! I'm a bad thing without them. Are they slow or anything?
tolkien is offline  
Old 24 March 2015, 03:29   #11
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Quote:
Originally Posted by tolkien View Post
Yeah! Timers support! I'm a bad thing without them. Are they slow or anything?
Not really, they do require threading support to be enabled.

Basically I took a the 'clean' 1.2.15 source code then merged the nasty old RTG SDL code into it.

It seems to work but some features aren't supported yet (like window resizing). There's also the same old problems around colors getting mixed up, this is because Amiga's implementation of RTG is such a mess (there's no standard color format).

When I've got it working OK, I'll copy the AGA code across so both RTG and AGA will be supported by the same link library.
NovaCoder 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
use SDL 1.2.13 with AmyDevCpp TheDarkCoder Coders. General 3 18 August 2009 20:55
req details for sdl turrican3 request.Other 0 20 April 2008 22:06
WinUAE w/SDL mangamuscle request.UAE Wishlist 8 31 January 2007 11:41
sdl 68k on my amiga mrodfr support.Apps 0 19 November 2006 16:23
What do you know about Amiga SDL? Tolismlf Amiga scene 6 15 November 2004 18:54

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 17:58.

Top

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