Error: Function getline(myfile,line) is not defined (fixed)

Hi all. I try to read files with cint (my own compiled one and with the compiled one from the original svn source).
Here is the little test programm for this purpose:

[code]// reading a text file
#include
#include
#include
using namespace std;

int main () {
string line;
ifstream myfile (“example.txt”);
if (myfile.is_open()) {
while (! myfile.eof()) {
getline (myfile,line);
cout << line << endl;
}
myfile.close();
}
else cout << “Unable to open file”;
return 0;
}[/code]

However, if I try to run this programm I get the error below.

>cint.exe -IC:\cint\inc -IC:\cint\include -IC:\cint\stl fileRead.cxx Error: Function getline(myfile,line) is not defined in current scope fileRead.c xx(12) !!! return from main() function

What have I missed at compilation of cint?
The same source works with the precompiled 5.1 cint version from the cint site.

Thanks Louis

Hi Louis,

I can not reproduce the problem. Your build might be incomplete?

Cheers,
Philippe.

Build log for cygwin+msvc
awake24.de/paste/database/e4cefc6fd8.php

[code]##########################################################################

makecint : interpreter-compiler for cint (Windows VisualC++ version)

Copyright© 1995~2007 Masaharu Goto. Mailing list: cint@pcroot.cern.ch

##########################################################################
Run ‘make -f Makestr’ to compile the object
make[1]: Entering directory /cygdrive/c/Users/Lis/Documents/work/cint-svn/cint/lib/dll_stl' Makestr:51: *** target pattern contains no%’. Stop.
make[1]: Leaving directory /cygdrive/c/Users/Lis/Documents/work/cint-svn/cint/lib/dll_stl' mv: cannot statstring.dll’: No such file or directory
[/code]indicates the cintdlls have not been properly created. This is usually because something being used by the Makefile contains a semi colon.

Cheers,
Philippe.

Hi,

To debug this issue try(cd cint/lib/dll_stl; chmod a+x setup; PATH=../../../bin:../../../lib:$PATH LD_LIBRARY_PATH=../../../lib:$LD_LIBRARY_PATH DYLD_LIBRARY_PATH=../../../lib:$DYLD_LIBRARY_PATH ./setup)If this leads to the same output, trycd cint/lib/dll_stl; ../../../bin/makecint -mk Makestr -dl string.dll -H str.h -cint -Z0 make -f MakestrIf this leads to the same error send me the content of Makestr.

Cheers,
Philippe.

Makestr content:
awake24.de/paste/database/e1b8dfd02f.php

make -f Makestr log:
awake24.de/paste/database/ad626e16e5.php

I needed to add the …/…/…/cint/inc include dir manually.
Thanks for your help.

Hi Louis,

This: /cygdrive/c/Users/Lis/Documents/work/cint-svn/bin/cint.exe -w2 -zstring -nG__cpp_string.cxx -D__MAKECINT__ -DG__MAKECINT -c-1 -A -IC:/cint/includeis suspicious! The -I should refer to the same version of cint your are using! I suspect that ‘c:/cint/bin’ is on your PATH before /cygdrive/c/Users/Lis/Documents/work/cint-svn/bin/.

Cheers,
Philippe.

cint in c:\cint and in cint-svn are the same.
But I found out what the problem was.
The problem showed up becouse I added the cint/include to the include paths. Therefore cint-std includes where used instead of the system includes.

Compiling string.dll works now:
awake24.de/paste/database/e52acd40e95.php

But here is the next problem with Makevec:
awake24.de/paste/database/6412d3747.php

Greets Louis

[quote]cint in c:\cint and in cint-svn are the same.
[/quote]What do you mean they are the same? Is this the same physical directory or is it 2 copies of the same revision of the repository. If this is the later, this can explain some of your problem since you are using a different ‘location’ for the build and for trying to find the executables and the build might in an inconsistent state (for example the cintdlls might still be visible when they are attempted to be rebuild).

Cheers,
Philippe.

[quote=“pcanal”][code]##########################################################################

makecint : interpreter-compiler for cint (Windows VisualC++ version)

Copyright© 1995~2007 Masaharu Goto. Mailing list: cint@pcroot.cern.ch

##########################################################################
Run ‘make -f Makestr’ to compile the object
make[1]: Entering directory /cygdrive/c/Users/Lis/Documents/work/cint-svn/cint/lib/dll_stl' Makestr:51: *** target pattern contains no%’. Stop.
make[1]: Leaving directory /cygdrive/c/Users/Lis/Documents/work/cint-svn/cint/lib/dll_stl' mv: cannot statstring.dll’: No such file or directory
[/code]indicates the cintdlls have not been properly created. This is usually because something being used by the Makefile contains a semi colon.

Cheers,
Philippe.[/quote]

I solved this error. All libs compile if configure is runned without --prefix options.

Greets Louis

Hi Louis,

When you were using --prefix, what was your exact configure command line?

Thanks,
Philippe.

Hi Louis,

Indeed the --prefix configuration was not functional on windows.
This is fixed in the trunk by revision 30011

Cheers,
Philippe.