LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-11-2008, 07:28 PM   #1
crapodino
Member
 
Registered: Aug 2005
Distribution: SuSE 10
Posts: 72

Rep: Reputation: 15
uint64_t + gcc + openDBX compilation error


Hi everybody. First, sorry for my english, i am argentinian.

I am trying to use a c library called openDBX that helps us talk to different RDBMS. Here is the link: http://www.linuxnetworks.de/doc/index.php/OpenDBX

I have already compiled and installed. Now, i am trying a simple c programe that uses it. The problem is that when i tried to compile this program, i have en compile error in a header i need to include of openDBX.

Mi c program (Prueba.c) is this:

Code:
#include <stdio.h>
#include <stdlib.h>
#include <odbx.h>

int main(void) {
	puts("Hello World!!");
	return EXIT_SUCCESS;
}
The file odbx is the one i need to use. See that the problems occurs during compilation, even if i don't use it. This file (odbx.h) is in /usr/local/include. I undestand that this directory is standard so i don't need to pass any parametres to gcc. don't i ?

The error is this:

In file included from Prueba.c:3:
/usr/local/include/odbx.h:206: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘odbx_rows_affected’


If i open de odbx, the line 206 is like this:

uint64_t odbx_rows_affected( odbx_result_t* result );


The uint64_t is only used there. I think there is the problem. I see that odbx.h includes the stdint, in this way:
#ifdef HAVE_STDINT_H
#include <stdint.h>

Can i have a problem with this and the gcc ??? do you need some other information so that to help me ?

I am using gcc version 4.1.3 and ubuntu gutsy gibbon.

very thanks

mariano
 
Old 01-12-2008, 04:47 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by crapodino View Post
The error is this:

In file included from Prueba.c:3:
/usr/local/include/odbx.h:206: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘odbx_rows_affected’


If i open de odbx, the line 206 is like this:

uint64_t odbx_rows_affected( odbx_result_t* result );


The uint64_t is only used there. I think there is the problem. I see that odbx.h includes the stdint, in this way:
#ifdef HAVE_STDINT_H
#include <stdint.h>
Yes, there’s your problem. There should be a global config include file which was generated by your configure script that defines that particular value. Figure out where this include file is and why that value is left undefined.

If you want to see where it all started, go back to your configure script and look at the output. One of the lines should be something like:
Code:
checking for malloc.h... yes
checking for stdint.h... yes
checking for string.h... yes
If that particular line is missing or the “yes” is a “no”, you should look at config.log to see why.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
5.4. GCC-4.0.3 - Pass 1 compilation error :( gothicbob Linux From Scratch 1 08-06-2007 05:21 PM
have gcc compilation error during gcc installtion in linuxfromscratch vbshanmugaprakash Linux - General 3 12-13-2006 05:52 AM
compilation error in standard header fpos.h in gcc 3.2.2 ghorab Linux - General 6 12-10-2005 03:26 AM
should I use gcc-2.95.3 for kernel compilation shanenin Linux From Scratch 9 07-25-2004 10:24 PM
gcc compilation error Proger Programming 1 03-22-2003 12:32 PM


All times are GMT -5. The time now is 02:34 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration