octave-maintainers
[Top][All Lists]
Advanced

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

Re: Octave Coder __ A code generator and build system that converts Octa


From: Carlo De Falco
Subject: Re: Octave Coder __ A code generator and build system that converts Octave to C++
Date: Thu, 4 Jun 2020 18:40:19 +0000


> Il giorno 4 giu 2020, alle ore 20:16, Carlo De Falco 
> <carlo.defalco@polimi.it> ha scritto:
> 
> Hi,
> 
> Thanks for sharing this, sounds like a great project!
> 
> 
>> Il giorno 4 giu 2020, alle ore 18:41, Hossein Sajjadi 
>> <sajjadi.floss@gmail.com> ha scritto:
>> 
>> Any advice, feedback, bug report will be appreciated.
> 
> 
> I tried to compile the attached very simple function pippo.m 
> and compilation failed with the following error :
> 
> ./pippo.cc:2194:53: error: cannot pass non-trivial object of type 'const 
> std::string'
>      (aka 'const basic_string<char, char_traits<char>, allocator<char> >') to 
> variadic function; expected type from format string was 'char *' 
> [-Wnon-pod-varargs]
>              error("cannot find %s.oct>%s in %s ", file_name, fcn_name, path);
>                                 ~~                 ^~~~~~~~~
> 
> also, as I am using clang++ the option '-gtoggle' that is hardcoded in all 
> compiler commands is not understood and causes all invocations to the 
> compiler to fail.
> 
> HTH,
> c.


I would suggest removing '%s' from this line :

https://github.com/shsajjadi/OctaveCoder/blob/dev/src/coder_runtime.cpp#L2091

and using std::string::c_str () in these lines :

https://github.com/shsajjadi/OctaveCoder/blob/dev/src/coder_runtime.cpp#L2204
https://github.com/shsajjadi/OctaveCoder/blob/dev/src/coder_runtime.cpp#L2228
https://github.com/shsajjadi/OctaveCoder/blob/dev/src/coder_runtime.cpp#L2249
https://github.com/shsajjadi/OctaveCoder/blob/dev/src/coder_runtime.cpp#L2264

c.






reply via email to

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