Home » Developer & Programmer » Precompilers, OCI & OCCI » Sqlcxt Again!!!
Sqlcxt Again!!! [message #183393] Thu, 20 July 2006 13:17 Go to next message
srivaths
Messages: 60
Registered: June 2005
Location: France
Member

Hi,

How do I link my pro*c file? When i do that I get the following error message

  [Linker error] undefined reference to `sqlcxt' 
  ld returned 1 exit status 


In my office I use unix and compiles well as its very much available in libclntsh.

But in windows environment where can I find sqlcxt?

c:\oracle\ora92\precomp\public [Include Path]
C:\oracle\ora92\precomp\lib [Lib Path] -- Should I give something else here?

I use Oracle 9i with Dev C++ in Windows XP.



regards
Srivaths
Re: Sqlcxt Again!!! [message #318641 is a reply to message #183393] Wed, 07 May 2008 07:28 Go to previous message
sadnemous
Messages: 1
Registered: March 2005
Location: Kolkata
Junior Member

The exact situation is here. Please anyone help.

My ProC file is 1.pc:

#include <stdio.h>
#include <sqlca.h>

void sqlerror();

EXEC SQL BEGIN DECLARE SECTION;
char *connstr = "scott/tiger@orcl";
int c_change;
EXEC SQL END DECLARE SECTION;

void main() {
EXEC SQL WHENEVER SQLERROR DO sqlerror();
EXEC SQL WHENEVER SQLWARNING CONTINUE;
EXEC SQL CONNECT :connstr;
}
void sqlerror() {
printf("Stop Error:\t%25i\n", sqlca.sqlcode);
return;
}


and MakeFile is: (1.pc is precompiled to 1.c)


SQL_LIB=D:\oracle\ora92\precomp\LIB\MSVC\oraSQL9.lib

CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = 1.o
LINKOBJ = 1.o


INCS = -I"C:/Dev-Cpp/include" -I"D:/oracle/ora92/precomp/public"
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"D:/oracle/ora92/precomp/public"

BIN = DB.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
RM = rm -f

.PHONY: all all-before all-after clean clean-custom

all: all-before DB.exe all-after


clean: clean-custom
${RM} $(OBJ) $(BIN)

$(BIN): $(OBJ)
$(CC) $(LINKOBJ) -o "DB.exe" -L $(SQL_LIB)

1.o: 1.c
$(CC) -c 1.c -o 1.o $(CFLAGS)





Previous Topic: Compiler settings for extensible indexing
Next Topic: DUMP
Goto Forum:
  


Current Time: Sat Dec 10 19:00:03 CST 2016

Total time taken to generate the page: 0.08901 seconds