Making C SDK compile (informational post, list of fixes)

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
Blank Xavier
Posts: 6
Joined: Sat Jul 11, 2009 2:00 pm

Making C SDK compile (informational post, list of fixes)

Post by Blank Xavier » Sat Jul 11, 2009 2:11 pm

Okay...where to begin.

Simple things first. When you try to make a new topic as your first post, you get a message telling you that to cut down on spam, you have to have a reply to your credit - and that you can reply on the test forum to do this.

There is no test forum.

Now for less simple things.

I've got a Space Navigator (PE). I'm running Windows 7, 64 bit, I use Win32 and C to code, I make unicode applications and I use the command line MS compilers with my own makefiles and gnumake.

So I download the SDK (the C SDK, for the Space Traveller).

There are two libraries. I set up my makefiles for them and compile.

There are problems.

First, rather shockingly, there are CVS conflict markers for the CVS ID tags, in some of the file headers!

Second, this line (about line 149, but my lines have moved a bit) in siapp.c is wrong;

typedef (WINAPI *PFNSPW_ERRORSTRING) (enum SpwRetVal val);

It needs to be like this;

typedef char *(WINAPI *PFNSPW_ERRORSTRING) (enum SpwRetVal val);

The global error variable isn't made public in any of the public header files, so trying to use it causes a compile error.

I added;

extern enum SpwRetVal SpwErrorVal;

to si.h

Some functions in siapp don't use all their arguments, so you need to ignore 4100.

In siapp.c, for Unicode, line 48 is wrong;

static LPCTSTR DllLibrary = "siappdll";

needs to be

static LPCTSTR DllLibrary = L"siappdll";

(the string should prolly have been wrapped in a _T() - I use L, however).

Blank Xavier
Posts: 6
Joined: Sat Jul 11, 2009 2:00 pm

Post by Blank Xavier » Sat Jul 11, 2009 2:13 pm

Note; when I started trying to compile, I just pragma'ed the warnings and as such compiled successfully.

I was however unable to load the DLLs.

Sorting out the warnings permitted me to load the DLLs - I'm guessing the DLL name fix was the key change.

neweng
Posts: 1
Joined: Wed Sep 16, 2015 9:15 am

Re: Making C SDK compile (informational post, list of fixes)

Post by neweng » Wed Sep 16, 2015 9:42 am

I didn't find a test post area either, so I am writing this.
You certainly sound knowledgeable: I would give anything for an answer to this:
I need to control the rotation state from the command line.
I notice that an xml file is changed when the rotation state is toggled, but changing that file has no effect.

Post Reply