1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #include <opc/opc.h>
- #include <stdio.h>
- #ifdef WIN32
- #include <crtdbg.h>
- #endif
- int main( int argc, const char* argv[] )
- {
- #ifdef WIN32
- _CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
- #endif
- if (OPC_ERROR_NONE==opcInitLibrary()) {
- printf("libopc as well as zlib and libxml2 are ready to use.\n");
- opcFreeLibrary();
- #ifdef WIN32
- OPC_ASSERT(!_CrtDumpMemoryLeaks());
- #endif
- return 0;
- } else {
- printf("error initializing libopc.\n ");
- return 1;
- }
- }
|