How to use Eigen library for Arduino within Atmel Studio 7? - c++

I tried to use Eigen library within the Arduino IDE fist. Then I got the error:
fatal error: eigenfolder/Eigen/Dense: No such file or directory
Then I tried to use EigenArduino library. Then I got an error
fatal error cstddef No such file or directory #include cstddef
So I realized that there is probably a lot of standard library that is not linked/implemented into this Arduino IDE. So before getting everythin I decided to move into ATMEL STUDIO 7. My hope was that Atmel Studio gets everything automatically.
But in order to use my previous Arduino Sketches, I also installed Visual Micro that is a Plug-In for Atmel Studio so that you can use everything like in the Arduino IDE.
==> So the problem starts all over again. Same errors in Atmel Studio 7. It seems like I am just using the Atmel Studio 7 Editor now, but the same compiler settings, libraries etc. (Since I am a newbie :-) this is just a guess ).
How can I link all this together? Can somebody please help?

How did you add the library ?
Did you use libraries manager in Arduino IDE ?
Or you downloaded the library separately ?
I found out that using libraries manager solve most compatibility issues.

Related

error while building a Hello World wxwidgets app with visual studio 2019

I'm trying build wxwidgets Hello World sample program in visual studio and i'm using prebuilt wxwidgets instead download that and build it myself.
and after configuring visual studio project for wxwidgets i always facing with this error:
Error C1083 Cannot open include file: '../../../lib/vc142_x64_dll/mswud/wx/setup.h': No such file or directory wxwidgets_programming_cpp C:\wxwidgets\include\msvc\wx\setup.h 140
where is the problem. I think i configured visual studio project in a wrong way. can you help me how to configure visual studio project for a regular wxwidgets app?
You need to define wxMSVC_VERSION_ABI_COMPAT in the preprocessor definitions to use these binaries, which will result in using the correct vc14x prefix instead of vc142 used by default. This is already supposed to be done by wxwidgets.props, at least for the DLL configuration which you seem to use, so I am not sure why it doesn't work for you if you do use this file, but at any rate this symbol must be defined and it isn't in your case.

How can I solve the directory problem of cplex in eclipse?

[enter image description here][1]I'm developing a c++ code on eclipse and i need cplex.
#include "ilcplex/ilocplex.h".
I have made this passages:
- project\properties\C/C++ built\Settings\GCC C++ compiler\Includes:
"C:\Program Files\IBM\ILOG\CPLEX_Studio126\cplex\include"
-project\properties\C/C++ built\Settings\MinGW C++ Linker\libraries:
"C:\Program Files\IBM\ILOG\CPLEX_Studio126\cplex\include\ilcplex"
and the library seems to be ok, since if i use f3 it works.
Despite this, it continues to give me this message:
fatal error: ilcplex/ilocplex.h no such file or directory.
I have tried to follow the instructions of the other similar posts, but nothing changed.
Can you please help me?
Even if you fix the error you are getting now, using CPLEX with gcc on Windows is not something that is supported, and it's likely you'll just run into another error. If you look at the detailed system requirements for CPLEX on Windows, you will see that Visual Studio 2015 or Visual Studio 2017 is required. You should take a look at the c_cpp.html file that gets installed with CPLEX for instructions on how to set up the Visual Studio environment when working with C/C++ projects.

How to include the ncurses.h library in C++ Visual Studio Linux Project when targeting Ubuntu on Windows?

I am trying to create a C++ console based program that will utilize the ncurses.h library. I am using Visual Studio 2017 targeting the WSL subsystem (Ubuntu).
Within ubuntu, running on my WSL, I have installed the ncurses libraries successfully.
I have created a new Project in VS. After unsuccessfully being able to get the #include to work correctly, I followed instructions on Stack to and added 'ncurses' in the Library Dependencies line under Linker / Input in the VS project properties. This enabled the application to compile the first time, and I was able to see in the Console Output that the library file was found and linked. However, VS still gives squiggly lines (errors) under all of the function names associated with the ncurses library. Also, the code does not work as expected, as the terminal appears to freeze. After running the code 2x, it appears now that the code will not build at all and I receive a strange error message that says the "program to debug does not exist on the remote system"
Can anyone please help? I've been using Visual Studio as my IDE with the WSL for school and would like to continue doing so. Future projects will be dependent on the ncurses library.
thank you for your help

lib built in vs c++ 2005 How to use them in vs 2017?

I have the following problem: I have a library, let's call it library.lib that is written in VS C++ 2005. In VS 2017 I've got the following error when compiling:
LINK : fatal error C1047: The object or library file 'library.lib' was created with an older compiler than other objects; rebuild old objects and libraries
Could you help me to solve it? Possibly I have to run VS 2005. However, I cannot install it. I have Windows 10 and the installer does not work.
Pol
is there anybody here, who might help, the project cannot wait?

jvm.dll seems incompatible with Visual Studio 2013

I am dynamically loading (server) jvm.dll into my 64-bit Visual Studio 2013 C++ application using LoadLibrary(), in order to execute native Java code using JNI.
In the VS debugger, I am getting a number of access violations as the dll is being loaded (yet things seem to work if I 'continue' after these); and then a hard crash when some JNI calls are being invoked. I have tried jvm.dll's from Java 1.7 and Java 1.8, with the same issues.
I suspect the issue to be runtime library incompatibility. Dependency walker indicates that even the latest jvm.dll depends on msvcr100.dll (from Visual Studio 2010). I have heard dire warnings of the consequences of using incompatible runtime versions; and have seen the results first hand in other instances.
Has anyone else run into this problem? Is there any version of jvm.dll available that is compiled against Visual Studio 2013?
Thanks,
Dan
Just recently (Feb 2015) I compiled a JNI application which invokes the JVM to run a Java program. I used the most recent JRE version (1.8.0_31) and Visual Studio 2013. I am also loading the jvm.dll at runtime. Take a look at this post if you want to see how I setup my JNI calls.
So it is possible...
Make sure that the JRE containing jvm.dll is built for the same architecture (32bit or 64bit) as your Visual Studio project. If you are using 64bit, you may need to add the x64 as your configuration. To do this go to:
Solution --> Properties --> Configuration Properties
Also make sure your includes/libraries are correct.
For my project, I needed to include the following:
C:\Program Files\Java\jdk1.8.0_31\include
C:\Program Files\Java\jdk1.8.0_25\include\win32
Also, I needed to include jvm.lib which is located at:
C:\Program Files\Java\jdk1.8.0_31\lib
Make sure you also add the jvm.lib to your linker input. Alternatively you can use the preprocessor:
#pragma comment(lib, "jvm.lib")
Hopefully, this should help get your project configured right. If you are still having errors, I would recommend uninstalling Java completely, and re-installing after. Perhaps the same with Visual Studio 2013 as well...