[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with standalone program error resoltion: error: 'strcat' undefi

From: ashwin damle
Subject: Re: Help with standalone program error resoltion: error: 'strcat' undefined.... error encountered in Octave evaluator!
Date: Wed, 25 Jul 2018 15:20:17 +0530


I could solve my problem by downgrading to Octave 4.0.2.

I have another question. I am using C++ function to call the Octave interpreter and execute commands. The program works well as long as I use the octave functions. However, I get errors when I use a package. I want to use the control package. Attached is the and myfunc.c files I am using. I get errors when loading the package control.

I search around and found that there were solutions posted like and

Therefore, I tried loading the package in the using feval ("pkg", ovl ("load", "interval"), 0);. I get errors like

warning: docstring file '\scratch\jwe\mxe-octave\usr\i686-w64-mingw32\share\octave\4.0.2\etc\built-in-docstrings' not found

error: feval: function 'pkg' not found

error: octave_base_value::double_value (): wrong type argument '<unknown type>'

The good thing is that the works on a GNU/Linux Xubuntu system but not on Windows 10 with version 4.0.2. 

Also, want to let you know that the reason I am not using a higher version is because I have object files which are compiled with GCC 4.6.2 and newer version Octave is complaining that the file format is not recognised when I link all object file with the executable. This works on Linux but not on Windows 10.

Could you please help with any advice on how to load a package and execute that in the C++ program? 

Thank you.

On Tue, 3 Jul 2018 at 15:59, ashwin damle <address@hidden> wrote:
Hello help-octave,

I am facing a problem executing my standalone program. I used from . Instead of calling the function 'gcd' I make a call to 'myfunc'. myfunc is defined as

function [resultString] = myfunc(inString)
resultString = strcat ('Good morning Mr. ', inString);

Certainly, the gcd function works. However, myfucn does not. I get 
error: 'strcat' undefined near line 4 column 18
error encountered in Octave evaluator! 

I searched a bit and found similar discussion on the Reading the thread I understand that this problem is related to path and copying strcat.m to the working directory does solve that error while popping up another 
error: 'common_size' undefined near line 110 column 11
error encountered in Octave evaluator!

Certainly myfunc is from the same thread. That is the thread which gives the temporary solution to get strcat error removed by copying the strcat.m into the working directory. However, it is not practical to copy all m files from my C:\Octave\Octave-4.4.0\share\octave\4.4.0\m to the working directory.

Question is how do I solve this problem? How do I avoid copying .m files and do a sane linking of all .m files functions. 

Attached are the two program sources I am using.

I am using Window 10 version 1803 OS build 17134.112 and GNU Octave, version 4.4.0. When I start Octave it mentions on the command Window Octave was configured for "x86_64-w64-mingw32.

Could you please help me solving this? Let me know if you have questions.

Thank you.
Ashwin Damle

Ashwin Damle

Description: Binary data

Attachment: myfunc.m
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]