basic project build errors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to set up a project that will use the example code in the SDK to create a line and a circle.
First I tried to use the ObjectARX wizard to set up, but the entrypoint doesn't even resemble anything like the documentation, so I am attempting this without it until I learn a little more about classes.
Anyway, I follow the instructions for setting up in VS in the "Getting Started" section in the developers guide:
Create Win32 project, set to DLL.
Add the lib and inc directories to the environment settings.
Choose All Configurations in project properties and set runtime library to Multi-threaded DLL (/MD)
Set output name to *.arx
Add rxapi.lib and acdb17.lib to the additional dependencies part of linker input settings
(how do you know what libraries and headers you need? Is there one that contains them all?)
I create a acrxEntryPoint.cpp file and add the following to it:
(lb sign) include "rxregsvc.h" // the post window doesn't seem to like the lb signs
(lb sign) include "acutads.h"
extern "C" AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg, void* appId)
{
switch(msg)
{
case AcRx::kInitAppMsg:
acrxUnlockApplication(appId);
acrxRegisterAppMDIAware(appId);
acutPrintf("\nExample Application Loaded");
break;
case AcRx::kUnloadAppMsg:
acutPrintf("\nExample Application Unloaded");
break;
}
return AcRx::kRetOK;
}
I tried to compile it before I attempted any changes, and got the following:
"Did you forget to add '#include "stdafx.h"' to your source?"
So I added #include "stdafx.h" and that error went away, but now I have (among others below it):
"error C2653: 'AcRx' : is not a class or namespace name" pointing to the extern "C" line.
Am I missing a library or include statement? The intellisense seems to know it is there; whenever I type AcRx:: I get all of the choices. This is proving to be difficult to learn, any help with this would be greatly appreciated.