Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 10-27-2006, 01:46 AM   #1 (permalink)
georgekjolly
Recruit
 
Join Date: Oct 2006
Posts: 3
georgekjolly is on a distinguished road
Problem while including sql.h in Dev-C++

Hi all,

I started using DEV-c++ very recently. But while including sql.h ,I am getting compile time errors. Is this due to some problems in Project Settings ???

/*My Code follows*/

#include <stdio.h>
#include <stdlib.h>
#include <sql.h>

int main(int argc, char *argv[])
{

system("PAUSE");
return 0;
}

/*Errors is shown below*/

/*Error#1*/
**********
C:\Dev-Cpp\include\sql.h:13, from main.c In file included from

C:\Dev-Cpp/include/sql.h:13, from main.c


/*Error#2*/
**********
C:\Dev-Cpp\main.c from main.c


/*Error#3*/
***********
C:\Dev-Cpp\include\sqltypes.h syntax error before "UDWORD"

/*Erro#4*/
**********
C:\Dev-Cpp\include\sqltypes.h syntax error before "PTR"

continues...
such 79 Errors are coming.

why this is happening.

Please Help me.

George
georgekjolly is offline   Reply With Quote
Old 10-27-2006, 09:08 PM   #2 (permalink)
waveclaw
Recruit
 
waveclaw's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 17
waveclaw is on a distinguished road
Send a message via ICQ to waveclaw Send a message via AIM to waveclaw Send a message via MSN to waveclaw Send a message via Yahoo to waveclaw
Check dependancies.

While having dozens of Syntax errors in a 3rd party header file looks ominous, it usually has a simple cause. The file may be importing symbols and macros from another file that was not found. Or yoru sql.h is assuming the definitions are provided by the compiler or environment.. Headaches such as this are common when porting software from one platform to another.

I assume from the topic and the fact that you are using a header file called sql.h, that you are trying to import functions and structures to use the Structured Query Language in C++. This is quite common as databases are popular places to store large amounts of data or offload managing that data to database via a specialized language such as embedded SQL. However, different implementations of SQL support the standard with varying quality. Most importantly, each implementation uses a custom set of libraries and header files with embeded SQL in C/C++.

What this means is that it would be usefull to know what embedded SQL implementation you are using? Is it SQLlite? Oracle embeded PL/SQL? SQL that shipped with Dev-C++ or that uses some fancy ODBC layer?

What dependancies does your sql.h have? What project is it from or is it a file you rolled-your own?

At the worst, if it's an sql.h file that was shipped with the compiler, you might try reodering the includes. Or searching for a file that defines the missing macros / structures and including that before sql.h
waveclaw is offline   Reply With Quote
Old 10-29-2006, 06:13 PM   #3 (permalink)
georgekjolly
Recruit
 
Join Date: Oct 2006
Posts: 3
georgekjolly is on a distinguished road
Problem solved

Hai WaveClaw,

Thank u very much for ur information. I hve solved the problem by including #include<windows.h> just above the #include<sql.h>

Thanks
Bye
George
georgekjolly is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dev C++ Problem x_x Arnack Standard C, C++ 2 07-17-2005 02:21 PM
Kaat a talking bot in c nvictor Platform/API C++ 10 05-19-2005 01:16 PM
c simple question problem with switch case if13121 Standard C, C++ 1 10-24-2004 09:43 PM
C problem saurabh1905 Standard C, C++ 2 06-11-2004 01:00 AM


All times are GMT -8. The time now is 09:47 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting