You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by mredding <MR...@wmsgaming.com> on 2006/09/12 21:50:55 UTC

xerces 2.7.0 on Fedora Core 2 - library path issues

I am writing a conversion program for my company that turns a proprietary
format to xml with schemas.  I'm looking to use xerces 2.7.0 and I'm working
on Fedora Core 2 because that's what 1,300 other machines corprate wide are
using as well.  I installed xerces from source, grabbing
xerces-c-current.tar.gz on 9/12/06.  I set the enviroment varaibles
$XERCESCROOT (note the C before ROOT),  $LD_LIBRARY_PATH includes
$XERCESCROOT/lib, and $PATH includes $XERCESCROOT/bin.  These enviroment
variables are perscribed by the install notes on xerces home page.

Here is my main file, simplified for testing xerces for the first time:

#include <QApplication>
#include "cmainapplication.h"
#include <xercesc/util/PlatformUtils.hpp>
XERCES_CPP_NAMESPACE_USE 

int main(int argc, char *argv[])
{
	// Initialize Xerces
	try
	{	XMLPlatformUtils::Initialize();	}
	catch
	{	return 1;	}
	
	QApplication app(argc, argv);
	CMainApplication Converter;
	
	Converter.show();
	Converter.resize(800, 600);
	
	int retVal = app.exec();

	XMLPlatformUtils::Terminate();
	return retVal;
}

The error I receive is "main.cpp:3:42: xercesc/util/PlatformUtils.hpp: No
such file or directory"

So I did everything I understand to be done, and I cannot figure out why I
cannot find the file.  I checked, and it's there.  Is there any modification
I need to make to my Makefile?
-- 
View this message in context: http://www.nabble.com/xerces-2.7.0-on-Fedora-Core-2---library-path-issues-tf2261023.html#a6273175
Sent from the Xerces - C - Dev forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: xerces 2.7.0 on Fedora Core 2 - library path issues

Posted by mredding <MR...@wmsgaming.com>.
Thanks for the info.  I'm pretty fresh outta college and I haven't used Linux
for development before.  I was thinking that was the problem, but had no
idea how to fix it.  I'm still learning the enviroment (like I'm still
trying to settle on an editor).

Thank you again.


David Bertoni wrote:
> 
> 
> This is an issue with understand how your tools work, not with Xerces-C.
> 
> Most compilers have an option to specify a path for included files(-I is 
> typical), so you need to point your compiler to where Xerces-C's header 
> files are located.  If you're using GCC, just adding the following option 
> to the gcc command should work:
> 
> -I $XERCESCROOT/include
> 
> Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/xerces-2.7.0-on-Fedora-Core-2---library-path-issues-tf2261023.html#a6273662
Sent from the Xerces - C - Dev forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: xerces 2.7.0 on Fedora Core 2 - library path issues

Posted by David Bertoni <db...@apache.org>.
mredding wrote:
> I am writing a conversion program for my company that turns a proprietary
> format to xml with schemas.  I'm looking to use xerces 2.7.0 and I'm working
> on Fedora Core 2 because that's what 1,300 other machines corprate wide are
> using as well.  I installed xerces from source, grabbing
> xerces-c-current.tar.gz on 9/12/06.  I set the enviroment varaibles
> $XERCESCROOT (note the C before ROOT),  $LD_LIBRARY_PATH includes
> $XERCESCROOT/lib, and $PATH includes $XERCESCROOT/bin.  These enviroment
> variables are perscribed by the install notes on xerces home page.
> 
> Here is my main file, simplified for testing xerces for the first time:
> 
> #include <QApplication>
> #include "cmainapplication.h"
> #include <xercesc/util/PlatformUtils.hpp>
> XERCES_CPP_NAMESPACE_USE 
> 
> int main(int argc, char *argv[])
> {
> 	// Initialize Xerces
> 	try
> 	{	XMLPlatformUtils::Initialize();	}
> 	catch
> 	{	return 1;	}
> 	
> 	QApplication app(argc, argv);
> 	CMainApplication Converter;
> 	
> 	Converter.show();
> 	Converter.resize(800, 600);
> 	
> 	int retVal = app.exec();
> 
> 	XMLPlatformUtils::Terminate();
> 	return retVal;
> }
> 
> The error I receive is "main.cpp:3:42: xercesc/util/PlatformUtils.hpp: No
> such file or directory"
> 
> So I did everything I understand to be done, and I cannot figure out why I
> cannot find the file.  I checked, and it's there.  Is there any modification
> I need to make to my Makefile?

This is an issue with understand how your tools work, not with Xerces-C.

Most compilers have an option to specify a path for included files(-I is 
typical), so you need to point your compiler to where Xerces-C's header 
files are located.  If you're using GCC, just adding the following option 
to the gcc command should work:

-I $XERCESCROOT/include

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org