OSLO EDU version can't open #include file.

38 views
Skip to first unread message

Steve King

unread,
May 23, 2012, 12:17:10 PM5/23/12
to oslo...@googlegroups.com
In the OSLO User Guide in Chapter 8 - Programming there is an example "Defining a new command: xmt".  Following their example works fine up to and including producing the first graph.  However, when I cut and pasted the full ccl listing (I put in the correct path for the gendefs.h file) and tried to run it I got the error "Cannot open #include file".  I tried moving the gendefs.h file to the C root directory (and changed ccl #include path) but with no success.

Typing in the xmt command still produces a graph but there are no tick marks or labels.  Is this just a limitation of the EDU version?

Steve

Dr. Eck

unread,
May 23, 2012, 6:01:09 PM5/23/12
to OSLO-Talk
Steve,

Congratulations! You are the first to discover that "feature". OSLO
6.6 is the first version to allow users to put their private folder
wherever they want. Previously, the private folder was right next to
the public folder, so the #include worked as advertised. To get it to
work now you will need to copy the entire OSLO66 EDU/public/ccl/inc
folder to your private/ccl folder and use
#include "inc/gendefs.h"

The tic marks work in my copy of OSLO66 EDU. Please check the
following lines of code:
moveto(0, 0);// draw x-axis (range 0...1)
lineto(1, 0);
for (iplt = 1; iplt <11; iplt++)
{
moveto(iplt*0.1, 0);//draw x-axis ticks
linerel(0, -2);
}
moverel(-0.2,-10);
label("Rel.Obj.Ht.");//label x-axis
moveto(0, 0);// draw y-axis (range 0...100)
lineto(0, 100);
for (iplt = 1; iplt <11; iplt++)
{
moveto(0,iplt*10);//draw y-axis ticks
linerel(-0.02,0.0);
}
moverel(-0.1,0);
label("%s","100%");//label y-axis
The tic marks are drawn using moveto and linerel, just like all of the
other lines, so I can't think of a reason they wouldn't work.

Steve E.

On May 23, 11:17 am, Steve King <steveandkathyk...@sbcglobal.net>
wrote:
> In the OSLO User Guide in Chapter 8 - Programming there is an example "*Defining
> a new command: xmt*".  Following their example works fine up to and
> including producing the first graph.  However, when I cut and pasted the
> full ccl listing (I put in the correct path for the gendefs.h file) and
> tried to run it I got the error "*Cannot open #include file*".  I tried
> moving the gendefs.h file to the C root directory (and changed ccl #include
> path) but with no success.
>
> Typing in the *xmt* command still produces a graph but there are no tick

Dr. Eck

unread,
May 23, 2012, 6:05:12 PM5/23/12
to OSLO-Talk
I forgot to mention that there are only two axis labels: "100%" on
the y-axis and "Rel.Obj.Ht." on the x-axis. Any additional eye candy
is left as an exercise for the student. ;-)

On May 23, 11:17 am, Steve King <steveandkathyk...@sbcglobal.net>
wrote:
> In the OSLO User Guide in Chapter 8 - Programming there is an example "*Defining
> a new command: xmt*".  Following their example works fine up to and
> including producing the first graph.  However, when I cut and pasted the
> full ccl listing (I put in the correct path for the gendefs.h file) and
> tried to run it I got the error "*Cannot open #include file*".  I tried
> moving the gendefs.h file to the C root directory (and changed ccl #include
> path) but with no success.
>
> Typing in the *xmt* command still produces a graph but there are no tick

Stephen King

unread,
May 24, 2012, 4:01:31 PM5/24/12
to oslo...@googlegroups.com
Thanks Doc,

Copying the inc folder to my Private directory did the trick!  For some reason even the tic marks now work.  OSLO should pay you for keeping us newcomers interested in this program!

By the way, I followed the User Guide tutorial along to add the icon to the graphics window toolbar.  Although there were compilation errors the icon still showed up on the graphics window toolbar and works fine.

Thanks,

Steve King

--- On Wed, 5/23/12, Dr. Eck <dr.e...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "OSLO-Talk" group.
To post to this group, send email to oslo...@googlegroups.com.
To unsubscribe from this group, send email to oslo-talk+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/oslo-talk?hl=en.

Reply all
Reply to author
Forward
0 new messages