Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: Compile err...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 26118 of 26972
Post > Topic >>

Re: Compile error

by Eric Sosman <esosman@[EMAIL PROTECTED] > May 8, 2008 at 09:23 AM

iavian wrote:
> I am trying to compile a code that includes header from both oracle
> and postgres
> 
> /usr/local/pgsql/include/server/c.h:420: error: conflicting
> declaration 'typedef struct varlena text'
> /opt/oracle/product/10.2.0/rdbms/public/oratypes.h:196: error: 'text'
> has a previous declaration as `typedef oratext text'
> 
> How do i fix this ?

     Best not to try: Keep the two conflicting headers apart
from each other by compiling the Oracle- and Postgres-using
parts of the program in separate modules.

     But if you *must* try to force two square pegs into the
same round hole, you *might* be able to do something like

	#define text vtext
	#include "c.h" /* the "struct varlena" one */
	#undef text

	#define text otext
	#include "oratypes.h" /* the "oratext" one */
	#undef text

.... and then use "vtext" and "otext" throughout the rest of
the code.  No guarantees that this will work, though: much
depends on what else these headers may be doing.

     There may be further troubles awaiting you if you get
past the compilation errors, if the libraries that accompany
these headers contain external definitions that clash.  For
example, if each defines its own connectToDatabase() function
your compilation difficulties will be only the beginning ...

-- 
Eric Sosman
esosman@[EMAIL PROTECTED]

 




 2 Posts in Topic:
Compile error
iavian <vijay@[EMAIL P  2008-05-08 05:54:16 
Re: Compile error
Eric Sosman <esosman@[  2008-05-08 09:23:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 16:06:37 CDT 2008.