Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Source Help

import undecorated c++ function

A community discussion post from the original code:zIRON forum.

Replies

Colin admin
Posts
928
Threads
49
Location
Bulgaria

you downloaded the beta package?

here?

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

yes , using ziron ver 1.1.38.1

http://www.freewebs.com/ogremagic/index.htm

Colin admin
Posts
928
Threads
49
Location
Bulgaria

can you open the changelog and paste what is the top line?

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt
Ziron Assembler 1.1.38.1

http://www.freewebs.com/ogremagic/index.htm

Colin admin
Posts
928
Threads
49
Location
Bulgaria

then you did not download the beta package..... see the "here?" link

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok downloaded and works fin. thanks.

http://www.freewebs.com/ogremagic/index.htm

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

Hi , Mr Colin.

I am really going to mad , i have a simple test program that uses my MagicPro library.

it crashed when testing in Ziron , and works fine with MSVC++2010.

here is the Ziron version

//****************************************//
//           ************                 //
//      ***MagicPro library***            //
//           ************                 //
//****************************************//
program WIN32GUI 'MagicPro Test #1';

#include 'console.zir';
#include 'ch.zir';

const KC_ESCAPE = 0x01;


imports('MagicPro.dll') 
{  
  procedure z_init = ('_z_init@4')(char* Titel); cdecl; 
  procedure Graphics3D = ('_Graphics3D@20')(Dword Width,Height,depth; boolean fullScrn,VSync);  cdecl;
  procedure z_setAmbientLight = ('_z_setAmbientLight@12')(single red,green,blue); cdecl;  
  procedure setMediaDir = ('_setMediaDir@8')(char* name;boolean recursive); cdecl;
  function  OIS_isKeyDown = ('_OIS_isKeyDown@4')(int32 key): boolean; cdecl;
  procedure RenderWorld = ('_RenderWorld@4')(); cdecl;
  procedure Sync(); cdecl;
  procedure EndGraphics = ('_EndGraphics@0')(); cdecl;
}  

    z_init('MagicPro Test #1');
    Graphics3D(800,600,32,false,false);

    z_setAmbientLight(30,30,50);

    setMediaDir('ZipMedia.zip',true);
    setMediaDir('media',true);
    
    
    while(!OIS_isKeyDown(KC_ESCAPE))
     {
        
        RenderWorld();
    	Sync();
     }
 
    EndGraphics(); 
ExitProcess(0);

and here is the MSVC++2010 version

//****************************************//
//           ************                 //
//      ***MagicPro library***            //
//           ************                 //
//****************************************//

#include "Magic.h"

using namespace Bogre;
using namespace OIS;

int WINAPI WinMain (HINSTANCE  hInst,HINSTANCE  hPrev,LPSTR CmdLine,int CmdShow)
{
  z_init("MagicPro Test #1");
  Graphics3D(800,600,32,false,false);

  z_setAmbientLight(30,30,50);

  setMediaDir("ZipMedia.zip",true);
  setMediaDir("media",true);


  while(!OIS_isKeyDown(KC_ESCAPE))
   {

      RenderWorld();

	  Sync();
   }

  EndGraphics();
}

so what can be the problem with ziron?

http://www.freewebs.com/ogremagic/index.htm

Colin admin
Posts
928
Threads
49
Location
Bulgaria

Can you paste the c include header so i can compare?

judging by the mangled name

procedure RenderWorld = ('_RenderWorld@4')(); cdecl;

RenderWorld expects 1 param