public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* compile issue - newbie
@ 2006-04-20 13:23 Marshall Wood
  2006-04-20 13:26 ` Sven Eschenberg
  0 siblings, 1 reply; 4+ messages in thread
From: Marshall Wood @ 2006-04-20 13:23 UTC (permalink / raw)
  To: gcc-help

I will state for a fact that I know that its something I am doing wrong.

Now can someone help me correct it.  Yes I am a newbie and just
learning, I learn by doing and then asking or finding the answers to
what I have done wrong.

Here is my little script.

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

int main()
{
    SQLRETURN    retcode;
    retcode = SQLConnect (NULL, "SYSDTS", NULL, "user", NULL, "pass", NULL);
    if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
        printf("Works!\n");
    }

}

Here is what I am seeing when I compile.

odbc2.cpp: In function 'int main()':
odbc2.cpp:7: error: 'SQLRETURN' was not declared in this scope
odbc2.cpp:7: error: expected `;' before ‘retcode’
odbc2.cpp:8: error: ‘retcode’ was not declared in this scope
odbc2.cpp:8: error: ‘SQLConnect’ was not declared in this scope
odbc2.cpp:9: error: ‘SQL_SUCCESS’ was not declared in this scope
odbc2.cpp:9: error: ‘SQL_SUCCESS_WITH_INFO’ was not declared in this scope

btw this is linux not windoze.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compile issue - newbie
  2006-04-20 13:23 compile issue - newbie Marshall Wood
@ 2006-04-20 13:26 ` Sven Eschenberg
       [not found]   ` <8058fd5f0604200653u73cfcce8xd1e85d017203973f@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Eschenberg @ 2006-04-20 13:26 UTC (permalink / raw)
  To: Marshall Wood; +Cc: gcc-help

I'd say there is some include file missing, which commqand are you issuing?

Are you using gcc or g++ ?

Looks like gcc, i'd assume ...

-Sven

Marshall Wood wrote:

>I will state for a fact that I know that its something I am doing wrong.
>
>Now can someone help me correct it.  Yes I am a newbie and just
>learning, I learn by doing and then asking or finding the answers to
>what I have done wrong.
>
>Here is my little script.
>
>#include <stdio.h>
>#include <stdlib.h>
>#include <iodbcunix.h>
>
>int main()
>{
>    SQLRETURN    retcode;
>    retcode = SQLConnect (NULL, "SYSDTS", NULL, "user", NULL, "pass", NULL);
>    if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
>        printf("Works!\n");
>    }
>
>}
>
>Here is what I am seeing when I compile.
>
>odbc2.cpp: In function 'int main()':
>odbc2.cpp:7: error: 'SQLRETURN' was not declared in this scope
>odbc2.cpp:7: error: expected `;' before ‘retcode’
>odbc2.cpp:8: error: ‘retcode’ was not declared in this scope
>odbc2.cpp:8: error: ‘SQLConnect’ was not declared in this scope
>odbc2.cpp:9: error: ‘SQL_SUCCESS’ was not declared in this scope
>odbc2.cpp:9: error: ‘SQL_SUCCESS_WITH_INFO’ was not declared in this scope
>
>btw this is linux not windoze.
>  
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compile issue - newbie
       [not found]     ` <44479375.4040700@cs.uni-frankfurt.de>
@ 2006-04-20 14:07       ` Marshall Wood
       [not found]         ` <4447967D.2030408@cs.uni-frankfurt.de>
  0 siblings, 1 reply; 4+ messages in thread
From: Marshall Wood @ 2006-04-20 14:07 UTC (permalink / raw)
  To: gcc-help

I am trying to make an ODBC connection from FC4 server to a remote DB2
database. I currently have 3 applications that use ODBC to make the
same connection without a problem. I will make some basic queries to
the DB2 db, and will move those queries to another db, not a DB2 db.


On 4/20/06, Sven Eschenberg <eschenb@cs.uni-frankfurt.de> wrote:
> No, it means, it found the includes you gave it, but none of it has the
> Symbols you are trying to use (since they are undeclared) ...
> Thus you lack at least one include file.
>
> If I may guess, you are using some SQL Functions from some lib (or
> whatever) ... I bet they are defined in an include file, having sql in
> it's name.
>
> BTW: This is not a gcc issue in my eyes, but anyway
>
> It might help, if you'd tell us, what you are trying to do ...
>
> Greetz
>
> -Sven
>
>
> Marshall Wood wrote:
>
> >Hummmm so gibberish it spit out just meant that it couldnt find the
> >include or didnt know what I was talking about, since it couldnt find
> >the include.
> >
> >On 4/20/06, Sven Eschenberg <eschenb@cs.uni-frankfurt.de> wrote:
> >
> >
> >>I'd say there is some include file missing, which commqand are you issuing?
> >>
> >>Are you using gcc or g++ ?
> >>
> >>Looks like gcc, i'd assume ...
> >>
> >>-Sven
> >>
> >>Marshall Wood wrote:
> >>
> >>
> >>
> >>>I will state for a fact that I know that its something I am doing wrong.
> >>>
> >>>Now can someone help me correct it.  Yes I am a newbie and just
> >>>learning, I learn by doing and then asking or finding the answers to
> >>>what I have done wrong.
> >>>
> >>>Here is my little script.
> >>>
> >>>#include <stdio.h>
> >>>#include <stdlib.h>
> >>>#include <iodbcunix.h>
> >>>
> >>>int main()
> >>>{
> >>>   SQLRETURN    retcode;
> >>>   retcode = SQLConnect (NULL, "SYSDTS", NULL, "user", NULL, "pass", NULL);
> >>>   if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
> >>>       printf("Works!\n");
> >>>   }
> >>>
> >>>}
> >>>
> >>>Here is what I am seeing when I compile.
> >>>
> >>>odbc2.cpp: In function 'int main()':
> >>>odbc2.cpp:7: error: 'SQLRETURN' was not declared in this scope
> >>>odbc2.cpp:7: error: expected `;' before ‘retcode’
> >>>odbc2.cpp:8: error: ‘retcode’ was not declared in this scope
> >>>odbc2.cpp:8: error: ‘SQLConnect’ was not declared in this scope
> >>>odbc2.cpp:9: error: ‘SQL_SUCCESS’ was not declared in this scope
> >>>odbc2.cpp:9: error: ‘SQL_SUCCESS_WITH_INFO’ was not declared in this scope
> >>>
> >>>btw this is linux not windoze.
> >>>
> >>>
> >>>
> >>>
> >>
> >>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compile issue - newbie
       [not found]         ` <4447967D.2030408@cs.uni-frankfurt.de>
@ 2006-04-20 14:51           ` Marshall Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Marshall Wood @ 2006-04-20 14:51 UTC (permalink / raw)
  To: gcc-help

Got it to compile :), now just have to figure out the return error.

On 4/20/06, Sven Eschenberg <eschenb@cs.uni-frankfurt.de> wrote:
> Well, see, the unixodbc manual says (in case you are usign unixodbc):
>
>
>     ODBC include files
>
> For C programmers the definitions you require are held in the header
> files sql.h, sqlext.h, sqltypes.h, sqlucode.h and odbcinst.h. For
> unixODBC <http://www.unixodbc.org> you will find these installed in
> <installpath>/include. Further explanation of these headers can be found
> later.
>
> Normally you only need to include sql.h (which contains most of the
> definitions you'll need) and sqlext.h (which contains mostly additions
> for ODBC <http://www.easysoft.com/developer/interfaces/odbc/index.html>
> 3). sqlucode.h is automatically included by sqlext.h and sqltypes.h is
> automatically included from sql.h. odbcinst.h contains the installers
> APIs e.g. |SQLConfigDataSource| and the APIs a drivers use e.g.
> |SQLWriteFileDSN|.
>
> if you use some other package, check which include files it supplies ...
>
>
> Marshall Wood wrote:
>
> >I am trying to make an ODBC connection from FC4 server to a remote DB2
> >database. I currently have 3 applications that use ODBC to make the
> >same connection without a problem. I will make some basic queries to
> >the DB2 db, and will move those queries to another db, not a DB2 db.
> >
> >
> >On 4/20/06, Sven Eschenberg <eschenb@cs.uni-frankfurt.de> wrote:
> >
> >
> >>No, it means, it found the includes you gave it, but none of it has the
> >>Symbols you are trying to use (since they are undeclared) ...
> >>Thus you lack at least one include file.
> >>
> >>If I may guess, you are using some SQL Functions from some lib (or
> >>whatever) ... I bet they are defined in an include file, having sql in
> >>it's name.
> >>
> >>BTW: This is not a gcc issue in my eyes, but anyway
> >>
> >>It might help, if you'd tell us, what you are trying to do ...
> >>
> >>Greetz
> >>
> >>-Sven
> >>
> >>
> >>Marshall Wood wrote:
> >>
> >>
> >>
> >>>Hummmm so gibberish it spit out just meant that it couldnt find the
> >>>include or didnt know what I was talking about, since it couldnt find
> >>>the include.
> >>>
> >>>On 4/20/06, Sven Eschenberg <eschenb@cs.uni-frankfurt.de> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>I'd say there is some include file missing, which commqand are you issuing?
> >>>>
> >>>>Are you using gcc or g++ ?
> >>>>
> >>>>Looks like gcc, i'd assume ...
> >>>>
> >>>>-Sven
> >>>>
> >>>>Marshall Wood wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>I will state for a fact that I know that its something I am doing wrong.
> >>>>>
> >>>>>Now can someone help me correct it.  Yes I am a newbie and just
> >>>>>learning, I learn by doing and then asking or finding the answers to
> >>>>>what I have done wrong.
> >>>>>
> >>>>>Here is my little script.
> >>>>>
> >>>>>#include <stdio.h>
> >>>>>#include <stdlib.h>
> >>>>>#include <iodbcunix.h>
> >>>>>
> >>>>>int main()
> >>>>>{
> >>>>>  SQLRETURN    retcode;
> >>>>>  retcode = SQLConnect (NULL, "SYSDTS", NULL, "user", NULL, "pass", NULL);
> >>>>>  if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
> >>>>>      printf("Works!\n");
> >>>>>  }
> >>>>>
> >>>>>}
> >>>>>
> >>>>>Here is what I am seeing when I compile.
> >>>>>
> >>>>>odbc2.cpp: In function 'int main()':
> >>>>>odbc2.cpp:7: error: 'SQLRETURN' was not declared in this scope
> >>>>>odbc2.cpp:7: error: expected `;' before ‘retcode’
> >>>>>odbc2.cpp:8: error: ‘retcode’ was not declared in this scope
> >>>>>odbc2.cpp:8: error: ‘SQLConnect’ was not declared in this scope
> >>>>>odbc2.cpp:9: error: ‘SQL_SUCCESS’ was not declared in this scope
> >>>>>odbc2.cpp:9: error: ‘SQL_SUCCESS_WITH_INFO’ was not declared in this scope
> >>>>>
> >>>>>btw this is linux not windoze.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>
> >>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-04-20 14:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-20 13:23 compile issue - newbie Marshall Wood
2006-04-20 13:26 ` Sven Eschenberg
     [not found]   ` <8058fd5f0604200653u73cfcce8xd1e85d017203973f@mail.gmail.com>
     [not found]     ` <44479375.4040700@cs.uni-frankfurt.de>
2006-04-20 14:07       ` Marshall Wood
     [not found]         ` <4447967D.2030408@cs.uni-frankfurt.de>
2006-04-20 14:51           ` Marshall Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).