I'm making minor adjustments to a sample program called pdemo that comes with Dekang Lin's minipar parser, but I'm having trouble compiling the darned thing without seeing a royal mess of "undefined reference" variables.
I'm not particularly well-versed in C++ (I'm far better with higher-level languages), though, so I'm sorry if this is a dumb question...

Before I even tried to make any changes, I wanted to compile the provided source (the program is open source) just to see if Bad Things would happen. I used the makefile that was included.
Lo and behold, They happened.
At first the problem was that I didn't have libz-dev instlaled (I use Ubuntu Linux 8.04), but now the problem is ridiculous numbers of undefined references - to the standard library, it seems, even.
The listing is pretty much entirely undefined references, so I'm hoping that someone can give a solution without needing to read through the entirety of the error output.

The output: http://pastebin.ca/1218388

For the record, the only change I need to make is to stick a cout.flush() in two places, and that's all (I'm having a Python process start up pdemo and talk to it).

Thanks!
-Constantine

Well most of these are linker errors, "undefined reference to function foo()" ... you need to locate where these functions are in the code and make sure that those files are being compiled and linked correctly. For example its missing the function _S_empty_rep_storage

After a bit of Googling _S_empty_rep_storage, I found that adding -fno-inline into the g++ args got rid of everything except for the undefined references to _Ios_Seekdir. And now, after even more Googling, I'm completely unable to find a solution to the remaining issue (undefined references to _Ios_Seekdir up the wazoo). Just about everyone on coding messageboards seems to shy away from solving the problem directly.

It's Ubuntu g++ (old) problem. Better ask help on Ubuntu forums...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.