Problems loading Examples in VS2010 Express

102 views
Skip to first unread message

Jay

unread,
Apr 16, 2013, 6:15:27 PM4/16/13
to libfre...@googlegroups.com

Hello,

Any help I can get with this issue would be greatly appreciated!

I am a newby to VS2010 (not new to programming in VS) and motion sensors, so some of my questions may be obvious, but I don't believe the problems I have encountered are a result of my inexperience.

I loaded the examples and VS2010 express on my computer.  To open the example project on my computer I selected the examples.sln file in the

...HillCrest Labs\libfreespace\Example\libfreespace-examples-0.6\libfreespace-examples-0.6\win\vs2010 folder.  As you can see, the folder is specific to my computer.

VS asks me which application to use to open the project and I selected Visual C++ 2010 Express.

I get two errors when the project tries to load:

First Error:























Second Error:

C:\Parameters\Projects\IntelliSystem\Research\Motion Sensor\HillCrest Labs\libfreespace\Example\libfreespace-examples-0.6\libfreespace\win32\vs2010\libfreespace.vcxproj : error  : Project "C:\Parameters\Projects\IntelliSystem\Research\Motion Sensor\HillCrest Labs\libfreespace\Example\libfreespace-examples-0.6\libfreespace\win32\vs2010\libfreespace.vcxproj" could not be found.

Something I noticed about the second error was that the path did not match the path of my implementation.  This lead me to look into the sln file.  Here is what I found for the libfreespace.vcxproj entry:

Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfreespace", "..\..\..\libfreespace\win32\vs2010\libfreespace.vcxproj", "{B22E9DFB-D4CF-4850-BD2F-9FF56AD78A57}"
EndProject

I could fix that if there actually was a libfreespace.vcxproj in the example files.  I search all of the downloads from hillcrest and could not find that file.

As for the first error, I am stumped on that one.

FYI...  I just purchased a FSM-6 and it is working with Motion Studio :)

Thank you in advance for any assistance you can provide.

Jay



Jay

unread,
Apr 17, 2013, 11:20:07 AM4/17/13
to libfre...@googlegroups.com
Further to my investigation into the first problem I found that Visual Studio Express does not support 'Setup projects' as can be found here.

My question to Hillcrest is what version of visual studio is needed to look at the examples?  I would be disappointed if I need to purchase expensive software to evaluate hillcrest technology.

Thanks again for your time!

Jay

Merrill

unread,
Apr 17, 2013, 2:26:54 PM4/17/13
to libfre...@googlegroups.com
Hi Jay,

Happy to help.  Libfreespace supports Visual Studio 2010 Express so you should be able to use this without any problems.  Here are some tips to get you started.  Also please remember to see the note at the bottom about the workaround for the FSM-6.

VS2010 Express does not support Setup projects, so unfortunately you won't be able to use this specific project.  It is simply an installer for the example files so you are not missing anything important.  You will just have to build the example projects individually.

Regarding the libfreespace.vcxproj error you saw, this is the Libfreespace library project.  You have the option of either building the Libfreespace library from source (the default configuration for the Libfreespace Examples), or simply downloading a prebuilt binary.  I've listed instructions below about how to get things set up with the prebuilt binary.

Follow These Steps
1.  Download the Libfreespace library from the link below:
     b.  Extract the zip file and notice what is inside -- header files and lib files for Libfreespace
2.  Put the Header Files into the proper location:
     a.  The Libfreespace Examples are configured to look in a specific location for the header files and Libfreespace libraries
          -     $(ProjectDir)/../../../libfreespace/include
          -     Note that $(ProjectDir) refers to the directory location of the VS2010 Solution file you are working with
                         (In this case, $(ProjectDir) refers to the directory where examples.sln lives)
     b.  For example, here is how my directories are configured for this:
   
                        C:\libfreespace_work\
                                          libfreespace\
                                                    include\
                                                         freespace\
                                                                [The header files]
                                          libfreespace-examples-06\
                                                     [All of the libfreespace-example files as is from the zip file]
                                  
3.  Put the libfreespace prebuilt libraries in the proper location
      a.  You can put them in the following location:
                 $(ProjectDir)\Release\                (you may have to create the Release directory)
4.  Open examples.sln in VS2010 Express
5.  Change the configuration to Release (dropdown menu in the top part of the VS2010 window that is probably defaulted to Debug)
6.  Right click on a project you want to build and click build
      a.  The build should succeed and the generated exe file should be outputted at $(ProjectDir)\Release
7.  Repeat Step 6 for all the projects you want to build
8.  Run the application files from that directory with your Freespace module connected to your PC


** Important Note About The FSM-6 And the Example Files **


There is an issue with the current libfreespace-examples and their support for the FSM-6.  We use a function called freespace_isNewDevice() to determine which data control message to use.  The problem is that this freespace_isNewDevice() does not recognize the FSM-6 as a new device and the FSM-6 does not support the older messages.  To fix your code:

Remove the conditionals in the example files so that you do not check for freespace_isNewDevice() and instead just send the DataModeControlV2Request message

For example, in motion_example.c, remove the IF statement at line 104 and simply send the DataModeControlV2Request message (do not send the DataModeRequest message).


Let me know if you have any questions about this.

Thanks,
-Merrill
libfreespace moderator

Jay

unread,
Apr 19, 2013, 9:40:11 AM4/19/13
to libfre...@googlegroups.com
Hi Merrill,

Thanks for the response.  It helped... A LOT!  The examples are working and I have been busily working through them to come up to speed.  I am currently trying to figure out hot to 'align the device' so it starts with the proper orientation.

Maybe I will have more questions later.

Thanks again!! 

Jay

On Tuesday, April 16, 2013 6:15:27 PM UTC-4, Jay wrote:
Reply all
Reply to author
Forward
0 new messages