TheSwamp

Code Red => ARX Programming => Topic started by: Paul Richardson on March 31, 2007, 12:09:07 PM

Title: C++ Interop (Implicit PInvoke)
Post by: Paul Richardson on March 31, 2007, 12:09:07 PM
Hey All -

I am trying to using "acedCoordFromPixelToWorld" from a managed c++ project. I've included the header file as such: #include "C:\ObjectARX 2007\inc\rxmfcapi.h". When building the project I get three errors for every definition in the header similar too:

1>C:\ObjectARX 2007\inc\rxmfcapi.h(68) : error C2143: syntax error : missing ';' before '*'
1>C:\ObjectARX 2007\inc\rxmfcapi.h(68) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\ObjectARX 2007\inc\rxmfcapi.h(68) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Any hints on what else I need to do?

Thanks - Paul

edit: Guess I should have put this in the net group...?
Title: Re: C++ Interop (Implicit PInvoke)
Post by: It's Alive! on April 01, 2007, 01:25:54 AM
Hi Paul,
I think acedCoordFromPixelToWorld() uses CPoint so you will probably need to load MFC <afxwin.h> .
You will have to get in and play with the compiler settings.
BTY I was able to compile this by using the arx wizard and selecting mix managed/unmanaged
HTH
Title: Re: C++ Interop (Implicit PInvoke)
Post by: Paul Richardson on April 01, 2007, 08:37:14 AM
Hi Paul,
I think acedCoordFromPixelToWorld() uses CPoint so you will probably need to load MFC <afxwin.h> .
You will have to get in and play with the compiler settings.
BTY I was able to compile this by using the arx wizard and selecting mix managed/unmanaged
HTH


Hey Daniel - Including "afxwin.h" to the managed project did the trick. Well it compiles anyway...) Off to play - thanks much!

I wonder if it's better to just use mixed managed/unmanaged instead?

Paul