trinker Posted May 19, 2015 at 02:23 PM Share Posted May 19, 2015 at 02:23 PM Hi Guys, I just got my master brick and a couple of other bricklets today and they work well with the brick daemon and viewer combination. I also could read out values from the temperature bricklet in Python. Problem: I need to integrate the temp sesnsor bricklet with a project in C++. I followed the instructions given on this page. http://www.tinkerforge.com/en/doc/Software/API_Bindings_C.html#api-bindings-c The directory structure etc. is taken care of. I have also added - #include <cstdint> #include <stdint.h> and using namespace std; I am still getting over a hundred instances of these two errors: error C4430: missing type specifier - int assumed. Note: C++ does not support default-interror C2146: syntax error : missing ';' before identifier 'header' I know it has to do with C -> C++ bindings. The question is, has anybody already found a solution to this? Quote Link to comment Share on other sites More sharing options...
borg Posted May 19, 2015 at 02:27 PM Share Posted May 19, 2015 at 02:27 PM As far as i understand it you have to rename the ".c" files to ".cpp" with VS, otherwise VS will interpret them as C89 files. Did you do that? http://www.tinkerforge.com/en/doc/Software/API_Bindings_C.html#visual-studio Quote Link to comment Share on other sites More sharing options...
trinker Posted May 19, 2015 at 03:13 PM Author Share Posted May 19, 2015 at 03:13 PM Yes, I changed the names from c to cpp. Update: I created a blank project in VS2013 and now I get only some linker errors in the ip_connection.obj Any idea how I could solve this? Thank for the reply Quote Link to comment Share on other sites More sharing options...
photron Posted May 19, 2015 at 03:33 PM Share Posted May 19, 2015 at 03:33 PM As also stated in the documentation that borg mentioned, you need to add ws2_32.lib and advapi32.lib as additional dependencies to the Visual Studio project. Quote Link to comment Share on other sites More sharing options...
trinker Posted May 19, 2015 at 04:07 PM Author Share Posted May 19, 2015 at 04:07 PM ;D Thanks for that! I was very sure I had included those - I hadn't! Now it is working! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.