occi problems to compile [message #94053] |
Tue, 25 November 2003 04:29 |
denise
Messages: 64 Registered: November 2000
|
Member |
|
|
Hi.
I got this errors when try to compile my code.
i didn't find the problem...
somebody help me? i don't now what library i have to use.
Thank you!!!! =)
* my file occicoll.cpp:
#include <iostream>
#include <algorithm>
#include <string.h>
#include <vector>
#include "occicoll.h"
occicoll::occicoll (string user, string passwd, string db){
env = Environment::createEnvironment(Environment::OBJECT);
conn = env->createConnection (user, passwd, db);
}
occicoll::~occicoll(){
env->terminateConnection (conn);
Environment::terminateEnvironment (env);
}
* my file occicoll.h:
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <occi.h>
using namespace oracle::occi;
using namespace std;
class occicoll{
private:
Environment *env;
Connection *conn;
Statement *stmt;
public:
occicoll(string user, string passwd, string db);
~occicoll ();
};
my Makefile:
ORACLE_HOME=C:oracleora90
INCLUDE_DIR=-I. -I$(ORACLE_HOME)ociinclude
LIB_PATH=-L$(ORACLE_HOME)bin -L(ORACLE_HOME)lib
CXX=gpp
CXXFLAGS=-Wall -g
FLAGS=$(CXXFLAGS) $(INCLUDE_DIR) $(LIB_PATH)
OBJS=main.o occicoll.o
default:all
all:banco.exe
banco.exe: $(OBJS)
$(CXX) -o banco.exe $(OBJS)
main.o: main.cpp
$(CXX) $(FLAGS) -c main.cpp
occicoll.o: occicoll.cpp occicoll.h
$(CXX) $(FLAGS) -c occicoll.cpp
-> the errors:
gpp -Wall -g -I. -IC:oracleora90ociinclude -LC:oracleora90bin -L(ORACLE_H
OME)lib -c main.cpp
gpp -Wall -g -I. -IC:oracleora90ociinclude -LC:oracleora90bin -L(ORACLE_H
OME)lib -c occicoll.cpp
gpp -o banco.exe main.o occicoll.o
occicoll.o: In function `occicoll::occicoll(basic_string<char, string_char_trait
s<char>, __default_alloc_template<false, 0> >, basic_string<char, string_char_tr
aits<char>, __default_alloc_template<false, 0> >, basic_string<char, string_char
_traits<char>, __default_alloc_template<false, 0> >)':
occicoll.cpp:1: undefined reference to `oracle::occi::Environment::createEnviron
ment(oracle::occi::Environment::Mode, void *, void *(*)(void *, unsigned long),
void *(*)(void *, void *, unsigned long), void (*)(void *, void *))'
occicoll.o: In function `occicoll::~occicoll(void)':
occicoll.cpp:2: undefined reference to `oracle::occi::Environment::terminateEnvi
ronment(oracle::occi::Environment *)'
collect2: ld returned 1 exit status
make.exe: *** [[banco.exe]] Error 1
i'm using the gcc for windows version 2.95
thankyou!
|
|
|
Re: occi problems to compile [message #94249 is a reply to message #94053] |
Fri, 04 June 2004 18:32 |
Frank Scherie
Messages: 10 Registered: June 2004
|
Junior Member |
|
|
Hello,
Please note that Oracle requires special Compilers -
Oracle Note:43208.1 Certified Compilers
covers this.
And GCC, MING are definetly not supported on Windows - sorry.
Since Oracle 9.0.1 only MS VC++ 6 is supported - and since Oracle 9.2.0.4 additionel VC++ 7.0 .NET - and additional since 10.1.0.2.0 VC++ 7.1 .NET
Sorry
Frank Scherie
Senior Support Engineer
|
|
|
|