compile issue - newbie

Marshall Wood donkieonthehead@gmail.com
Thu Apr 20 14:07:00 GMT 2006


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.
> >>>
> >>>
> >>>
> >>>
> >>
> >>
>
>



More information about the Gcc-help mailing list