5 Replies Latest reply: Jul 30, 2012 8:42 AM by Chrisjenkins-Oracle RSS

    TT can not compile!

    950223
      I have installed timesten1121.9 on centos6.2 -64bit .It work by ttisql.But when i compile c++ code ,it show some errors. this is my code :

      #include "ttclasses/TTConnection.h"
      #include "ttclasses/TTCmd.h"
      #include "ttclasses/TTStatus.h"
      #include <iostream>
      using namespace std;
      int main() {
      //TTCmd cmd;
      TTStatus stat;
      TTConnection _connTT;
      connTT.Connect("DSN=TT1121;pwd=svc",stat);
      if(_connTT.isConnected())     
      cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
      else
      cout<<" connect failed!"<<endl;
      return 0;
      }
      when i compile the code ,it show errors :
      In file included from test.cpp:10:
      /home/yleesun/3rd/TimesTen/include/ttclasses/TTCmd.h:365: error: ‘void TTCmd::getColumn(int, SQLBIGINT*, TTStatus&)’ cannot be overloaded
      /home/yleesun/3rd/TimesTen/include/ttclasses/TTCmd.h:353: error: with ‘void TTCmd::getColumn(int, long int*, TTStatus&)’
      /home/yleesun/3rd/TimesTen/include/ttclasses/TTCmd.h:366: error: ‘bool TTCmd::getColumnNullable(int, SQLBIGINT*, TTStatus&)’ cannot be overloaded
      /home/yleesun/3rd/TimesTen/include/ttclasses/TTCmd.h:355: error: with ‘bool TTCmd::getColumnNullable(int, long int*, TTStatus&)’
      /home/yleesun/3rd/TimesTen/include/ttclasses/TTCmd.h:367: error: ‘void TTCmd::getColumn(int, SQLBIGINT*)’ cannot be overloaded

      But when I donot include the TTCmd.h ,it compile OK! why??? who can help me ???
        • 1. Re: TT can not compile!
          Jspalmer-Oracle
          What's your compile line?

          Please note TT isn't supported on Centos in the TT 11.2.1 or 11.2.2 families, though it'll probably work. Please check the Release Notes for Linux ports it is supported on.
          • 2. Re: TT can not compile!
            950223
            Thanks! Do you mean that TT1121 or TT1122 can not be surported on Centos?
            • 3. Re: TT can not compile!
              Jspalmer-Oracle
              Neither is specifically supported on Centos. Please check the Release Notes for the versions of Linux that TimesTen is certified on. For example:

              http://docs.oracle.com/cd/E21901_01/doc/timesten.1122/e21630/toc.htm

              Linux x86-32 and x86-64:

              •Oracle Linux 4, 5 and 6
              •Red Hat Enterprise Linux 4, 5 and 6
              •SUSE Enterprise Server 10 and 11
              •MontaVista Linux CGE 5.0 and 6.0x
              •Asianux 3.0

              My understanding is that Centos is a free source-recompile of RedHat Enterprise Linux so in all likelihood TimesTen will run without a problem on it, but we do not officially support TimesTen on Centos. I'm just bringing this to your attention in case it's important later on.
              • 4. Re: TT can not compile!
                950223
                Hi,thanks all!
                I got the answer! It is not the problem of OS,the problem is I did't define TT_64BIT in my code! now it works ok both on centos and redhat!

                Edited by: 947220 on 2012-7-30 下午6:16
                • 5. Re: TT can not compile!
                  Chrisjenkins-Oracle
                  Glad you figured it out. Can you please provide a bit more detail and I will log a bug so this gets fixed for everyone.

                  Thanks,

                  Chris