mkoctfile command not found, from linux shell prompt

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

mkoctfile command not found, from linux shell prompt

shravan61
Hi,

I have octave installed, I can open the tool and run simulations. But when I try to compile cpp files to create oct files, I can only do it octave tool but not from linux shell.

I want to create a makefile to compile bunch of cpp files to create oct files. I want to run the makefile from linux shell prompt. When I try to do this, I get an error saying "mkoctfile command not found".

May I know how to setup mkoctfile to run from linux command line?

Thanks
Shravan
Reply | Threaded
Open this post in threaded view
|

RE: mkoctfile command not found, from linux shell prompt

john.2.tomlinson
> May I know how to setup mkoctfile to run from linux command line?

The first thing to check is that your PATH environment variable points to the location where octave is installed.

In command line type:

echo $PATH

Then look at the list that comes back and check that it includes the path to where octave is installed.

You could also type:

which mkoctfile

and see if anything useful is return.

John Tomlinson
Radio Planning Tools
BT Radio Platform Team

-----Original Message-----
From: help-octave-bounces+john.2.tomlinson=[hidden email] [mailto:help-octave-bounces+john.2.tomlinson=[hidden email]] On Behalf Of shravan61
Sent: 13 May 2015 02:18
To: [hidden email]
Subject: mkoctfile command not found, from linux shell prompt

Hi,

I have octave installed, I can open the tool and run simulations. But when I try to compile cpp files to create oct files, I can only do it octave tool but not from linux shell.

I want to create a makefile to compile bunch of cpp files to create oct files. I want to run the makefile from linux shell prompt. When I try to do this, I get an error saying "mkoctfile command not found".

May I know how to setup mkoctfile to run from linux command line?

Thanks
Shravan



--
View this message in context: http://octave.1599824.n4.nabble.com/mkoctfile-command-not-found-from-linux-shell-prompt-tp4670360.html
Sent from the Octave - General mailing list archive at Nabble.com.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: mkoctfile command not found, from linux shell prompt

shravan61
Hi John,

Thanks a lot for your reply. I added the octave installation path to $PATH.

I tried to compile using mkoctfile from linux shell prompt, I got the following error.

>> mkoctfile src/octv1op1res.cpp -I../clib/src -o  bin/octv1op1res
src/octv1op1res.cpp:1:24: error: octave/oct.h: No such file or directory
src/octv1op1res.cpp:9: error: expected constructor, destructor, or type conversion before '(' token

When I do the same from octave tool, I don't see any error and octv1op1res.oct file is created. Any idea why I am seeing the above error from linux shell prompt. Do I have to set any other path?

Thanks
Shravan
Reply | Threaded
Open this post in threaded view
|

Re: mkoctfile command not found, from linux shell prompt

tmacchant
----- Original Message -----

> From: shravan61 
> To: help-octave
> Cc:
> Date: 2015/5/14, Thu 05:47
> Subject: RE: mkoctfile command not found, from linux shell prompt
>
> Hi John,
>
> Thanks a lot for your reply. I added the octave installation path to $PATH.
>
> I tried to compile using mkoctfile from linux shell prompt, I got the
> following error.
>
>>>  mkoctfile src/octv1op1res.cpp -I../clib/src -o  bin/octv1op1res
> src/octv1op1res.cpp:1:24: error: octave/oct.h: No such file or directory
> src/octv1op1res.cpp:9: error: expected constructor, destructor, or type
> conversion before '(' token
>
> When I do the same from octave tool, I don't see any error and
> octv1op1res.oct file is created. Any idea why I am seeing the above error
> from linux shell prompt. Do I have to set any other path?
>
> Thanks
> Shravan
>



>>> mkoctfile src/octv1op1res.cpp -I../clib/src -o  bin/octv1op1res

> src/octv1op1res.cpp:1:24: error: octave/oct.h: No such file or directory
> src/octv1op1res.cpp:9: error: expected constructor, destructor, or type
> conversion before '(' token


How did you install octave?
(Please clarify the OS, distro(ubunutu etcs.) and other information(machine information).

Perhaps environmental variable setting for your octave is corrupt.

Try mkoctfile -v or mkoctfile --verbose to clarify how command line expanded in details.

$ mkoctfile -v src/octv1op1res.cpp -I../clib/src -o  bin/octv1op1res



In your case, perhaps CPPFLAGS, LDFLAGS, etcs are required to be set.

Tatsuro

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: mkoctfile command not found, from linux shell prompt

shravan61
I tried running

mkoctfile -p ALL_CFLAGS

It gives different path from octave tool and linux shell prompt.

How do I set the ALL_CFLAGS to give the same path from linux shell and octave tool?  

Thanks
Shravan
Reply | Threaded
Open this post in threaded view
|

Re: mkoctfile command not found, from linux shell prompt

tmacchant
----- Original Message -----

> From: shravan61 
> To: help-octave
> Cc:
> Date: 2015/5/14, Thu 09:18
> Subject: Re: mkoctfile command not found, from linux shell prompt
>
> I tried running
>
> mkoctfile -p ALL_CFLAGS
>
> It gives different path from octave tool and linux shell prompt.
>
> How do I set the ALL_CFLAGS to give the same path from linux shell and
> octave tool? 
>


You can change like:

$ ALL_CFLAGS='what you want to set' mkoctfile .................

I recommend you to write a shell script.

Tatsuro

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: mkoctfile command not found, from linux shell prompt

shravan61
I think you are suggesting to set environment variable.

I tried setenv ALL_CFLAGS '/home/shravang/octave-2015-04-10-22-25-suse/bin'

But this will set environment variable. I am not sure how mkoctfile will pick this.

then I tried mkoctfile -p ALL_CFLAGS

But it doesn't return '/home/shravang/octave-2015-04-10-22-25-suse/bin', it returns something other path.
Reply | Threaded
Open this post in threaded view
|

RE: mkoctfile command not found, from linux shell prompt

john.2.tomlinson
In reply to this post by shravan61
>Hi John,

>Thanks a lot for your reply. I added the octave installation path to $PATH.

>I tried to compile using mkoctfile from linux shell prompt, I got the following error.

>> mkoctfile src/octv1op1res.cpp -I../clib/src -o  bin/octv1op1res
>src/octv1op1res.cpp:1:24: error: octave/oct.h: No such file or directory
>src/octv1op1res.cpp:9: error: expected constructor, destructor, or type conversion before '(' token

>When I do the same from octave tool, I don't see any error and octv1op1res.oct file is created. Any idea >why I am seeing the above error from linux shell prompt. Do I have to set any other path?

>Thanks
>Shravan


It looks like you may need to add another '-I DIR' to your command line pointing at the octave include directory.

Having said this I agree with Tatsuro: your installation doesn't look complete.


John Tomlinson
Radio Planning Tools
BT Radio Platform Team


--
View this message in context: http://octave.1599824.n4.nabble.com/mkoctfile-command-not-found-from-linux-shell-prompt-tp4670360p4670374.html
Sent from the Octave - General mailing list archive at Nabble.com.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: mkoctfile command not found, from linux shell prompt

tmacchant
In reply to this post by shravan61




----- Original Message -----

> From: shravan61
> To: help-octave
> Cc:
> Date: 2015/5/14, Thu 14:23
> Subject: Re: mkoctfile command not found, from linux shell prompt
>
> I think you are suggesting to set environment variable.
>
> I tried setenv ALL_CFLAGS
> '/home/shravang/octave-2015-04-10-22-25-suse/bin'
>
> But this will set environment variable. I am not sure how mkoctfile will
> pick this.
>
> then I tried mkoctfile -p ALL_CFLAGS
>
> But it doesn't return
> '/home/shravang/octave-2015-04-10-22-25-suse/bin', it
> returns something other path.
>

Sorry ALL_CFLAGS (perhaps other ALL_????) is read only.

You should set CFLAGS, CXXFLAGS, FFFLAGS, LDFLAGS, CPPFLAGS etcs.


HTH



Tatsurp

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave