Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Dynamic Linking
Dynamic Linking [message #95] Thu, 24 November 2005 04:32 Go to next message
jeff1101 is currently offline  jeff1101
Messages: 11
Registered: November 2005
Location: Philippines
Promising Member

I am trying to load a DLL file created in Visual C++ ver. 6. using
a DLI file. Here is my file name xdb.dli

FN(void,InitXDB,(const char *DSNname, bool bUseConnString))
FN(void, CloseXDB, ());
FN(int, ExecuteSQL, (char *SQLstmt))
FN(void, QuerySelect, (const int ColNum,const int QueryID, char *pValue, char *pName))
FN(void, QueryNext, (const int QueryID))
FN(void, CloseQuery, (const int QueryID))
FN(void, BeginTrans, ())
FN(void, EndTrans, ())
FN(long, GetColumnSize, (const int QueryID))
FN(bool, QueryEnd, (const int QueryID))

I added the following to the .cpp that will use the DLL
(at the topmost , after all my includes, etc.)


#define DLLFILENAME "XDB.dll"
#define DLIMODULE xdb
#define DLIHEADER <Test/xdb.dli>
#define DLLCALL LNPUBLIC
#include <Core/dli.h>

However during compile I keep getting:

d:/MyApps/Test/xdb.dli:1: error: expected `)' before "InitXDB_type"
d:/MyApps/Test/xdb.dli:1: error: ISO C++ forbids declaration of `InitXDB_type' with no type

Do you have an example code using the DLI for dynamic linking
I can reference? Thanks...
Re: Dynamic Linking [message #98 is a reply to message #95] Thu, 24 November 2005 10:39 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
My _guess_ is that you do not have defined LNPUBLIC at the moment of xdb.dli inclusion.

You can see example of .dli usage in "Oracle" package - it is used to dynamicaly link with oracle client libraries.

I can create reference example for this, if somebody tells me to which .dll/.so link to, that exists both on Win32 and Linux Smile (or at least has similar functionality).
Re: Dynamic Linking [message #191 is a reply to message #95] Thu, 01 December 2005 10:20 Go to previous message
jeff1101 is currently offline  jeff1101
Messages: 11
Registered: November 2005
Location: Philippines
Promising Member

Yes you are right. Forgot to thank you for this. Its working now.
Previous Topic: How do I get a char * of the string stored in the String class?
Next Topic: type safety and type casting in U++
Goto Forum:
  


Current Time: Mon Apr 29 10:24:23 CEST 2024

Total time taken to generate the page: 0.02129 seconds