English Amiga Board


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

 
 
Thread Tools
Old 24 September 2013, 22:39   #1
Franchute13
Registered User
Franchute13's Avatar
 
Join Date: Feb 2013
Location: Argentina
Posts: 272
Problem compiling with AmiDevCpp

Sorry for my English.

I am inexperienced in C.
Install AmiDevCpp on my computer and I'm looking at the tutorial:
http://www.pcguru.plus.com/tutorial/amiga_c.html
In this example:
http://www.pcguru.plus.com/tutorial/screens.html
It gives me compilation error in line 15.
"Invalid conversion from` const char * 'to `UBYTE *'" (problem with "My New Screen" text)
and line 20:
"can not convert` NewScreen * 'to `Screen *' in initialization"

Where is the problem? This bad example?
Thx

Last edited by Franchute13; 24 September 2013 at 23:01.
Franchute13 is offline  
Old 25 September 2013, 16:07   #2
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
You can ignore the warning on the screen name or just cast it with (UCHAR*)"My screen name", there's probably some compiler option to suppress it. The last line is wrong and should read: if (myScreen) CloseScreen(myScreen);

You also need to link to the auto library, usually by specifying "-lauto" on the command line, but I don't use AmiDevCPP and can't help with how to configure it.
Leffmann is offline  
Old 26 September 2013, 15:01   #3
Franchute13
Registered User
Franchute13's Avatar
 
Join Date: Feb 2013
Location: Argentina
Posts: 272
Quote:
Originally Posted by Leffmann View Post
You can ignore the warning on the screen name or just cast it with (UCHAR*)"My screen name", there's probably some compiler option to suppress it. The last line is wrong and should read: if (myScreen) CloseScreen(myScreen);

You also need to link to the auto library, usually by specifying "-lauto" on the command line, but I don't use AmiDevCPP and can't help with how to configure it.
Thanks, it worked properly!
Franchute13 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
AmiDEVcpp: Allocating gfxdata in chip mem tolkien Coders. C/C++ 9 22 April 2013 20:21
Need Some Info About Compilng AmigaOS 3.x Binaries in AmiDevCpp Franz Bazarov Coders. General 9 14 May 2009 18:37
Help compiling winuaesrc1530 AAG support.WinUAE 2 08 January 2009 11:45
Compiling 1.3.4 rotacak support.WinUAE 70 22 January 2007 08:13
AmiDevCpp and Floats AmigaEd Coders. General 0 18 January 2006 03:16

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 16:20.


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