View Single Post
  #52 (permalink)  
Old 05-02-2009, 08:47 AM
chiwing chiwing is offline
Member
 
Join Date: Jul 2008
Posts: 47
chiwing is on a distinguished road
Quote:
Originally Posted by Mistigri View Post
Hi Tim,

When using dev-c++ the def file is generated for you automatically the problem is that you end up with function names that look like this :

PHP Code:
EXPORTS
    _Z11GetSMAArrayP8RateInfoiiPd
@16 1
    _Z12GetHighValueP8RateInfoii 
_Z12GetHighValueP8RateInfoii@12 2
    _Z12GetHighValueP8RateInfoii
@12 3
    _Z13GetCloseValueP8RateInfoii 
_Z13GetCloseValueP8RateInfoii@12 4
    _Z13GetCloseValueP8RateInfoii
@12 5
    _Z11GetSMAArrayP8RateInfoiiPd 
_Z11GetSMAArrayP8RateInfoiiPd@16 
Now you need to make sure you add the following check around your code

PHP Code:
#ifdef __cplusplus
extern "C" {
#endif


#ifdef __cplusplus
}
#endif 
Attached are the sample files I did for VS2008 but this time using dev-c++ ...
Hope this helps
do u mean that when write dll file,
the function in the def file should add _z12 at the begin?

that means in .mq4 file
call finction: get_max_deviation

then in .def file
the transfered function : _z12get_max_deviation???

what means for the @ number after the function name

thanks

Last edited by chiwing; 05-02-2009 at 09:00 AM.
Reply With Quote