English Amiga Board


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

 
 
Thread Tools
Old 04 April 2017, 21:48   #1
jonesypeter
Registered User

 
Join Date: Mar 2017
Location: West Sussex
Posts: 20
Amiga Shopper C Guide Book - Using Amiga libraries Example

Hello,

I'm working through the Amiga Shopper C Guide Book, and have a problem with the example in the 'Using Amiga libraries' section. I have been looking at the code for a couple of days on and off and can't find what is wrong.

https://pastebin.com/DcN57h21

The error I get is DLINK Error: E:36 Undefined Symbol : _If (T:Window)

I'm using DICE C v3 Cutdown that game with Amiga Shopper.

Can anyone help please?

Thank you in advance
jonesypeter is offline  
Old 05 April 2017, 09:41   #2
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
It's a linker error, and if it's a cut down version of DICE like you say, then it might not come with all the linker libraries needed.

You could try removing the clib/ lines and adding these:
Code:
#include <stdlib.h>
#include <proto/intuition.h>
#include <proto/exec.h>
#include <proto/graphics.h>
IMO it's better to switch to SAS/C, there's a complete v6.58 download here in the forums.
Leffmann is offline  
Old 05 April 2017, 10:49   #3
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,349
I have that book, and don't remember having any issues with any of the examples in the book. Have you run any startup scripts or made the assigns that Dice needs? It's a long time since I installed it but you could be missing a drawer or something. You could also check that DCC is in the bin drawer and not in C: as that will mess with the relative paths.

Switching to a newer environment might be a good idea in general, but at the same time there's no reason that shouldn't work, other than some issue with the setup configuration.
Daedalus is offline  
Old 05 April 2017, 20:39   #4
jonesypeter
Registered User

 
Join Date: Mar 2017
Location: West Sussex
Posts: 20
Thanks everyone for the tips. I have checked that those paths for the includes exist in the directory structure and the startup file in the s folder contains a path to the include folder.

The only thing I did odd was edit it in notepad++ in windows and then copy back to my WinUAE Hard Disk folder. All the other 'Command Line' Examples have worked.
jonesypeter is offline  
Old 05 April 2017, 22:14   #5
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
It's not that the header files are missing, because the program compiles, rather it fails during linking.

The error message says that a symbol "If" can't be found during linking. Did you accidentaly type If with a capital 'I' somewhere maybe?

Last thing I can think of is to check that the character encoding in Notepad++ is set to ISO 8859-1.
Leffmann is offline  
Old 05 April 2017, 22:24   #6
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,928
And that Notepad++ doesn't use Windows CR/LF line ends.
idrougge is offline  
Old 19 April 2017, 23:31   #7
jonesypeter
Registered User

 
Join Date: Mar 2017
Location: West Sussex
Posts: 20
Thanks everyone, I think it was a combination of a restricted version of DICE, and a space where I should not have had one. All OK now.
jonesypeter 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
Hired Guns - full walkthrough or guide book? dex support.Games 10 26 July 2015 11:12
New Amiga Book - The Ultimate Guide to Amiga PD Games amigapd News 64 07 December 2014 00:55
Trade book "The Amiga Guru Book" for Amiga stuff copper38 Swapshop 6 31 January 2009 15:17
Amiga Format and Amiga Shopper Subscriber disks Galaxy AMR contributions 4 09 April 2007 17:23
Manuals, Guide book Lucy Amiga scene 14 23 June 2004 15:37

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


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