Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
sub modul_sub() attribute(used) defined in module ? Problem

 
Post new topic   Reply to topic    Forum Index -> ZBasic Native Mode
Author Message
ndudman



Joined: 25 Dec 2008
Posts: 79

Posted: 05 January 2009, 17:10 PM    Post subject: sub modul_sub() attribute(used) defined in module ? Problem Reply with quote

Hi

I'm confused Smile Heres a small test case with my problem

I'm trying to define in a module a sub called module_sub(), using the attribute used as I need to call it from c code and its not otherwise used within zbasic. Anyway it seems to me only if I call this subroutine from Main() does it get included.

Thanks
Neil



test.zip
 Description:

Download
 Filename:  test.zip
 Filesize:  7.79 KB
 Downloaded:  2374 Time(s)

Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 05 January 2009, 17:27 PM    Post subject: Re: sub modul_sub() attribute(used) defined in module ? Prob Reply with quote

ndudman wrote:
only if I call this subroutine from Main() does it get included.
I don't know yet why that is happening. As a workaround, you can have all unused code included by adding this option to your project file:
Code:
--optimize=no-unreferenced-code
Back to top
ndudman



Joined: 25 Dec 2008
Posts: 79

Posted: 05 January 2009, 21:57 PM    Post subject: Reply with quote

Thanks for the work around

Neil
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 06 January 2009, 19:53 PM    Post subject: Reply with quote

The compiler version v2.6.9 contains a correction for this issue. You can download the full installer or just the compiler via the Downloads Page.
Back to top
ndudman



Joined: 25 Dec 2008
Posts: 79

Posted: 09 January 2009, 15:13 PM    Post subject: Reply with quote

got it, thanks
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Native Mode Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group