I want to get a clarification that this plug-in only works for C++ and won't work for C. I tried to run with C code in the src directory and it doesnt return anything unlike the C++ projects.
Anyway for me to run C code for free (Community versions), my cppcheck
The c++ community plugin will by default import any c files found under project dir, the parsing will be done using a compatibility mode (so it might not be complete). Default properties and values for this to work are:
sonar.cxx.cFilesPatterns - .c,.C
sonar.cxx.suffixes.sources - .cxx,.cpp,.cc,.c
sonar.cxx.suffixes.headers - .hxx,.hpp,.hh,.h
See details in documentation wiki
Not sure that you'll get an answer to this question on StackOverflow. I would ask this question by directly creating an issue on the relating github project : https://github.com/wenns/sonar-cxx
Related
I am currently have an issue of binding c library. I am following the introduction from this link to bind C library in Xamarin project: https://www.youtube.com/watch?v=ZUoPLcmnf1o (It is a Xamarin Unversity Turtorial regarding binding c/c++ library, I literally did the same thing except those caused by environment differences ). However, I am stuck at the last step: using functions from the c library in the Xamarin project, it always shows "Native linking failed, undefined symbol *". I have tried to solve it for around 2 days, but did not go any further, may I ask for your help? Thank you very much in advance.
Environment: iOS: macOS High Sierra, xcode: 10.1, SDK: 12.1, IDE: Visual Studio for Mac
Does anyone has followed the same tutorial before and know how to do it? I am totally stuck on this. Any suggestion welcome.
This is an overview of the approach which also refers to this step-by-step guide will give an idea of how to prepare the binding for c/cpp. The is also a video with a quick demo.
I recently read FIRST CLASS ECLIPSE SUPPORT which made me expect a cn1lib-wizard. But there still is none, right?
The gist of the article is that we will update the Eclipse plugin with the NetBeans & IntelliJ versions. With the trend of migrating towards common code across IDE's within our plugin (the new settings UI) this should be much easier and Eclipse should no longer be out of date with the other IDE's.
I'm not sure when we'll get around to do the library template, unlike the other features it requires some work since the Ant implementation on Eclipse is rather different. So it's hard to give a specific date.
I'm sure this is documented somewhere but I'm struggling to find what I'm after. I am developing a project in C (and explicitly not C++), and having had good experiences developing Java projects with JUnit for TDD, I'd like to take a similar approach for this new project.
Can anyone provide a walkthrough for creating and running a simple C project, and running a couple of unit tests on them within Eclipse CDT? I have Eclipse CDT (Luna) and the unit-testing plugin as described in the frequently referenced blog. Most of the guidance appears to be for C++.
FWIW I'm running on Windows 7 and compiling with MinGW GCC.
Have you given google test a try? Its technically a c++ library, but has very little overhead to test your functions. A c++ test project would easily be able to consume the library generated from your c code, so should be pretty easy.
For example, this is what a test would look like
#include "gtest/gtest.h"
#include "MyProject/myFunc.h
TEST (myFuncTest, calculate) {
EXPECT_EQ (18.0, myFunc_calculate (324.0));
}
You can find more details at IBM Developerworks on YouTube etc.
After a lot of research, I tried most of the libraries for C and C++ testing and the one that was the right one for me was the Acutest.
I have created a public repository with an example that also uses Github Actions and a makefile in order to accomplish Continuous Integration (CI) by compiling the code and the tests and running them on every push automaticly.
Repository Link : CPP_Unit_Testing
I apologize if this is a dumb question, but I have 0 experience with this tool and wanted to know if I'm going about using it properly. I've downloaded flex which, upon compiling my lex file, produces a C file which then needs to be compiled separately. Is this the best way to do it?
It's possible to set up a Visual Studio project that uses flex as a custom build step in order to automatically invoke flex and then compile the generated file. I taught a compilers course last summer and we have instructions on how to get flex and a sample project file available on the archived course website. You should look under the announcement labeled "Visual Studio Starter Files for PP1."
Hope this helps!
Using Win flex-bison with visual studio is quite easier and straightforward. You can find it at Win Flex-Bison.
I'm trying to learn Cuda and its very interesting but I'm having problems creating code without a bit of help from an IDE. I know Java/Python but I'm unfamiliar with C/C++ so I have been using eclipse and Xcode to help me with commands and finding things(via code code completion). I can't seem to get these options for CUDA?
I have seen examples and can build them find(nvcc is working) but without the IDE to help catch some of my mistakes I'm a bit lost editing the code in just a text editor. I found a toolkit plugin for eclipse but although it seems to install I think its for a older build of eclipse because most of the options in the instructions do not match my version(Indigo). Nvidia has a plugin for Visual studio only on their site(I'd rather not install windows on my mac to use Cuda).
I'm sorry if this sounds bad but I'm curious to how people are developing cuda on Mac's. I don't care what IDE I use as long as it helps me see the options and warn me if I have syntax issues,etc..(I'm not the best programmer but switching IDE's for me has just been a matter of finding out where things are so I'm really fine with any solution as long as it helps me as I'm learning).
Nsight Eclipse Edition is available as a part of the CUDA Toolkit 5.0 (no additional download required).
Qt Creator!
You can read Qt Creator + CUDA + Linux for inspiration on how to setup the build environment on Mac OS X.
You could think about using JCuda:
http://www.jcuda.de/
There is XCode plug-in for CUDA development. I found it there. There is the main discussion on nvidia.com
Visual Studio Code + this extension:
https://github.com/gangliao/VS-Code-Cuda.
For me, Visual Studio Code is my favorite IDE for every language I found out there