Calling functions from host project in CINT: problem?

Hi.
As I understand documentation, the only way to call functions from host project and to use variables in CINT is to link CINT and .C file using makecint. I tried with simple example first. I made Agilent.h with this code:

[code]class Agilent
{
public:
Agilent();
void SetVoltage(float x)
{
printf(“Voltage set to %.2f\n”, x);
}

};[/code]
My goal is to make instance of this class inside Test.cxx (script file) which looks like this:

void main() { Agilent a; a.SetVoltage(5); }
I typed then in console:
makecint -mk Makefile -o Mycint -H Agilent.h and created Makefile
Because I’m using VS 6.0 , I then typed:
nmake /F Makefile and error occured:
Makefile(6) : fatal error U1033: syntax error : ‘=’ unexpected
I thought that maybe it is problem with nmake.exe of VS 6.0, so I installed VS 2005. The same error again. Both times PATH was set to Visual Studio /bin folder where nmake.exe is. Also, when I try to run setup.bat from cint/demo/makecint/Complex or any example folder, always the same error. Does any know how to do this?
Thank you.

Hi,

The makefile produced by makecint is current only useable with unix’s make (or gmake). So you will need to install cygwin (or other unix emulation layer) to run it.

Cheers,
Philippe

[quote]Hi,

The makefile produced by makecint is current only useable with unix’s make (or gmake). So you will need to install cygwin (or other unix emulation layer) to run it.

Cheers,
Philippe[/quote]
Hi,
I already tried that. When I run
make -f Makefile , this is what happens:
cl -DG__CXXLINK_ON -I/cygdrive/c/cint//inc -o G__main.obj -c G__main.cxx
make: *** [G__main.obj] Error 53

I’m starting to get nervous :angry: . Is there end to this? :slight_smile:

Hi,

This type of problem has been reported once before. I can’t find any details on the resolution but I think it might have to do with improper installation of the compiler and/or cygwin.

Try running just:

Philippe