Qt-interest Archive, April 2007
fstream segfault w/ qmake and xcode
Message 1 in thread
Hi all,
I posted this previously, but I've done a bit more digging and got some more
info. My app uses a library that uses fstream to read a file into a data
structure. Using qmake to generate an XCode target for the app causes the
app to segfault when the library creates an input stream and then tries to
call getline(). However, if I just manually add a target to the project that
links all the same libraries and uses the *exact same* code, it runs without
error. I've examined the streams using the debugger in the two different
cases and it seems that in the case of the Qt-generated target, the stream
is not being initialized properly from the file name. Is there any reason
why using a qmake generated target would cause the initialization of an
istream not to work? Is qmake running some macro or something that's
replacing my #include <fstream> with something else?
I'm totally at a loss on this one, so *any* help, suggestions, condolences,
etc. would be great. I've been beating my head against this bug for a week
and it's basically stopped me dead in my tracks.
Thanks,
Aaron