Home » Community » Newbie corner » DLI Problem...
DLI Problem... [message #34808] |
Tue, 13 December 2011 15:30 |
Wolfgang
Messages: 146 Registered: November 2011 Location: Germany
|
Experienced Member |
|
|
Hi,
I found an (maybe) interessting dll for use of imap
(http://hellowebapps.com/products/imapx/)
and want to play a little bit with it... so i try to include it in my upp project.
main.cpp#include "test.h"
#define DLLFILENAME "E:\\Ultimate++\\MyApps\\test\\ImapX.dll"
#define DLIMODULE ImapX
#define DLIHEADER <test/imapx.dli>
#define DLLCALL LNPUBLIC
#include <Core/dli_header.h>
test::test()
{
CtrlLayout(*this, "Window title");
}
GUI_APP_MAIN
{
test().Run();
}
test.h#ifndef _test_test_h
#define _test_test_h
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
#define LAYOUTFILE <test/test.lay>
#include <CtrlCore/lay.h>
#define DLLFILENAME "E:\\Ultimate++\\MyApps\\test\\ImapX.dll"
#define DLIMODULE ImapX
#define DLIHEADER <test/imapx.dli>
#define DLLCALL LNPUBLIC
#include <Core/dli_header.h>
class test : public WithtestLayout<TopWindow> {
public:
typedef test CLASSNAME;
test();
};
#endif
imapx.dliFN(bool, Connection(), (void))
But with gives me
Quote: | E:\Ultimate++\MyApps\test/imapx.dli(1) : error C2146: syntax error : missing ')' before identifier 'Connection'
E:\Ultimate++\MyApps\test/imapx.dli(1) : error C2146: syntax error : missing ';' before identifier 'Connection'
E:\Ultimate++\MyApps\test/imapx.dli(1) : error C3646: '_type' : unknown override specifier
E:\Ultimate++\MyApps\test/imapx.dli(1) : error C2059: syntax error : ')'
E:\Ultimate++\MyApps\test/imapx.dli(1) : error C2091: function returns function
E:\Ultimate++\MyApps\test/imapx.dli(1) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
|
and so on... whats wrong?
|
|
|
Re: DLI Problem... [message #34809 is a reply to message #34808] |
Tue, 13 December 2011 15:55 |
Wolfgang
Messages: 146 Registered: November 2011 Location: Germany
|
Experienced Member |
|
|
Found a post that said that
is a problem, edited it and it compiles without error:
main.cpp
#include "test.h"
#define DLLFILENAME "E:\\Ultimate++\\MyApps\\test\\ImapX.dll"
#define DLIMODULE ImapX
#define DLIHEADER <test/ImapX.dli>
//#define DLLCALL LNPUBLIC
#include <Core/dli.h>
test::test()
{
CtrlLayout(*this, "Window title");
if (ImapX()) PromptOK("OK");
/*
if (ImapX())
{
//Value client = ImapX().ImapClient("imap.gmail.com", 993, true);
} else PromptOK("NO INSTANCE");
*/
}
GUI_APP_MAIN
{
test().Run();
}
imapx.dli
FN(Value, ImapClient, (String,int,bool))
FN(bool, Connection, (void))
But the application never appears, it gets killed just after its execution. If i change the link to the dll to a wrong place it compiles and runs.. (i think cause of the dll dont get loaded..)
|
|
|
Goto Forum:
Current Time: Thu Mar 28 14:15:49 CET 2024
Total time taken to generate the page: 0.01527 seconds
|