Blackkeeper

5 Reputation

One Badge

12 years, 179 days

MaplePrimes Activity


These are replies submitted by Blackkeeper

@Axel Vogt 

Ok, did some experiments.

It seems Maple cant deal with namespaces in c++. In addition there are issues with 64 bit systems.
I tried a 32Bit version of Maple combined with WinXp and now (without namespaces) i can add my own DLL's.

 

Now i only have one small problem left.

Fromt time to time Maple kernel is shutting down, dunno why. Are there known issues for this?

@Axel Vogt 

Ok, did some experiments.

It seems Maple cant deal with namespaces in c++. In addition there are issues with 64 bit systems.
I tried a 32Bit version of Maple combined with WinXp and now (without namespaces) i can add my own DLL's.

 

Now i only have one small problem left.

Fromt time to time Maple kernel is shutting down, dunno why. Are there known issues for this?

First try with even your example failed. I created a new maple worksheet and saved it in the folder of the .dll file. Then typed exactly the same commands as you, but still some errors.

I will reinstall Maple for the moment and try it again, maybe there is something wrong or Windows 7 is blocking something.

Stay tuned :D

Btw. thank you for the example

First try with even your example failed. I created a new maple worksheet and saved it in the folder of the .dll file. Then typed exactly the same commands as you, but still some errors.

I will reinstall Maple for the moment and try it again, maybe there is something wrong or Windows 7 is blocking something.

Stay tuned :D

Btw. thank you for the example

First try with even your example failed. I created a new maple worksheet and saved it in the folder of the .dll file. Then typed exactly the same commands as you, but still some errors.

I will reinstall Maple for the moment and try it again, maybe there is something wrong or Windows 7 is blocking something.

Stay tuned :D

@Axel Vogt 

For first source code
void WAVEFUNC::WAVECLASS::play(char *)

For second source code
int CALC::MATH::suma(int,int)

Both function without decorations

If i go after the table that i found ( http://img22.imageshack.us/img22/8788/mapledatentypen.jpg ) , integer[4] should be int as well as long.

 

I used dependency walker now for second dll, there is one minor error, but as read in help of dependency walker this should not have any effect on my function. Btw i tested 2nd source code with an extra .exe file i created. There are no errors and i can use my function.

So there has to be a mistake within in my declaration inside of maple, but i dont find my mistake -.-

@acer yeah, tried both. Error is always the same.

I dont know where my mistake is. I looked also in Maple Online Help but cant find their any hint, too

Ok my next step was to define my source code as "C-Code", but still nothing really changed.

If i try to import any of my dlls i always get "Error, function name expected"

I tried a simple function like this to import, also. Surely contained in a dll-file.


int sum (int num1, int num2)
{
return num1+num2;
}


In Maple i used this command:

summi := define_external ('sum', 'num1'::integer[4], 'num2'::integer[4], 'RETURN'::integer[4], 'LIB' = "add.lib");


So, when i call summi(); now. Lets say with two random numbers like summi(3,4);
I always get "Error, function name expected".

What is wrong ?

 

@acer
First C++ Code, the missing part for includes are

cpp:
iostream
windows.h
mmsystem.h
string

headerfile:
only iostream

Second commandline, i'm using MS Visual Studio 2012 and this is my commandline:

/GS /GL /analyze- /W3 /Gy /Zc:wchar_t /Zi /Gm- /O2 /Fd"Release\vc110.pdb" /fp:precise /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "WAVE_EXPORTS" /D "_WINDLL" /errorReport:prompt /WX- /Zc:forScope /Gz /Oy- /Oi /MD /Fa"Release\" /EHsc /nologo /Fo"Release\" /Fp"Release\wave.pch"

It is almost standard command line except the fact i'm not using Unicode because of playsound function to prevent LPCWSTR and __stdcall instead of __cdecl


Third, yes 'play' is the function in my wave.dll as you can see in my header- or cpp-file. Sry but i dont have knowledge about decorations of my symbols. How can i check it ?

@acer sure, you are right :) but then comes: Error, function name expected

But i wonder, i declare my maple function with declare_external?! Or do i have to assign it on an other way when i want using a paramater in my created maple function?

 

Page 1 of 1