libraries and c++ compatibility

dnewbie run3 at myopera.com
Sun May 13 12:26:54 PDT 2012


On Sunday, 13 May 2012 at 19:01:15 UTC, Jason King wrote:
> .
>>> C:\ocilib\ocilib3.9.3\lib32>dmc myapp.cpp -c 
>>> -Ic:\ocilib\ocilib3.9.3\include
>>>
>>> C:\ocilib\ocilib3.9.3\lib32>optlink myapp.obj,,,ociliba-dm.lib
>>> OPTLINK (R) for Win32  Release 7.50B1
>>> Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
>>>
>>> myapp.obj(myapp)
>>> Error 42: Symbol Undefined _OCI_Cleanup
>>> myapp.obj(myapp)
>>> Error 42: Symbol Undefined _OCI_GetString
>>> ... 7 more, covering all ocilib calls.
>>>
>>
>> Please try adding `-DOCI_API=__stdcall -DOCI_CHARSET_ANSI` to 
>> dmc command line. (check 
>> http://orclib.sourceforge.net/doc/html/group__g__install.html)
>>
>> If you get runtime errors, please check your ORACLE_HOME 
>> environment variable and make sure your %ORACLE_HOME%\bin 
>> directory is in your PATH environment variable.
> Thanks for the help.
>
> All I did was generate a OMF library running IMPLIB vs. 
> OCILIBA.DLL.
> I think your suggestion involves building OCILIB from scratch.  
> Is that right?


No. You should add '-DOCI_API=__stdcall -DOCI_CHARSET_ANSI' to 
dmc when building your c/cpp app.


> Rebuilding the library looks like a job and I want to make sure 
> that's what I need to do to proceed.




More information about the Digitalmars-d-learn mailing list