• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
myvraccount

Why can't I access any input devices?!

23 posts in this topic

For quite a while now, I've been trying to do some things that shouldn't be all that complicated, but they're seemingly impossible!  Someone please, please, PLEASE tell me how to do ANY of them!  I just want to get a Novint Falcon, Razer Hydra, Oculus Rift, and Logitech Force 3D Pro to all work in C#.  I'm using Visual Studio 2012 Express on Windows 7 Professional.

 

 

For the first problem, Novint has instructions on how to set up a Falcon in Visual Studio, but only version 6 or 2003, which are ancient, and hardly even available/compatible anymore!  And the 2012 interface is completely different.  Also, their instructions are only for C++.  If it's only possible to do it in C++ I can accept that, and I guess I'll have to make a wrapper for C#, but I just need it working somehow, regardless of the language.  Their customer support is a joke in which I fail to see the humor.  They just told me that it works the same way in 2012 as 2003, and it clearly doesn't, since the interface has almost none of the same options.  When I politely explained this, they told me I should return the Falcon for a refund.  However, I don't see how that would solve my goal and enable me to get it to work programmatically.  Basically, I need to do these things:

-  Set some environment variables (this was actually done automatically during installation)

-  Set the lib and include paths (I think I may have figured that one out but I can't verify whether it's correct)

-  Include the library (for some reason I can't get it into my project and have it work at all)

It's actually a lot more complicated than it sounds.  I was getting a lot of errors and things weren't available that seem like they should be.  I'm on a different computer now so I don't have the details, but in any case, if anyone has ever used this API or made a Falcon work programmatically AT ALL, please tell me how!  If you somehow got it to work in DirectInput I'd be interested to know that as well!

 

 

As for the Razer Hydra, it seems that their API is also for C++ (although I heard something about a wrapper for C#.  Does anyone know about this or its progress?  BTW this is supposedly the same API that will be used by STEM.)  I seemed to be able to sloppily get their DLLs and garbage imported into a simple C++ test project, in which I then just called a function to check if the Hydra is connected, and wouldn't you know it - it doesn't compile!  I got a error that the DLL is invalid or some nonsense.  I tried it with the 32 and 64 bit DLLs and neither work, though they each say a slightly different position in the file which is invalid.  I got these files directly from Sixense (they created them) and I didn't have any error downloading them or installing anything.  The drivers and everything else work, and so should this.  I don't see how there could be a problem with the files, because they're the same ones that any developers would use.  It seems like something else must be going wrong but I can't imagine what.  Has anyone been able to get this to work, and if so, how?

 

 

Honestly, I don't even remember where I ended up with the Oculus Rift (I think it's another C++ one though.  Doesn't anyone use .NET?)  I think I got some third party thing because I couldn't find the files I needed directly from them.  Anyway, nothing works, but I didn't mess with it much because I've been focusing on the other ones more.  Regardless, if anyone has any info about this, as usual, please tell me!

 

 

The code to access the Force 3D Pro joystick works, but not the force feedback (which is the part I really need!)  I know the motor is working correctly, I just can't get the code right.  I'm using DirectInput in SharpDX (almost identical to SlimDX) in C#.  I get an error that the device is unregistered.  I don't see any function for registering the device, anywhere in the whole API.  I only have vague recollections of things I did in DirectInput in C++, and since moving to C#, I haven't had to register anything, and the SharpDX documentation is terrible.  So if anyone knows how to do this, it would be much appreciated!

 

 

By the way, for some reason, people often mistake me for a beginner and accuse me of biting off more than I can chew, and telling me to give up (much like the Novint customer support).  If that's all you intend to do, save your breath, er... typing, because:

A)  I'm never going to give up on this.  It's tremendously important that I get these things working, even if it takes me 20 years!

B)  I'm not a beginner at all.  I've been writing code longer than some of you have been alive.  It's just that they keep changing the interface in Visual Studio, so the way to import any libraries keeps changing, and these companies provide little to no support for development for their products, and nothing ever works correctly for some reason.  It's like the whole world's defective, and it's driving me mad!

 

But I would appreciate any information that could POSSIBLY be useful!  Thanks a lot!

2

Share this post


Link to post
Share on other sites

OK, first of all, I understand that C/C++ are more compatible and compiled to machine language and all that, but if you're writing a program with hundreds of classes and countless dependencies between them (often circular dependencies), do you realize how much of a nightmare that can be in C++?  I always get a million circular include errors that I can never resolve.  I need a FULLY object-oriented language.  Java would work I guess, but it isn't very compatible with many of the things I need.  Eiffel even less so, which basically leaves .NET (you mentioned D.  Does anyone actually even use that?), and honestly, I just want everything to be as simple and clean as possible.  Besides, I've already written a ton of other code in C# that needs to be used in conjunction with this.  The .NET IDE is so much better, and I'm not sure I could even install VS6 on my PC.  But supposedly, anything that works in that C++ should work in C++.NET also, right?

 

 

In any case, like I said, I use C++ in VS2012 when I absolutely HAVE TO, but otherwise, I prefer C#.  So for some of these APIs that were made to be used in C++, that's what I'm doing, but trying to write a wrapper around them for .NET.

 

 

Get a working copy of the libraries.

 

 

As for having a working copy of the libraries, I can't imagine why they wouldn't be working already, since they're directly from the manufacturer's website.  As I said, I suspect that somehow something else is wrong or incompatible, but for some reason it makes it seem as though the files are corrupt.  And this only applies to the Hydra.

 

 

It isn't THAT difficult.

 

 

And yes, it is THAT difficult, as evidenced by the fact that I've been trying to get it to work for months now and have made very little progress.  Ideally, I'd like to have it working by the end of the year if possible.  Once all the DLLs are in the project and connected correctly, the rest of it (the code) will be a breeze.  And I think it's mainly just that these APIs are particularly tough to set up.  I never had this much trouble with DirectX (although it was long enough ago that I don't even remember what I did, but I know it wouldn't entirely fix these problems anyway).

 

 

Thanks for the links.  I looked at the pages, but I won't have time to try them out until the weekend.  I'll let you know how it goes.  However, I have a sneaking suspicion that it may not fix the problem, only because each API has specific instructions of how to get the DLLs imported and working within the project, which involve going into options/settings from menus, which open up windows, and setting a bunch of stuff inside them (mostly typing paths and stuff into text boxes).  I know that all sounds terribly generic, but the point I'm trying to make is that I need to be able to configure various project settings in a specific way, which seems to vary for each API, and at no point do any of the instructions both 1) apply to the interface I am given AND 2) actually accomplish what it's supposed to.

 

 

Also, I've noticed that in different projects, I get different options/settings available to me!  It's completely inconsistent, i.e. sometimes I get a button to browse for DLLs, sometimes not; sometimes I have menu options that allow me to view project settings one way, sometimes they look an entirely different way, sometimes they're not available at all; sometimes if I put DLLs directly into my project folder, I can "add existing item" and it can be imported that way and may work or sometimes not!  It's the worst interface I've ever seen, and I don't know of anywhere that will actually tell me how to use it!

 

 

So what I would really like ideally is just a step-by-step guide of how to set up any or all the APIs, similar to the guides they provide, but with one key difference: it would actually WORK!  Can anyone possibly provide me that please?  It would be absolutely amazing!  Thanks.

Edited by myvraccount
0

Share this post


Link to post
Share on other sites

As for the Razer Hydra, it seems that their API is also for C++ (although I heard something about a wrapper for C#.  Does anyone know about this or its progress?  BTW this is supposedly the same API that will be used by STEM.)  I seemed to be able to sloppily get their DLLs and garbage imported into a simple C++ test project, in which I then just called a function to check if the Hydra is connected, and wouldn't you know it - it doesn't compile!  I got a error that the DLL is invalid or some nonsense.  I tried it with the 32 and 64 bit DLLs and neither work, though they each say a slightly different position in the file which is invalid.  I got these files directly from Sixense (they created them) and I didn't have any error downloading them or installing anything.  The drivers and everything else work, and so should this.  I don't see how there could be a problem with the files, because they're the same ones that any developers would use.  It seems like something else must be going wrong but I can't imagine what.  Has anyone been able to get this to work, and if so, how?

You seem to be doing something wrong. DLLs don't feature during compilation at all (nevertheless you claim there are compile errors). You might be describing linker problems, but DLLs in almost all cases don't feature during linking as well (the import libraries do. You are not giving the linker the DLLs instead of the import libraries, do you?). The point where actual problems with DLLs usually happen is during runtime.
Unfortunately you are not describing what you tried nor the error message (What exactly did you do? What exactly is the error message? Do not try to paraphrase errors, copy'n'paste them).

By the way, for some reason, people often mistake me for a beginner

Yes, unfortunately I can see how that would happen. You do not describe what you did and what your exact errors are in any sufficient detail to allow helping you (I picked one of your paragraphs to write something about but I could have done something very similar with all of them).
As another example your problems with the Falcon sound like you just need more accurate descriptions on where to set the include directory/library search paths in modern MSVCs. That's the usual thing you need to do with libraries. Very occasional you need something more (like disabling exceptions for some reason). If that is truly the problem you are having (and if it is not, once again: What does the description say? What did you try? What happened?) then I would strongly suggest you spend some more time with C++ in simpler scenarios. Write some programs, work on linking with a library of your own creation.
Because right now it seems you are stuck on extremely simple things and you only have two choices:
1) wait for someone to write the C# wrappers you need.
2) get more experience with C and/or C++ and write them yourself.
Since you seem to committed to this, even if it takes 20 years, starting on (2) might not be a bad idea. Worst case, you learned some new stuff by the time (1) happens.
1

Share this post


Link to post
Share on other sites
What exactly did you do? What exactly is the error message? Do not try to paraphrase errors, copy'n'paste them

 

 

Unfortunately I don't remember at this exact moment.  I can't copy and paste anything, because I'm using a different computer and I'm not even at home.  Besides, the computer on which I do my developing does not have an Internet connection.  In any case, I didn't think I'd need specific details about what I did, because I was hoping someone would just have a step-by-step process for me.  But I'll look into the DLL/Lib problem, but I just did what Razer's instructions said to do.

 

 

I would strongly suggest you spend some more time with C++ in simpler scenarios. Write some programs, work on linking with a library of your own creation.

 

Well I've spent about 15 years with C++ in fairly complicated scenarios.  The code doesn't trip me up at all.  It's just stuff like this that always gets me.  As for making my own library, I wouldn't even know where to start, and I never seemed to find good information on that the few times I seared for it out of curiosity, though I've never needed to do it before, so I didn't really care.  *sigh* I wish programming could just be programming!

 

 

As another example your problems with the Falcon sound like you just need more accurate descriptions on where to set the include directory/library search paths in modern MSVCs.

 

 

Yes!  That's exactly what was going wrong!  The PDF from Novint said to set the directory and library paths, but there were a couple different ways they needed to be done, and then I had to import the DLL or lib (I don't remember which), which it didn't even say how to do, so I think I just put it into the project folder and included it into the project, to no avail.  I had taken some notes and sent an email to Novint support, and I'll paste the conversation here for clarification.  The newest response they sent is one I just now saw, so I haven't had a chance to analyze it or try it out at all.  If anyone wants to dig deeply into this, the PDF I refer to is available from Novint's website (If I remember correctly, it's included with the SDK by clicking the "here" link under "Developer Downloads" in the Support->Downloads section, but I'm not sure if you can download JUST the PDF).  Anyway, you can see why I'm a bit frustrated:

 

 

ME:

 

 

I've been trying to set up the Falcon SDK to use, following the instructions in the PDF manual. I've already installed it, and the environment variables are set correctly (I didn't do that; did it happen automatically during installation?), but the Path variable has other things along with it, which don't appear to be relevant to the Falcon at all. Is that alright?

 

Then I saw in the instructions how to set it up in a Visual Studio 6 or 2003 program. Unfortunately, these instructions are very outdated, because I'm using Visual Studio 2012 Express. How would I set it up to use the necessary DLLs or any other files in that version? I'm just trying to get to the point where I can write code and test it, and then I can take it from there, thanks.
 

 

THEM:

 

 

Good on setting up up the environment variable ... that is set
correctly during the installation of the Novint (HDAL) SDK. The
NOVINT_DEVICE_SUPPORT environment variable tells the operating system
and applications using the Falcon where to find the DLLs, initialization
files, and in your case the Novint Falcon SDK library file locations for
the program you want . Our SDK contains all the documentation and
software development support files needed to develop applications using
the Novint Falcon haptic interface device up to and including the Haptic
Device Abstraction Layer (HDAL) level. Although you are using a more up
to date Visual Studio version, the general steps described in the
HDAL_ProgrammersGuide.pdf are the same.

 

 

ME:

 

 

I'm sorry for being contradictory, but I don't see how the steps can be the same, because I compared the instructions of section 4.1 of the HDAL_ProgrammersGuide.pdf to the options that are available to me in Visual Studio 2012, and found many extreme differences between them:
 

(Please bare with me, as I'm on a different computer now and writing this based on notes that I took while experimenting to try to get it to work, so I don't have any screenshots available.)

First of all, the images in the PDF of the Tools->Options window look completely different that what I saw in VS 2012. The instructions describing what to do, corresponding to that interface, couldn't be applied to the interface that I have to use.

In 4.1.1, it says to click the "show directories for:" dropdown box, and to set values for the "include files" and "library files" and to click a "browse" button at some point, none of which were present in the interface I was using. I can't find any wan to complete this step.

In 4.1.2, it says to choose the Project->Settings menu option. I don't even have that option at all. There is a Project->Properties option though (or Project->X Properties, where X is the name of the project). I looked in that and found similar information that was worded differently and set up completely differently than the screenshots in the PDF, but I think I might have figured this part out, but would like confirmation as to whether I'm actually on the right track, because I could just as easily be wrong. Here's what I did:
In Project->Properties, I chose "All Configurations" from the "Configuration" dropdown list, then in the tree view I selected Configuration Properties->VC++ Directories, and it displayed a lot of properties relevant to that on the right side. In the "Include Directories" box, I appended "$(NOVINT_DEVICE_SUPPORT)\include", and in the "Include Libraries" box I appended "$(NOVINT_DEVICE_SUPPORT)\lib". This seems to be a reasonable thing to do but I have no proof that it's correct, and it still doesn't solve 4.1.1, only 4.1.2, and only assuming it's correct.

4.1.3 says to type "hdl.lib" into the "object/library modules" textbox, but that doesn't appear anywhere, so I don't know where to put this at all. I'm guessing without this, the whole thing falls apart.
 

I don't mean to complain, but quite frankly, I wish there was a newer version of the PDF. Visual Studio 2003 is 11 years old now, and Visual Studio 6 was outdated even when the Falcon was first produced. By now, version 6 is practically ancient.

 

 

THEM:

 

 

We are sorry you are still having issues, but the use of our lower-level
type SDK requires comfort in using the visual studio environment and the
c++ language. We would be happy to offer you a refund if you have
purchased your Falcon in the last 45 days (normal money back guarantee
time is 30 days). Please let us know if wish to return your Falcon so
we can issue you a return authorization number and provide you with the
necessary information.

 

 

ME:

 

 

Excuse me, but I don't see how that's relevant. I am quite comfortable with Visual Studio and C++, and have been using it for about 15 years. The problem is not in my lack of understanding, but rather in the lack of accuracy and compatibility in the instructions. I would just like instructions that are compatible with Visual Studio 2012 please.

 

 

THEM:

 

 

We seem to have reached an impasse. There is nothing special about
using our SDK ... it is a library package. Your project just needs to
know where the SDK related .h and .lib files are. The actual files
required for a project (i.e., hdl.h, hdl.lib, etc.) can be found in
the/C:\Program Files (x86)\Novint\HDAL_SDK_2.1.3\include/ and/C:\Program
Files (x86)\Novint\HDAL_SDK_2.1.3\lib /folders and sub folders of the
SDK package. The NOVINT_DEVICE_SUPPORT environment variable needs to
point to C:\Program Files (x86)\Novint\HDAL_SDK_2.1.3 so that SDK
related DLLs and device bin files can be found by the system when
running SDK developed applications.
 

0

Share this post


Link to post
Share on other sites

It's not their job to teach you that - that is like buying a book from a store and then complaining to them that you are unable to read.

 

 

I understand your point but I think it might be a bit of an overstatement.  It seems API specific to me (see note below).  Besides, if they're going to provide instructions for how to do something, they should at least work.  Also, I don't understand why Microsoft needs to drastically alter the IDE every 5 minutes (it's not even consistent between different projects, which I mentioned before but no one else acknowledges), and do you know anybody who still uses VS 2003, or worse yet, 6.0?!  Falcons aren't even that old, so it's just stupid for it to be that outdated.

 

 

When a developer installs a library, they will usually immediately look for the headers, import libraries and DLLs and work with them as they work with any other library.

 

 

Well it seems to me that whenever there are instructions for how to do this, they're always very specific to the API.  There doesn't seem to be any generic way, or else there are 50 million generic ways - so everyone does it differently - and I can never get any of them to work at all!

 

 

If you have specific problems (not the 'it does not work' we get so far) then we are probably happy to help, although I would say practically all of your problems can be solved quicker by simply googling.

 

 

I was trying to give you specific information (and a lot of the stuff I put in the e-mail conversation I reposted is very specific, but it requires the PDF to understand the context), but like I said, I can't get the info from my computer and I'm not even at home.

 

Also, I tried searching for answers (search criteria: how to link a dll in visual studio 2012), and as usually happens whenever I try to run a search, I get nothing that solves my problem.  One result page is just someone who posted a question about getting DLL files into his 2012 project directly, which is part of my problem (but doesn't address path setting), but people just say to copy a glew32.dll and a bunch of stuff that I don't think is relevant.  Another page is on msdn, and links to a bunch of other related pages, like a tutorial, but I can't find where it says how to actually do it, let alone provide any screenshots.  It does however have a page about creating a new DLL so I'll check that out, but I'm not sure it will fix my problem in the long run but it's worth a shot.  The rest of the results degrade into increasingly irrelevant garbage.

 

 

I swear I couldn't get deeper into DLL Hell! (I know that's not quite the way the phrase is usually used, but I find it more fitting).

0

Share this post


Link to post
Share on other sites
Despite your claims you don't ever provide any specific information.

 

 

I really appreciate all your help.  Honestly I do.  And I don't mean this to sound snide, but by now I don't know any other way to say it and get the point across:

A) For the 15th time, I can't give you much specific information at this moment because I'm not at home and so I don't HAVE it available, except from memory, and trust me, that's very unreliable.

B) There IS a fair amount of information in the e-mail correspondence.  I stated the exact windows I opened and what I clicked and what I typed where.

 

So I don't understand why you keep telling me to provide info.  I'll try to go through the process this weekend and put some better notes together.  I didn't realize I'd need them anyway, because I was expecting that someone might give me a step-by-step explanation.  If it's not that hard, as you say, then it shouldn't be hard to do that, I would think.  Again, I apologize if I sound mean.  I'm really not, and it's not "self-pity" either, but I'm just very, incredibly frustrated.

 

 

You shouldn't be trying to link DLLs to your project. You link lib files - files with the extension .lib. DLLs will get loaded at execution time, as needed by the routines you link in the lib files.

 

 

Honestly, I don't remember.  I may have tried libs.  I probably tried both actually.  I've been at it a long time, but unfortunately I don't typically get any time to mess with it any time but Saturday, so it's kind of an ongoing, occasional struggle.

 

 

The header files provide the prototype function calls. You generally specify inclusion of header files in two ways:

 

 

At one point, either with the Hydra or Falcon API, I just put all the .h and .lib files from the SDK into my project folder and did "add existing files" to all of them.  The headers try to include each other to an extent, and when I tried to compile I got a ton of miscellaneous errors, but some of which were that the headers trying to be included couldn't be found.  I even tried both the "" and the <> notation, and then I also made sure it listed any subdirectories they were in as they appeared in the project.  I never could get the errors to go away, which is weird, since if I create a .h file I never have any trouble using it.

 

 

At least both of you have now given me a relevant list of steps, but unfortunately, they say what to do, but not how to do it (i.e. what menu or button to click, which text box to type what into, etc.) so it's hard to actually follow it.  As I said, with the Falcon, I think I might have figured out part of it, but it still doesn't work as I would expect it to, so obviously something must still be wrong, and there's no way for me to be sure that any of it is actually right at all.  For details see the e-mail correspondence I posted earlier.

 

 

I don't see why it doesn't just let me choose from a menu "Import->Lib/DLL/whatever", then in a popup window, browse and choose what I want, click OK, and then just call functions in my code.  Wouldn't that be great?  I swear it seems like in earlier versions it used to be that easy!

0

Share this post


Link to post
Share on other sites


(i.e. what menu or button to click, which text box to type what into, etc.)

 

What menu can't you find? In which menu was it unclear which text box to type in? The more specific your question, the better others will be able to help you.

 

I googled for several things, such as "visual studio 2012 click project properties," etc. Some of the hits were quite detailed. You might try googling for similar things to answer your questions, as you seem to be dissatisfied with the help you're getting here. Seriously, a gamedev "General Programming" topic is not the place for a step-by-step tutorial on setting up a Visual Studio project. There are a lot of such resources on the web, with more detail and examples than can be provided in a single topic.

1

Share this post


Link to post
Share on other sites

A) For the 15th time, I can't give you much specific information at this moment because I'm not at home and so I don't HAVE it available, except from memory, and trust me, that's very unreliable.

I'm well aware of that fact. You mentioned it several times. Still, you post pages of text without content instead of doing the reasonable thing: saying "I will post the information asked for after the next time I got home, pasting the actual errors and as much information I can gather into a file on [my USB stick equivalent] and will then paste more detailed information when I then regain Internet access on [some time].
That said, considering what you already are having problems with, doing anything in this area without some kind of Internet access will be an uphill struggle. Extremely uphill. You wouldn't even need much Internet, even a phone with a very limited datarate will do. Mostly just enough to Google a bit and having a way to post in forums like this while you work.
 

B) There IS a fair amount of information in the e-mail correspondence.  I stated the exact windows I opened and what I clicked and what I typed where.

I read it, some bits several times and I see absolutely no hints to give more specific advice.
2

Share this post


Link to post
Share on other sites
What menu can't you find? In which menu was it unclear which text box to type in?

 

 

It's not really that I'm looking for specific known windows or text boxes and can't find them.  It's more like there are specific ones in earlier versions, which are absent from the newer versions of VS, because the interface is totally different, and so I don't expect to find them exactly, but I'm just trying to figure out what is their equivalent (i.e. if you do it this way in VS6, you should do it that way in VS 2012 instead, to have the same effect).

 

 

Seriously, a gamedev "General Programming" topic is not the place for a step-by-step tutorial on setting up a Visual Studio project.

 

 

Really?  It seems pretty "General Programming" to me.  Where should I have put it, OpenGL?  Maybe Artificial Intelligence?  Sorry to sound snotty, but come on, I need advice on a fairly general issue so that's where I put it.  I see they moved it to "For Beginners" despite my constant protests that I'm not a beginner.  Fine I give up - I'm a beginner with 22 years of programming experience.  Happy now? :-P

 

 

I'm well aware of that fact. You mentioned it several times. Still, you post pages of text...

 

 

OK, this just seems like a miscommunication.  I was repeating myself because I thought you didn't understand what I was saying, and you were repeating yourself because you thought I didn't understand what you were saying, but we understood each other all along.  Do you understand that?  Because I'm not sure that I do, LOL.

 

 

That said, considering what you already are having problems with, doing anything in this area without some kind of Internet access will be an uphill struggle. Extremely uphill. You wouldn't even need much Internet, even a phone with a very limited datarate will do. Mostly just enough to Google a bit and having a way to post in forums like this while you work.

 

 

Well it's already uphill anyway, but please understand, it's not that I couldn't have Internet access if I wanted it, but for the purpose of security and privacy, my development computer absolutely CANNOT under ANY circumstances be connected to a network.  Not to be too anal about the point I'm making, but if I want to use a search engine, I'll use DuckDuckGo, not Google, for the same reason as stated above.

 

 

frob:  Either you didn't understand what I meant or I'm severely misinterpreting your advice.  I'm not trying to peak into the contents or inner workings of libs and DLLs (although that's not a bad idea!); I'm only trying to get them into my VS 2012 project so that I can call their functions.

0

Share this post


Link to post
Share on other sites

...

  I see they moved it to "For Beginners" despite my constant protests that I'm not a beginner.  Fine I give up - I'm a beginner with 22 years of programming experience.  Happy now? :-P


If you are this long time having experience I still wonder, for as long as I follow this thread, why you unable to give some hint what is not working?
I would expect that you do know all that things that are going around if compiling some software, and it is on all systems the same way. Sometimes they use different names for the same thing, but in the end it is always the same.

I would expect that you can give clear statements about what the compiler or linker output, even if you cannot access the development system.
0

Share this post


Link to post
Share on other sites


I'm not trying to peak into the contents or inner workings of libs and DLLs (although that's not a bad idea!); I'm only trying to get them into my VS 2012 project so that I can call their functions.

 

That is already covered.  Add a reference to the DLL. Add the necessary marshalling code for the functions you want.  That is all.

 

You countered that advice with:


And yes, it is THAT difficult, as evidenced by the fact that I've been trying to get it to work for months now and have made very little progress.  Ideally, I'd like to have it working by the end of the year if possible.

That is contrary to my experience, and contrary to the evidence I have seen from dozens of others I have personally watched, and contrary to many stories I have read about online. I have seen many projects that can wrap libraries with dozens or hundreds of functions and can do the work in a matter of days with automated tools like SWIG (linked to above). 

 

The fact that YOU made limited progress is more of a reflection on your ability to use the tools (you are a novice at this) rather than the actual complexity of the task. It is something professional programmers are tasked with routinely, and something most are able to accomplish very quickly.

 

Most programmers think of "make a wrapper library" as a simple task because the tools make it extremely easy.  

 

You mention using those tools as an alternative. I think of using those tools as the entire half-hour process.

0

Share this post


Link to post
Share on other sites
If you are this long time having experience I still wonder, for as long as I follow this thread, why you unable to give some hint what is not working?
I would expect that you do know all that things that are going around if compiling some software, and it is on all systems the same way. Sometimes they use different names for the same thing, but in the end it is always the same.

 

Perhaps they're always the same, as long as you're using DLLs, which I rarely ever do, and haven't since the new version of VS, and the interface is not only different, it's inconsistent, hence part of the problem.

 

 

I would expect that you can give clear statements about what the compiler or linker output, even if you cannot access the development system.

 

 

I could tell you exactly what it says... IF I were on that same computer right now, which I'm not.

 

 

That is already covered.  Add a reference to the DLL. Add the necessary marshalling code for the functions you want.  That is all.

 

 

Yes, this is what I'm trying to do, and it's not working for some reason.  But as for marshaling, I'm a little rusty on the terminology, so I looked it up on Wikipedia.  It seems like something you'd do in Corba or something like that, where it needs to use weird reflection of its functions to translate parameter lists into objects describing the parameter lists or some goofy stuff like that, but I'm not sure why I would do it for this.  It seems like an over-complication to me.  Those kinds of things should be done automatically by the compiler anyway.

 

 

It is something professional programmers are tasked with routinely, and something most are able to accomplish very quickly.

 

 

I AM a professional programmer, and throughout the years I've worked at numerous companies, not one of which ever expected me to import a DLL for anything at all (and no, no one at work knows how to do it either).

 

 

You mention using those tools as an alternative. I think of using those tools as the entire half-hour process.

 

 

Well I wasn't aware of these tools until yesterday, but I intend to try out these supposedly excellent tools this weekend when I have time to do it.  Then I'll see whether they live up to their reputation.

 

 

That is contrary to my experience, and contrary to the evidence I have seen from dozens of others I have personally watched, and contrary to many stories I have read about online.

 

 

Well I'm sorry to be so contrary, but I have a specific skill.  I'm extremely good at exactly one thing: programming.  Code code code code code!  And any math or logic necessary to implement it.  I can write any algorithm for compression, cryptography, artificial intelligence, distributed algorithms, compiler/interpreter creation, complicated and realistic physical and graphical calculations, but this nonsense?  No way!  What it comes down to is that they make the interface so bloated with so many different options, and never say what any of them mean or how to use them at all!  Then they change it all every version and I get conflicting information from every possible source or programming guide included with the APIs.  Why don't they even teach any of this stuff in school?  You'd think it would be one of the main topics covered, but nope; not once did we use any DLLs or COM or external files of any kind, nor ever at work for that matter!

0

Share this post


Link to post
Share on other sites


... Perhaps they're always the same, as long as you're using DLLs, which I rarely ever do ....

This is something I realy dont believe,  which may depend on your somehow irritating posts. As stated already. You never link DLLs to your application. For technical reasons it cannot be done. You always link the import library.

 

And the other thing is. On Windows nearly all applications, with only a view exceptions, use DLLs because the application would explode in size if you dont do that.

 

One of the exceptions I think at first are drivers, virus-scanners and such thinks that do not have access to the DLL stuff. And if none in your big company has ever used DLLs it makes me really really wonder.

 

But OK. Let us wait until you have speciifc information about what went wrong.

0

Share this post


Link to post
Share on other sites

Not sure how you could implement [insert any item on your I-can-write] list without having to add a list of exported symbols to a project, so you can use a dll.

And data marshalling and compression go hand in hand?

 

Anyways, some search results:

http://msdn.microsoft.com/en-us/library/kkt2hd12.aspx

http://stackoverflow.com/questions/19384157/importing-a-lib-file-using-visual-studio

 

I don't see how else to help, since you don't provide any errors or explanation or libraries you want to use. If you at least gave a link to these libraries, someone could read the manual for you.. and translate what it says into simple steps.

0

Share this post


Link to post
Share on other sites
This is something I realy dont believe,  which may depend on your somehow irritating posts. As stated already. You never link DLLs to your application. For technical reasons it cannot be done. You always link the import library.

 

 

You don't believe that I rarely use DLLs? Why not?  There are plenty of things one can do without DLLs.  I didn't say I was linking directly to DLLs, I just said using DLLs.  That's what this whole discussion is about.

 

 

And if none in your big company has ever used DLLs it makes me really really wonder.

 

 

 Who said it was a big company?  There are only 3 programmers, myself included.

 

 

As this is game development, you have probably already seen how the graphics libraries for DirectX and OpenGL require your data to be properly marshalled to the correct data formats and structures.  That is all that is needed for data marshaling.

 

 

You mean just standard old OOP?  Or putting them into structures so they're by value instead of by reference?  Yeah I remember doing that in C++, and C# may do it behind the scenes, but SharpDX, for example, just uses plain objects.

 

 

With your "22 years of programming experience" it is suspicious that you don't know what it is.

 

 

Suspicious?  Really?  Yeah, you caught me.  I've been pretending not to understand this stuff as a way to con everyone into wasting time (including my own) answering questions to which I already know the answers.  (Warning: sarcasm detected in the immediate vicinity).  :-/  Anyway, I've heard of marshaling, but it's been a while and I just forgot what the term meant, because I never really had experience with it anyway, and it's not something I hear about every day.

 

 

That is very career limiting. No wonder you feel people treat you like a beginner, those are the bare minimum skills all programmers must have. Somebody says "Here is the algorithm written in English, translate it from my implementation to some other language."  Those are code grunts, also called "coding to spec". You can make a living from it but it doesn't offer much as a long-term career.

 

 

Firstly:  Perhaps I spoke ambiguously.  I didn't mean that I take prewritten pseudo-code with mathematical algorithms and translate it into code.  I meant that I can invent new algorithms for complex applications of computer science, and what's more, create enormous and intricate applications of all varieties.

 

Secondly:  Do you make a habit of insulting people's careers?

 

Thirdly:  That's not exactly what I do professionally anyway.  I do those things as a hobby.  Professionally, I usually make websites and databases with things like ASP.NET and SQL Server, which I don't think is career limiting - it's what most programmers do (it's very marketable - almost all companies have a website, and need to store their data in a database).

 

 

Not sure how you could implement [insert any item on your I-can-write] list without having to add a list of exported symbols to a project, so you can use a dll.

And data marshalling and compression go hand in hand?

 

 

I didn't say marshaling and compression went hand in hand.  But most of that stuff doesn't require any DLLs at all.  Compression, for example, tends to involve reading a file, screwing around with the bits in memory, then writing a new file.  Same thing with cryptography, for that matter.  When do the DLLs get used?

 

Anyway, thanks for the links though.  You want the libraries?

 

https://backup.filesanywhere.com/fs/v.aspx?v=8c6f6a8b596370779d9f

The Hydra one you have to get from Steam.

The Oculus Rift one you need from their website (you must log in to download it).

But they're all free.

0

Share this post


Link to post
Share on other sites

biggrin.png biggrin.png biggrin.png I got it to work! laugh.png laugh.png laugh.png   The Falcon one anyway.  So many paths and files and things were mis-referenced, more stuff had to be imported, paths had to be changed, bugs had to be fixed, etc.  And it's still a little glitchy, but I think that's only because I need to have a closer look at how I'm using the API.  But regardless, it compiles and runs!  I'll try the Hydra API next, and probably try a lot of the same stuff I did with the Falcon one to get it to work, but first I want to mess with the Falcon a bit more.  Yay! happy.png wink.png

2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0