English Amiga Board


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

 
 
Thread Tools
Old 07 August 2014, 11:58   #1
watertonian
2 1200s in Wisconsin
 
watertonian's Avatar
 
Join Date: Mar 2008
Location: Wisconsin, USA
Age: 46
Posts: 115
Send a message via AIM to watertonian Send a message via Yahoo to watertonian
Iff.library and gcc

Hello all. Trying to write a video game, and I'm using gcc to compile it. I can open the screen, but I can't get the title pic to show. (320x200x32 Iff pic done in Deluxe Paint) I have the header for iff.library, but none of the commands link. I think the problem is with the sas/C header style, but I'm not sure. Anybody else have this problem?
watertonian is offline  
Old 07 August 2014, 12:37   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
You can create all kinds of header files with fd2pragma. For GCC you need inline/iff.h IIRC.

http://aminet.net/package/dev/misc/fd2pragma
the latest version comes with VBCC: http://sun.hasenbraten.de/vbcc/
thomas is online now  
Old 07 August 2014, 22:43   #3
watertonian
2 1200s in Wisconsin
 
watertonian's Avatar
 
Join Date: Mar 2008
Location: Wisconsin, USA
Age: 46
Posts: 115
Send a message via AIM to watertonian Send a message via Yahoo to watertonian
Ah, thanks. Will try when done with my after work nap.
watertonian is offline  
Old 10 September 2014, 04:13   #4
watertonian
2 1200s in Wisconsin
 
watertonian's Avatar
 
Join Date: Mar 2008
Location: Wisconsin, USA
Age: 46
Posts: 115
Send a message via AIM to watertonian Send a message via Yahoo to watertonian
OK, gave up on gcc, and went with vbcc. (gcc doesn't like to put stuff into chip ram for some reason, kind of essential when dealing with bitmaps..) got everything gfx-wise to work, now just have to figure out how to parse joystick input. Along with drawing some better graphics.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-09-09-20-53-03.jpg
Views:	324
Size:	121.1 KB
ID:	41466  
watertonian is offline  
Old 11 September 2015, 00:44   #5
desiv
Registered User
 
desiv's Avatar
 
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,767
Seems like a good thread to poke at for this..
Just going with vbcc..

I'm going to want to poke around with iff.library, but not sure what I need to do to add it..

I tried just copying the iff.h file to /opt/m68k-amigaos/os-include/libraries/ and then compiling the test app (EasyExample.c) and got some errors.
(Didn't really expect it to work just like that, but.. ;-)

-------------

villdesi@dbv-lnx-vm:~/amigaos$ vc -o EasyExample EasyExample.c
>struct Library *IntuitionBase,
warning 68 in line 34 of "EasyExample.c": redeclaration of var <IntuitionBase> with new type
>{
warning 121 in line 133 of "EasyExample.c": return type of main is not int
fileiOdhbV.o: In "_DisplayILBM":
Error 21: fileiOdhbV.o (CODE+0x136): Reference to undefined symbol _IFFL_OpenIFF.
Error 21: fileiOdhbV.o (CODE+0x148): Reference to undefined symbol _IFFL_GetBMHD.
Error 21: fileiOdhbV.o (CODE+0x1ba): Reference to undefined symbol _IFFL_GetViewModes.
Error 21: fileiOdhbV.o (CODE+0x1ea): Reference to undefined symbol _IFFL_GetColorTab.
fileiOdhbV.o: In "l29":
Error 21: fileiOdhbV.o (CODE+0x224): Reference to undefined symbol _IFFL_DecodePic.
fileiOdhbV.o: In "l37":
Error 21: fileiOdhbV.o (CODE+0x288): Reference to undefined symbol _IFFL_CloseIFF.
fileiOdhbV.o: In "l46":
Error 21: fileiOdhbV.o (CODE+0x3c6): Reference to undefined symbol _IFFL_IFFError.
vlink -bamigahunk -x -Bstatic -Cvbcc -nostdlib /opt/m68k-amigaos/vbcc-lib/startup13.o "/tmp/fileiOdhbV.o" -s -L/opt/m68k-amigaos/vbcc-lib -L/opt/m68k-amigaos/vbcc-include -lvc -lamiga -o EasyExample failed

--------------

Any pointers on where I should start looking?

Thanx!

desiv
desiv is offline  
Old 11 September 2015, 04:30   #6
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Sounds like you need to link something.
Samurai_Crow is offline  
Old 11 September 2015, 04:37   #7
desiv
Registered User
 
desiv's Avatar
 
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,767
Quote:
Originally Posted by Samurai_Crow View Post
Sounds like you need to link something.
Hmm..
That sounds familiar (it has been 20+ years!!! :-)...
There's a makefile in the iff.library examples directory, so I'll take a look..

Thanx

Probably going to have to dig deeper into vbcc..
I can't see any command line options for vc (vc --help and vc /? don't do anything)...

As for the iff.library, I don't see any .o files in the archive to link. There is of course, the iff.library, which goes with the program (i.e. not linked). There is also a file called iff.lib, but for now, I'm not sure what to do with it...
Looked at the makefile, but didn't see anything obvious. It does mention something called lcr.lib, but I'm not sure how that would help the error I'm seeing... (Then again, I don't know) And I don't see an lcr.lib file around...
(Oh, I think the lcr.lib is something that would be used if I were using lattice C)

Long day anyway, maybe it'll make more sense after I read some docs.. ;-)

desiv

Last edited by desiv; 11 September 2015 at 05:34.
desiv is offline  
Old 11 September 2015, 07:44   #8
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Same reply as above: you need to create proper proto and inline header files with fd2pragma. For vbcc the inline file is called iff_protos.h. Check the options section of vbcc:doc/fd2pragma.guide.

In your program always #include <proto/iff.h> rather than <clib/iff_protos.h>. And never include <pragmas/iff.h>, it has no meaning for vbcc.
thomas is online now  
Old 11 September 2015, 08:23   #9
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
Quote:
Originally Posted by desiv View Post
Hmm..
Probably going to have to dig deeper into vbcc..
I can't see any command line options for vc (vc --help and vc /? don't do anything)...
The vbcc docs are at the following link and they are useful.

http://server.owl.de/~frank/vbcc/docs/vbcc.pdf

The vc utility is fairly minimal currently.
matthey 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
I need An IFF/8SVX and an IFF/ANIM Player for PC searcher request.Apps 24 02 July 2020 12:09
GCC and ixemul.library Rixa Coders. Language 24 10 November 2016 23:18
HELP: Opus5, KingCON, SysInfo.library (Sysmon.library) triangle Michael support.Apps 6 10 March 2014 14:08
Trying to use a library in StromC V4 (default gcc compiler) NovaCoder Coders. General 3 09 September 2009 01:38
Making a shared library from a gcc .a library JoJo Coders. General 1 10 March 2003 19:06

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 10:45.

Top

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