Book a Demo

Author Topic: Code import problem with __stdcall  (Read 3129 times)

dominique

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Code import problem with __stdcall
« on: April 29, 2006, 03:31:25 pm »
Hi,

I have a problem with the code import from C++ code.

There is a parse error in EA if i use __stdcall in my C++ code.

The hint in EA is:
You may need to define a language macro

But what can I do? What should the macro look like?

Thx
Dominique
:)
« Last Edit: April 29, 2006, 03:34:02 pm by dominique »

thomaskilian

  • Guest
Re: Code import problem with __stdcall
« Reply #1 on: May 02, 2006, 03:04:53 am »
I'm not a C++ guy, but you can define a list of macros which you are using in your code to make EA aware of them: Settings/Preprocessor Macros.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code import problem with __stdcall
« Reply #2 on: May 03, 2006, 03:30:48 pm »
Thomas is correct in his interpretation of this message.  The help page http://sparxsystems.com.au/EAUserGuide/index.html?languagemacros.htm talks more about this and what sort of macros can be skipped.

However, the __stdcall macro should be skipped even without defining a macro for it there.  (And it is for me)  Are you sure that it is __stdcall that is causing your problem?

dominique

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Code import problem with __stdcall
« Reply #3 on: May 03, 2006, 03:54:13 pm »
#ifndef CAMERA_H
#define CAMERA_H

#define cdSTDCALL __stdcall

namespace dom
{

class Camera

{

public:


Camera();



virtual ~Camera(void);



static cdUInt32 __stdcall function1(int i);  // OK



static cdUInt32 cdSTDCALL function2(int i);  // not OK


};
}

#endif



You are right Simon. The problem is not __stdcall. I figured it out as i wrote the test-class above.

The Problem is that EA checks the source code without pay attention  the preprocessing.

Any proposals?


Thx
Dominique

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code import problem with __stdcall
« Reply #4 on: May 03, 2006, 03:56:12 pm »
Read the help link I posted before and add cdSTDCALL to the macro list.

dominique

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Code import problem with __stdcall
« Reply #5 on: May 03, 2006, 04:22:38 pm »
Thank you Simon. But this is not very elegant. I dont have only one macro.
Conclusio: It would be nice if this would be done automatic by EA in the next releases, if possible.

Dominique  :)