FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What am I doing wrong here?

 
Post new topic   Reply to topic     Forum Index -> ArcLib
View previous topic :: View next topic  
Author Message
CodexArcanum



Joined: 23 Oct 2007
Posts: 8

PostPosted: Tue Oct 30, 2007 10:35 am    Post subject: What am I doing wrong here? Reply with quote

This is likely a simple issue, maybe something to do with Tango or the latest version of ArcLib, but what's going on with this:

I copied the code from http://svn.dsource.org/projects/arclib/branches/api/arc02/arc.input.html to use as a test for my install. I'm using Tango and the Tango ArcLib v2, both installed with DSSS. When I go to build the above test program, I get this:

Code:
c:\D\project>dsss build
main.d => main
+ C:\D\dsss\bin\rebuild.exe -Idsss_imports\ -I. -S.\ -IC:\D\dsss\include\d -SC:\
D\dsss\lib\  -IC:\D\dsss\include\d -SC:\D\dsss\lib  -oqdsss_objs\D  main.d -ofma
in
main.d(12): Error: undefined identifier SDL_QUIT
main.d(47): Error: undefined identifier module input.modHit
main.d(47): Error: undefined identifier LSHIFT
main.d(47): Error: function expected before (), not module input.modHit of type
void
main.d(48): Error: undefined identifier module input.modDown
main.d(48): Error: undefined identifier LSHIFT
main.d(48): Error: function expected before (), not module input.modDown of type
 void
Command C:\D\dsss\bin\rebuild.exe returned with code 1, aborting.
Error: Command failed, aborting.


I tried using the old ArcLib tutorial and got errors about Point and Color not being supported types as well, so it seems like I'm not importing something I should be or something. What's going on?
Back to top
View user's profile Send private message
ChristianK



Joined: 26 Sep 2006
Posts: 159
Location: Berlin, Germany

PostPosted: Tue Oct 30, 2007 11:50 am    Post subject: Re: What am I doing wrong here? Reply with quote

CodexArcanum wrote:

Code:
c:\D\project>dsss build
main.d => main
+ C:\D\dsss\bin\rebuild.exe -Idsss_imports\ -I. -S.\ -IC:\D\dsss\include\d -SC:\
D\dsss\lib\  -IC:\D\dsss\include\d -SC:\D\dsss\lib  -oqdsss_objs\D  main.d -ofma
in
main.d(12): Error: undefined identifier SDL_QUIT
main.d(47): Error: undefined identifier module input.modHit
main.d(47): Error: undefined identifier LSHIFT
main.d(47): Error: function expected before (), not module input.modHit of type
void
main.d(48): Error: undefined identifier module input.modDown
main.d(48): Error: undefined identifier LSHIFT
main.d(48): Error: function expected before (), not module input.modDown of type
 void
Command C:\D\dsss\bin\rebuild.exe returned with code 1, aborting.
Error: Command failed, aborting.


This, unfortunately, is an outdated documentation issue. SDL_QUIT should be ARC_QUIT, the functionality of modHit is contained in keyPressed(ARC_LSHIFT) and similar. I've committed a documentation fix.

Quote:

I tried using the old ArcLib tutorial and got errors about Point and Color not being supported types as well, so it seems like I'm not importing something I should be or something. What's going on?


Try importing arc.types, it publicly imports modules with the most often used types.

I hope that helped! Smile
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue Oct 30, 2007 1:07 pm    Post subject: Reply with quote

You have just discovered an issue with outdated documentation examples, sorry. Sad The tutorials may be slightly out of date as well.

Neither of us have enough time to really double check all the doc examples and make sure they work.

With that said,... the generated ddoc files should be reliable (besides the example code) as if you browse the arc.input functions in the docs, you will see there is no 'modHit' function anymore. All the equivalent example code that will work can be found here:

http://svn.dsource.org/projects/arclib/branches/arc02/tango/unittest/

Here is the specific file you are looking for: http://svn.dsource.org/projects/arclib/branches/arc02/tango/unittest/input.d

Have fun! Smile
Back to top
View user's profile Send private message AIM Address
CodexArcanum



Joined: 23 Oct 2007
Posts: 8

PostPosted: Tue Oct 30, 2007 6:04 pm    Post subject: Reply with quote

Thanks a lot for the help guys, that resolves it. No worries about documentation, it's hard to keep up development and document at the same time.

Thank you also for the unit test link. They built just fine, so I look forward to using them as reference and tutorial.

Hmm... except they don't run. That's weird. "Text" runs, shows a little message in the console. The other ones, though, don't even show a GLWindow, let alone start showing anything else. They just show a blank line for a second, the drop back to command line. Any thoughts on that?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ArcLib All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group