Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 2 months ago.
Missing vs_string.h file
I am trying to build the A_CanAdapter but having some problems with that. I cant seem to find the vs_string.h file. Where would I get that?
Thanks, Louis
Question relating to:
2 Answers
11 years, 2 months ago.
When you import it I already get an error message one library failed to import (never seen that before). Manually importing it should fix that issue: http://mbed.org/users/WiredHome/libraries/VStudioCompat.
Then you get error messages because it is included multiple times, good luck fixing those :P
@Christian, that sounds unrelated
Erik. Well you are right!. importing the vs_sting.h from the location you posted fixes that. I do however now get messages that complain about multiple definitions as you forewarned. That definition duplication it says is for hextoul() in CanAdapter and CanUtilities. Even though there is no definition of it in CanAdapter.. so now I am trying to figure out how to fix that.. I wonder ..Did this code ever run ?? .... :(
posted by 11 Jun 2013I wonder the same. The problem is that it is included in multiple locations, I quickly tried it with #ifdef around it, but that didn't solve it, such C stuff is not really my strong point, maybe someone else can fix it. I also just tried renaming every .c file to .cpp, since in the past .c files were compiles as .cpp, but also no dice there.
posted by 12 Jun 2013There are a couple of small problems, after fixing them it runs fine:
1. The link address for the VStudio library files is wrong, Erik has the right link above.
2. I don't think the mbed online compiler likes having the hextoul function definition in the vs_string.h header file - I moved this to vs_string.c with a function prototype declaration only in the header. You also need to include mbed.h in vs_string.h for the definition of size_t. After this it works - make sure your terminal program is running at the correct speed of 921.6k.
posted by 06 Jul 201311 years, 1 month ago.
Louis, I'm glad you found an answer that works for you. I authored the code, but unfortunately I didn't see this question until now. For many projects, I try to co-develop the code in Visual Studio (faster, offline, better debugger) and so you see the various ifdef for WIN32 scattered about.
Thanks to the others that helped out. I'm still a bit confused though - I had renamed vs_string.h to utilities.h some time back - I'll try to check what is actually published first chance I get (hopefully yet this week).
Hi David,
Do you have any examples of using Visual Studio to develop/debug mbed projects that you'd be prepared to share?
I have several bits of different mbed projects that would benefit from a better debug environment so being able to use VS would probably be a quicker solution than having to take all my code & covert it for IAR (for example)...
Cheers,
Jez
posted by 16 Jul 2013