Hi Faust list,

I'm using libfaust.a from Faust version 2.0.a33, LLVM version 3.3 and
Csound version 6.05
I have a problem when using foreign functions in csound.
Victor Lazzarini has ported an on-the-fly compiler for faust scripts in
csound which works like this:

giInst faustcompile{{
  magicFct =  ffunction(float cbrtf|cbrt|cbrtl (float), <math.h>,"");
  process = 27:magicFct;

}},"-vec -lv 1"

iF1, asig faustaudio giInst

and the other csound opcodes can use the signal (constant=3 here) elsewhere.

This code compiles but this one doesn't:

giInst faustcompile{{
   magicValue = ffunction(int getValue(), "myLocalHeader.h","");
   process = magicValue;

}},"-vec -lv 1"

LLVM ERROR: Program used external function 'getValue' which could not be
resolved!

no matter what I put instead of "myLocalHeader.h" (absolute/relative path
relative to current directory/to libfaust.a/to csound/bin/to usr/bin ...)
where myLocalHeader.h contains

int getValue(void);
const int value = 7;

int getValue (void){
    return value;
}

I was told that faust2 was the source of a similar problem with max.
Is is also the case here ?

Note that

magicValue=fconstant(int value, "myLocalHeader.h");
and
magicValue=fvariable(int value,  "myLocalHeader.h");

compile but the returned value is 0 instead of 7.
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to