Home
Reply
Regular Contributor
yadongshen
Posts: 46

error in hello_world program

Hi, i tried to run an easy hello_world programe to test if the acis_R22 works correctly in my computer

My computer OS is windows 7 64bit, and the C/C++ is VS_2005_32 bit.

The acis_R22 directory is C:\Spatial\acisR22

I set up two variables: a3dt and arch. also put the a3dt and arch directory into C/C++ additional include directories.

Project-> Properties ->C/C++->Category->Precompiled headers -> Create/Use Precompiled Headers  à Not using Precompiled headers

But when i ran the code, an dialogue box jumped out:

 

The program can't start because SpaACISd.dll is missing from your computer. Try reinstalling the program to fix this problem.

 

Who can help me with this. I appreciate it.

 

The hello_world code is attached:

#include  <stdio.h>

#include  "stdafx.h"

#include  "acis.hxx"

#include  "api.hxx"

#include  "kernapi.hxx"

 

using  namespacestd;

 

// Declaration of the ACIS licensing function.

void  unlock_spatial_products_4207();

 

// Declaration of our functions.

void  do_something();

int  my_initialization();

int  my_termination();

 

// The main program...

int  main (int argc, char** argv) {

 

     int  ret_val = my_initialization();

     if(ret_val)

       return1;

 

      do_something();

 

       ret_val = my_termination();

       if(ret_val)

        return1;

 

       return0;

}

 

void  do_something(){

      // Your application code goes here.

    printf ("Hello, World!\n");

    getchar();

}

 

int  my_initialization() {

// Start ACIS.

outcome result = api_start_modeller(0);

if(!result.ok())

{err_mess_type err_no = result.error_number();

printf ("ERROR in api_start_modeller() %d: %s\n",err_no, find_err_mess (err_no));

return  err_no;

}

 

// Call the licensing function to unlock ACIS.

unlock_spatial_products_4207();

// Initialize all necessary add-on components (none in this example).

return0;

}

 

 

int  my_termination() {

 

// Terminate all necessary add-on components (none in this example). // Stop ACIS and release any allocated memory.

outcome result = api_stop_modeller();

if(!result.ok()) {err_mess_type err_no = result.error_number();

printf ("ERROR in api_stop_modeller() %d: %s\n",err_no, find_err_mess (err_no));

returnerr_no;

}

return0;

}

AR
Contributor
AR
Posts: 23

Re: error in hello_world program

You probably need to add the path of debug ACIS binaries in your environment variable PATH.

Or

Add the path of debug ACIS binaries  in "Project -> Properties -> Configuration Properties -> Debuging -> Working Directory".

 

AR

Regular Contributor
yadongshen
Posts: 46

Re: error in hello_world program

It workded!!! I really appreciate it!!!