Home » Developer & Programmer » Precompilers, OCI & OCCI » Pro*c file compilation error. (Solaris 10, Oralce 10)
icon9.gif  Pro*c file compilation error. [message #295296] Tue, 22 January 2008 01:13 Go to next message
nsurendiran
Messages: 16
Registered: March 2007
Location: India
Junior Member

Dear All,

I am trying to compile a .pc file with the make file which I created. But when I try to give make command I am getting following error
>make testfile
cc    -o testfile testfile.c
"testfile.c", line 117: warning: no explicit type given
"testfile.c", line 119: warning: no explicit type given
"testfile.c", line 121: warning: no explicit type given
"testfile.c", line 122: warning: no explicit type given
"testfile.c", line 123: warning: no explicit type given
Undefined                       first referenced
 symbol                             in file
sqlcxt                              testfile.o
ld: fatal: Symbol referencing errors. No output written to testfile
*** Error code 1
make: Fatal error: Command failed for target `testfile'


Any kind of suggestions or help would be appreciated.

Thanks in advance.

N.Surendran
Re: Pro*c file compilation error. [message #295299 is a reply to message #295296] Tue, 22 January 2008 01:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I suggest to post what is at the lines otherwise how could we guess what it is?

Regards
Michel
Re: Pro*c file compilation error. [message #295305 is a reply to message #295296] Tue, 22 January 2008 01:38 Go to previous messageGo to next message
nsurendiran
Messages: 16
Registered: March 2007
Location: India
Junior Member

Michel,

Sorry for that. Here is the code which I took it from testfile.c
/* SQLLIB Prototypes */
extern sqlcxt (/*_ void **, unsigned int *,
                   struct sqlexd *, struct sqlcxp * _*/);
extern sqlcx2t(/*_ void **, unsigned int *,
                   struct sqlexd *, struct sqlcxp * _*/);
extern sqlbuft(/*_ void **, char * _*/);
extern sqlgs2t(/*_ void **, char * _*/);
extern sqlorat(/*_ void **, unsigned int *, void * _*/);


I guess that would do.

Thanks.
Surendran.
Re: Pro*c file compilation error. [message #295315 is a reply to message #295305] Tue, 22 January 2008 02:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Change the option of compilation.
Your declarations are for K&R mode (without type declaration inside prototype) and the compiler wants ANSI one (with type parameter type declaration).
Just a warning, you can ignore it.
That is for the first part.

Now for undefined reference, then add Oracle libraries in the lib list in your makefile.

Regards
Michel
Re: Pro*c file compilation error. - RESOLVED [message #295350 is a reply to message #295296] Tue, 22 January 2008 03:19 Go to previous messageGo to next message
nsurendiran
Messages: 16
Registered: March 2007
Location: India
Junior Member

Michel,

Thanks for the help. Actually we also did a small change in the makefile like removed the environment variable for oracle home path and directly hardcoded that, in addition to what you mentioned here. That solved the problem.

Thanks again.
Surendran.
Re: Pro*c file compilation error. - RESOLVED [message #383234 is a reply to message #295350] Tue, 27 January 2009 19:30 Go to previous messageGo to next message
jesliej
Messages: 4
Registered: July 2006
Location: Longview, WA
Junior Member
Hi

I have the same issue.

Can you post your sample make file and how you compiled this test file.

Appreciate your help in this regard.

Thanks
Simpson
Re: Pro*c file compilation error. [message #448985 is a reply to message #295315] Fri, 26 March 2010 02:44 Go to previous messageGo to next message
zcoolest
Messages: 6
Registered: March 2010
Junior Member
How do you change the option of compilation?
Re: Pro*c file compilation error. [message #448994 is a reply to message #448985] Fri, 26 March 2010 03:39 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Of compilation or precompilation?

For Pro*C:
C:\>proc

Pro*C/C++: Release 10.2.0.4.0 - Production on Fri Mar 26 09:37:38 2010

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

System default option values taken from: C:\oracle\ora102\precomp\admin\pcscfg.cfg

Option Name    Current Value  Description
-------------------------------------------------------------------------------
auto_connect   no             Allow automatic connection to ops$ account
char_map       charz          Mapping of character arrays and strings
close_on_commitno             Close all cursors on COMMIT
cmax           100            CMAX Value for connection pool
cmin           2              CMIN Value for connection pool
cincr          1              CINCR Value for connection pool
ctimeout       0              CTIMEOUT Value for connection pool
cnowait        0              CNOWAIT Value for connection pool
code           ansi_c         The type of code to be generated
comp_charset   multi_byte     The character set type the C compiler supports
config         default        Override system configuration file with another
cpool          no             Support connection pooling
cpp_suffix     *none*         Override the default C++ filename suffix
dbms           native         v6/v7/v8 compatibility mode
def_sqlcode    no             Generate '#define SQLCODE sqlca.sqlcode' macro
define         WIN32_LEAN_AND_Define a preprocessor symbol
duration       transaction    Set pin duration for objects in the cache
dynamic        oracle         Specify Oracle or ANSI Dynamic SQL Semantics
errors         yes            Whether error messages are sent to the terminal
errtype        *none*         Name of the list file for intype file errors
events         no             Support publish-subscribe event notifications
fips           none           FIPS flagging of ANSI noncompliant usage
header         *none*         Specify file extension for Precompiled Headers
hold_cursor    no             Control holding of cursors in the cursor cache
iname          *none*         The name of the input file
include        *none*         Directory paths for included files
intype         *none*         The name of the input file for type information
lines          no             Add #line directives to the generated code
lname          *none*         Override default list file name
ltype          none           The amount of data generated in the list file
maxliteral     1024           Maximum length of a generated string literal
maxopencursors 10             Maximum number of cached open cursors
mode           oracle         Code conformance to Oracle or ANSI rules
native_types   no             Support for native float/double
nls_char       *none*         Specify National Language character variables
nls_local      no             Control how NLS character semantics are done
objects        yes            Support object types
oname          *none*         The name of the output file
oraca          no             Control the use of the ORACA
pagelen        80             The page length of the list file
parse          none           Control which non-SQL code is parsed
prefetch       1              Number of rows pre-fetched at cursor OPEN time
release_cursor no             Control release of cursors from cursor cache
select_error   yes            Control flagging of select errors
sqlcheck       syntax         Amount of compile-time SQL checking
sys_include    *none*         Directory where system header files are found
threads        no             Indicates a multi-threaded application
type_code      oracle         Use Oracle or ANSI type codes for Dynamic SQL
unsafe_null    no             Allow a NULL fetch without indicator variable
userid         *none*         A username/password [@dbname] connect string
utf16_charset  nchar_charset  The character set form used by UTF16 variables
varchar        no             Allow the use of implicit varchar structures
version        recent         Which version of an object is to be returned
win32_threads  no             Support windows default local threading
PCC-F-02135, CMD-LINE:  User asked for help

For your C compiler refer to your documentation.

Regards
Michel

[Updated on: Fri, 26 March 2010 09:02]

Report message to a moderator

Re: Pro*c file compilation error. [message #449054 is a reply to message #448994] Fri, 26 March 2010 07:54 Go to previous messageGo to next message
zcoolest
Messages: 6
Registered: March 2010
Junior Member
How do you eliminate the warnings...somone said to change the declration in the compiler...how to do that? Thank You.
Re: Pro*c file compilation error. [message #449060 is a reply to message #449054] Fri, 26 March 2010 08:21 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Once again which warnings?
Please pay attention to the questions that are posted.

Regards
Michel
Re: Pro*c file compilation error. [message #449066 is a reply to message #449060] Fri, 26 March 2010 08:57 Go to previous messageGo to next message
zcoolest
Messages: 6
Registered: March 2010
Junior Member
These are my warnings..thanks again


, line 117: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN

, line 119: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN

, line 121: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN

, line 122: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN

, line 123: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN
Re: Pro*c file compilation error. [message #449068 is a reply to message #449066] Fri, 26 March 2010 09:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
For your C compiler refer to your documentation.

Regards
Michel
Re: Pro*c file compilation error. [message #449073 is a reply to message #295296] Fri, 26 March 2010 09:10 Go to previous messageGo to next message
zcoolest
Messages: 6
Registered: March 2010
Junior Member
what does this mean
Re: Pro*c file compilation error. [message #449079 is a reply to message #449073] Fri, 26 March 2010 09:28 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
That means that you have to read the documentation of your C compiler to know how to do what you want to do, it is possible to do it.

Regards
Michel
Re: Pro*c file compilation error. [message #449081 is a reply to message #449079] Fri, 26 March 2010 09:35 Go to previous messageGo to next message
zcoolest
Messages: 6
Registered: March 2010
Junior Member
so why do you have this webiste? ok, thanks and take care..
Re: Pro*c file compilation error. [message #449082 is a reply to message #449079] Fri, 26 March 2010 09:38 Go to previous messageGo to next message
zcoolest
Messages: 6
Registered: March 2010
Junior Member
by the way there was no documentation.
Re: Pro*c file compilation error. [message #449099 is a reply to message #449081] Fri, 26 March 2010 11:09 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This web site is to help you solve problems not to supply your lack of documentation reading.

In addition, this web site is to help on Oracle problems (precompilers, Pro*C, OCI, OCCI for this section) not on your specific C compiler.

Regards
Michel
Previous Topic: Calling Stored Procedure from a C program
Next Topic: Proc compilation
Goto Forum:
  


Current Time: Thu Mar 28 15:40:59 CDT 2024