[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mkoctfile, need dynamic linking even for compiling a .cc file?
From: |
Henry F. Mollet |
Subject: |
Re: Mkoctfile, need dynamic linking even for compiling a .cc file? |
Date: |
Tue, 13 Jan 2004 20:55:34 -0800 |
User-agent: |
Microsoft-Entourage/10.1.1.2418 |
Many thanks. These .oct files are very large!? Probably should rename the
first one to MyHell.oct.
As you explained earlier, even if I had oregonator.m in the same directory,
oregonator.oct would be used. I saw no difference in speed when running
oregegonator.m but I would have to incorporate cputime () into the files
because both are completed so quickly.
Henry
-rwxr-xr-x 1 mollet staff 1010092 Jan 13 20:03 myhello.oct
-rw-r--r-- 1 mollet staff 577 Jan 13 20:08 myoregonator.cc
-rw-r--r-- 1 mollet staff 268080 Jan 13 20:11 myoregonator.o
-rwxr-xr-x 1 mollet staff 1026260 Jan 13 20:11 myoregonator.oct
octave:5> oregonator ([1,2,3], 0)
ans =
77.269353
-0.012942
-0.322000
on 1/13/04 7:52 PM, Paul Kienzle at address@hidden wrote:
> Is this possibly because you don't have write permission
> for the directory you are in [/doc/octave/examples]? The
> C example works because you are in one of your own
> directories [~/cando].
>
> Copy the oregonator.cc example somewhere in your
> local path and try again.
>
> Paul Kienzle
> address@hidden
>
> On Jan 13, 2004, at 9:54 PM, Henry F. Mollet wrote:
>
>> To *use* an .oct file, I must have an Octave version which supports
>> dynamic
>> linkng, which I don't have yet. Presumably it also means that I cannot
>> even
>> *compile* a .cc source file (to make my .oct executable file) for
>> practice
>> purposes? In contrast I can compile and run my own hello.c.
>> Henry
>>
>>
>> [~] tcsh:17> cd ../../sw/share/doc/octave/examples
>> [doc/octave/examples] tcsh:18> ls
>> Makefile info-emacs-info oregonator.cc
>> Makefile.in info-emacs-octave-help oregonator.m
>> hello.cc make_int.cc
>>
>> [doc/octave/examples] tcsh:19> mkoctfile oregonator.cc
>> /var/tmp//cc5GNwcZ.s:unknown:FATAL:can't create output file:
>> oregonator.o
>>
>> [doc/octave/examples] tcsh:31> mkoctfile hello.cc
>> /var/tmp//cc9Bo7wZ.s:unknown:FATAL:can't create output file: hello.o
>>
>> [~/cando] tcsh:36> gcc hello.c
>> hello.c: In function `main':
>> hello.c:3: warning: return type of `main' is not `int'
>> [~/cando] tcsh:37> a.out
>> Hello, World!
>> [~/cando] tcsh:38> cat hello.c
>> #include <stdio.h>
>> void main()
>> {
>> printf("Hello, World!\n");
>> }
>>
>>
>>
>>
>>
>> -------------------------------------------------------------
>> Octave is freely available under the terms of the GNU GPL.
>>
>> Octave's home on the web: http://www.octave.org
>> How to fund new projects: http://www.octave.org/funding.html
>> Subscription information: http://www.octave.org/archive.html
>> -------------------------------------------------------------
>>
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------