FYI:
To convert a project from Compiler A to Compiler B.
You must know Compiler B very well. And, you should know a little about Compiler A.
Next, you need to know the basics of Compilers in General.
And, this project was written to only use C++ Visual Studio for Newbies.
I got it to link by doing three additional things past the Usual.
Note: I have no idea if it will Run or is Safe to run.
1. I defined "VJOY_EXPORTS"
2. I linked directly to the VJoy.dll using absolute path.
This is NOT a good thing to do; but, when you link to a Library you do NOT have the source code for you sometimes need to do it.
If the DLL has C linkage it should be safe.
No Idea what Linkage the DLL has it could be C++.
The third item is NOT one I would expect a Newbie to figure out. I modified the code.
The example should have been written in C if the DLL is really a C DLL; but, it is written in C++.
Either the person writing the sample code did NOT know very much or it is a C++ DLL.
Edit: Saving/Renaming the cpp file as a c files fixes the third problem without needing to edit the file.
Edit4: I am guessing the person who wrote the C++ file did not know very much about C++/C portability.
Original Code
Modified Code
extern "C" {
#include "VJoy.h"
}
Note: None of my Answers are for questions allowed on this site; this thread is likely to be deleted or locked.
Edit2: These are answers appropriate to be asked and answered on a programming site like here
http://cboard.cprogramming.com/forum.php Edit2b: But, if you need help doing the three things I did to get the project to compile and link it would be OK to ask how to do it.
Edit3: But, please read the FAQ and the User Manual for items 1; I do NOT know of any FAQ to help with Items 2 and 3.
Tim S.