Hello.

I'm trying to compile a simple C++ program to read in an mzXML file
and print to the screen the spectrum of a given scan number. I'm using
proteowizard (revision 2414) to do this but without much luck.

There seems to be a problem with linking the files. When I compile my
program with this command:
g++ -Wall -I./pwiz_src pwizReader.cpp -o pwizReader.exe

I get the following error messages:
/tmp/cclnMeVZ.o: In function `main':
pwizReader.cpp:(.text+0x102): undefined reference to
`pwiz::msdata::MSDataFile::MSDataFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
pwiz::msdata::Reader const*, bool)'
pwizReader.cpp:(.text+0x1bd): undefined reference to
`pwiz::msdata::id::value(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&)'
pwizReader.cpp:(.text+0x299): undefined reference to
`pwiz::msdata::MSData::~MSData()'
pwizReader.cpp:(.text+0x30e): undefined reference to
`pwiz::msdata::Spectrum::getMZIntensityPairs(std::vector<pwiz::msdata::MZIntensityPair,
std::allocator<pwiz::msdata::MZIntensityPair> >&) const'
/tmp/cclnMeVZ.o: In function
`pwiz::msdata::MSDataFile::~MSDataFile()':
pwizReader.cpp:
(.text._ZN4pwiz6msdata10MSDataFileD1Ev[pwiz::msdata::MSDataFile::~MSDataFile()]
+0x8): undefined reference to `pwiz::msdata::MSData::~MSData()'
/tmp/cclnMeVZ.o: In function
`pwiz::msdata::MSDataFile::~MSDataFile()':
pwizReader.cpp:
(.text._ZN4pwiz6msdata10MSDataFileD0Ev[pwiz::msdata::MSDataFile::~MSDataFile()]
+0xc): undefined reference to `pwiz::msdata::MSData::~MSData()'
/tmp/cclnMeVZ.o:(.rodata._ZTIN4pwiz6msdata10MSDataFileE[typeinfo for
pwiz::msdata::MSDataFile]+0x10): undefined reference to `typeinfo for
pwiz::msdata::MSData'
collect2: ld returned 1 exit status


These errors tell me that compiling isn't the issue but something is
going wrong with the linking.

Is there something obvious I'm missing here?
Thanks in advance for any and all help.

-- 
You received this message because you are subscribed to the Google Groups 
"spctools-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/spctools-discuss?hl=en.

Reply via email to