|
|
| 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 |
|
|
Hi
I'm confused 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
| 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 |
|
|
| 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: |
|
|
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: |
|
|
| 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: |
|
|
| got it, thanks
|
|
| Back to top |
|
 |
|