[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strcat not found--MinGW
From: |
Daryl Lee |
Subject: |
Re: strcat not found--MinGW |
Date: |
Mon, 02 May 2011 10:40:30 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 |
On 5/2/2011 9:57 AM, Ben Abbott wrote:
On May 2, 2011, at 11:35 AM, Daryl Lee wrote:
On 4/30/2011 4:49 PM, wahaj87 wrote:
Hi Daryl Lee
Your program is very nice. I am learning from it. Here is simple solution
for your problem.
1 - I used this command to build the stand alone executable on vista and xp
machines.
mkoctfile -Lc:\Octave\lib -LC:\octave\include\octave-3.2.4\octave
--link-stand-alone test2.cpp -o test2
above command is little different from yours, I think some path is not seen
by octave compiler on my computer for lapack library, so I manually given
the library path.
Now I opened a command prompt, and cd to the directory where i have
test2.exe, and run it. The same error you mention pop up. You know why ?
This is also a path problem. So to make it right quickly , I copied the
strcat.m from directroy "C:\Octave\share\octave\3.2.4\m\strings" to
directory where test2.exe exists. Run it again. Again two errors pop up ,
demanding max and find undefined. So I again copied max.oct and find.oct
from directory "C:\Octave\libexec\octave\3.2.4\oct\i686-pc-mingw32", to
directory where test2.exe exists. Now I run the test2.exe ! and wow it says
in output :
Good morning,Hero
tHAtS IT.--
This is very helpful. But I'm not likely to go scouring the Octave
installation looking for files to copy every time I write a program. What I
did was modify my program to do this:
function [resultString] = example2(inString)
resultString = path;
end
When I run my stand-alone program under Linux, I get the full Octave path, identical to
what I get when I run it from the Octave console. When I run it under MinGW/MSYS, I get
only ".". So now my question is, how do I get Octave to know the full search
path under MinGW/MSYS, as it does under Linux?
--
Daryl Lee
I haven't seen this problem reported by anyone else. What happens when you run
the following function?
function listing = dir_listing
listing = dir ();
end
When I call dir_listing from the Octave prompt, I get:
octave-3.2.4.exe:9> dir = dir_listing
dir =
{
25x1 struct array containing the fields:
name
date
bytes
isdir
datenum
statinfo
}
and dir.name contains all the filenames in the directory.
When I run a simple stand-alone program that calls dir_listing, I get:
$ ./test4
error: `dir' undefined near line 2 column 13
error: called from:
error: d:\labs\cpp\OctaveDemo\dir_listing.m at line 2, column 11
error: octave_base_value::convert_to_str_internal (): wrong type argument
`<unknown type>'
If the "dir" function is not found, then it appears that the problem is unique
to your install.
That makes sense. But would it be the Octave install, or the MinGW install?
What version of MinGW are you running?
That turns out to be a harder question to answer than one might think. The
installer that I ran is mingw-get-inst-20110316. The Octave installer is
Octave-3.2.4_i686-pc-mingw32_gcc-4.40_setup. I didn't record either
installation, but my normal behavior is to accept all defaults, so I suspect
that's what I have.
Ben
p.s. I'm not a window's user, so I will be of limited help in resolving this.
Hopefully, someone else will offer some advice.
Thanks for the effort. When I retire, I won't be a Windows user, either. :)
--
Daryl Lee
- Re: strcat not found--MinGW, Daryl Lee, 2011/05/02
- Re: strcat not found--MinGW, Ben Abbott, 2011/05/02
- Re: strcat not found--MinGW,
Daryl Lee <=
- Re: strcat not found--MinGW, wahaj87, 2011/05/02
- Re: strcat not found--MinGW, Daryl, 2011/05/02
- Re: strcat not found--MinGW, John W. Eaton, 2011/05/02
- Re: strcat not found--MinGW, Daryl Lee, 2011/05/02
- Re: strcat not found--MinGW, John W. Eaton, 2011/05/02
- Re: strcat not found--MinGW, Daryl Lee, 2011/05/02
- Re: strcat not found--MinGW, John W. Eaton, 2011/05/02
- Re: strcat not found--MinGW, wahaj87, 2011/05/03
- Re: strcat not found--MinGW, Daryl Lee, 2011/05/03
- Re: strcat not found--MinGW, wahaj87, 2011/05/04