compiles in one place, not in another

I've downloaded an opensource library (pwlib from voxgratia.org, in case you're curious).  It's a little complicated to get compiling, but I eventually got it working.  Now, I'm trying to build a library of my own (in Visual Studio .NET) using this library.  When I try to compile my library, I get a compile error caused in pwlib.  Actually, I get a lot of compile errors.  Typical "I can't figure out what this object is" sort of compiler errors (not linker errors, at not least yet).  I've set the following under Librarian->General->Additional Dependencies:
openh323d.lib ptlibd.lib ptclibd.lib ptlibsd.lib

Any suggestions?
LVL 1
rwinklerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nonubikCommented:
>I've set the following under Librarian->General->Additional Dependencies:
>openh323d.lib ptlibd.lib ptclibd.lib ptlibsd.lib

This is the linking part. You're getting compiling errors (which is before linking).
It seems that you need to include some headers in order to "figure out what this object is". Please post some compile errors to get more help.
0
rwinklerAuthor Commented:
Although you are correct that this seems to be a compile error, I can move my C++ class into one of the sample projects provided with the openh323 library (which is why I'm using pwlib... openh323 needs it) and it compiles just fine.  In fact, my class is just a modification of one provided in the openh323 samples.

I don't have the exact errors in front of me at the moment (I'm at home at the moment), but the first one was something to the effect of:
PObject unrecognized class

If you really think it would help, I'll post part of the compile error list, but I'm skeptical that it will be useful.
0
nonubikCommented:
If you are so skeptical, maybe it just need some 'Additional Include directories' to be set in the settings, maybe the wrong headers with the same name are included.
But this would raise "could not open xxx.h file" error....
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

rwinklerAuthor Commented:
I thought that may have had merit, but the additional include directories are both the same (completely empty).  All those college courses on programming, but not one even offered on how to get IDE's to do what you want.  Bah.
0
nonubikCommented:
Still, by posting the errors, you may get more help..
0
rwinklerAuthor Commented:
There's more where this came from, but here's about the first fifth of the output (it maxes out after about 100 errors):
c:\dev\pwlib\include\ptclib\dtmf.h(34) : error C2504: 'PObject' : base class undefined
c:\dev\pwlib\include\ptclib\dtmf.h(35) : error C2061: syntax error : identifier 'PObject'
c:\dev\pwlib\include\ptclib\dtmf.h(37) : error C2143: syntax error : missing ';' before 'public'
c:\dev\pwlib\include\ptclib\dtmf.h(37) : warning C4183: 'PCLASSINFO': missing return type; assumed to be a member function returning 'int'
c:\dev\pwlib\include\ptclib\dtmf.h(39) : error C2146: syntax error : missing ';' before identifier 'Decode'
c:\dev\pwlib\include\ptclib\dtmf.h(39) : error C2501: 'PDTMFDecoder::PString' : missing storage-class or type specifiers
c:\dev\pwlib\include\ptclib\dtmf.h(39) : error C2061: syntax error : identifier 'PINDEX'
c:\dev\pwlib\include\ptclib\dtmf.h(39) : warning C4183: 'Decode': missing return type; assumed to be a member function returning 'int'
c:\dev\pwlib\include\ptlib\semaphor.h(126) : error C2226: syntax error : unexpected type 'BOOL'
c:\dev\pwlib\include\ptlib\semaphor.h(126) : error C2238: unexpected token(s) preceding ';'
c:\dev\pwlib\include\ptlib\semaphor.h(137) : error C2143: syntax error : missing ';' before '&'
c:\dev\pwlib\include\ptlib\semaphor.h(137) : error C2501: 'PWaitAndSignal::PSemaphore' : missing storage-class or type specifiers
c:\dev\pwlib\include\ptlib\semaphor.h(137) : error C2501: 'PWaitAndSignal::semaphore' : missing storage-class or type specifiers
c:\dev\pwlib\include\ptlib\semaphor.h(175) : error C2504: 'PObject' : base class undefined
c:\dev\pwlib\include\ptlib\semaphor.h(176) : error C2061: syntax error : identifier 'PObject'
c:\dev\pwlib\include\ptlib\semaphor.h(176) : warning C4183: 'PCLASSINFO': missing return type; assumed to be a member function returning 'int'
c:\dev\pwlib\include\ptlib\semaphor.h(214) : error C2143: syntax error : missing ',' before '&'
c:\dev\pwlib\include\ptlib\mutex.h(99) : warning C4183: 'PCLASSINFO': missing return type; assumed to be a member function returning 'int'
c:\dev\pwlib\include\ptlib\channel.h(191) : error C2504: 'streambuf' : base class undefined
0
nonubikCommented:
>c:\dev\pwlib\include\ptclib\dtmf.h(34) : error C2504: 'PObject' : base class undefined

Seems the PObject class is not defined before dtmf.h is included.
Try to include the definition file of PObject class in the dtmf.h file or wherever the dtmf.h is included (right above it).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rwinklerAuthor Commented:
This is where I was saying, it compiles fine by itself.  And in all the sample projects.  Then again, I don't compile all of the pwlib projects to build the libs (as per the instructions) and some of the others don't actually compile.  I figured they weren't important for the usage of pwlib.  Maybe that's where the problem lies.  It's only when I create a new project and try to use the library (and, apparently, something that doesn't) that I get this error.  Modifying the library ~shouldn't~ be the solution.  Especially since it compiles fine in other projects.  

On the other hand, I posted to the openh323 newsgroup, and they said the same thing.  It worked.  I guess I should have given that a try before posting.  Ah, the complexities of it all.  I hope they fix that in the next source dist.  Thanks for the help.

in case someone finds this solution useful, this is the include necessary:
#include <ptlib.h>
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.