Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Compile error with my test C and ocilib.h

449323Oct 11 2008 — edited Oct 13 2008
I am attempting to build a LBTable.c program based on an example at the ocilib web site and cannot get it to compile.
#include "ocilib.h"

int main(int argc, char *argv[])
{
    OCI_Connection* cn;
    OCI_Statement* st;
    OCI_Resultset* rs;
   

    OCI_Initialize(NULL, NULL, OCI_ENV_DEFAULT);
 
    cn = OCI_ConnectionCreate("s6s", "big", "big", 0CI_SESSION_DEFAULT);
    st = OCI_CreateStatement(cn);
   
    OCI_Cleanup();
    return EXIT_SUCCESS;
}
the errors I get are:-
c:\dev\c\test.c(13) : error C2059: syntax error : 'bad suffix on number'
c:\dev\c\test.c(13) : error C2146: syntax error : missing ')' before identifier 'CI_SESSION_DEFAULT'
c:\dev\c\test.c(13) : error C2059: syntax error : ')'
Error executing cl.exe.

test.obj - 10 error(s), 0 warning(s)

I am attempting to build with Microsoft Visual C++ 6 on an XP machine.
I have altered the project to find the ocilib.h in its own directory.
BTW Line 13 is the OCI_ConnectionCreate line where I have hardcoded the db, userID & password that works for me in PHP.
Please tell me what I need to alter to fix this problem.

Edited by: StrayGrey on Oct 11, 2008 1:53 PM
This post has been answered by Vincent Rogier on Oct 13 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2008
Added on Oct 11 2008
18 comments
3,780 views