Cannot make valgrind work on OSX mavericks - c

I've done a bit of reading:
There is this github issue that talks about this: https://github.com/mxcl/homebrew/issues/23660
And the bug reported here: https://bugs.kde.org/show_bug.cgi?id=326724
Someone even wrote a patch: http://bugsfiles.kde.org/attachment.cgi?id=83590
Thing is, I am trying to learn C and relatively new to all this, and I haven't figured out a way to make it work on mavericks. People seem to have been able to at least make something work.
Could you give a detailed explanation as to how (either install the patch, or get it working from homebrew maybe, or get the 3.10 version)?

The current svn version of valgrind (revision 14182) compiles and runs out of the box on Mavericks. The developers seem confident enough that they have removed the warning that is printed on startup, too.

Related

IntelliSense Problem in VisualStudio code

i have a problem with Visual Studio Code for Mac OS
Since my small industry where i work, decided one week ago to change from Windows to Apple problems started.
I installed VS code in my Apple laptop but when i started to programming, i saw that if i make a Syntax error, the IDE doesn't highlight it (i write programs in C).
For example if i write: println("hello word") without ; VS doesn't show a red underline and a message (for example "Syntax error missing ;")
i searched on internet, and i found that is a problem of "IntelliSense" i think. I also tried some solutions, but without any result.
thanks for your answers
Setting up VS code for C / C++ on mac is a bit of a pain. I've found this page from MS to give a thorough run through on getting setting up, and then you can also follow this guide which will take you through setting up project configurations and in your case intellisense.

C IDE compiler tutorial (nothing works)

I'm trying to set up an IDE for C programming.
I have tried netbeans, VS, Dev, codeblocks, eclipse and more!
Nothing seems to work, in every case as soon as I try to run/compile I get an error pertaining to the compiler/debugger not being found.
I have downloaded multiple compilers one of which I literally transferred from another computer and still -nothing- works.
I have done much more complicated things involving JAR imports with Jbox in Java and yet for this the solution eludes me.
Does anyone know of a step-by-step tutorial for setting this up?
I'm running windows8 64bit.
Hope the links will be helpful. I found Codeblocks is very simple and light weight compiler for C/C++.
https://www3.ntu.edu.sg/home/ehchua/programming/howto/CodeBlocks_HowTo.html
http://www.wikihow.com/Install-and-Configure-Simple-Directmedia-Layer-%28SDL%29

Is there an IDE that works with CUDA on mac osx lion?

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

Is there an easier way to type and compile C on Mac OS X?

I've just started learning C on Mac OS X. I have downloaded Xcode too.
So far, I have been typing my apps into TextEdit, and then using the Terminal to locate my apps and compile them using gcc hello.c etc.
Is there an easier way (using Xcode perhaps?) to type my code into some form of IDE, and then automate the compiling with a 'compile and run' button or similiar? It seems a bit primitive and tedious using TextEdit and then switching to the Terminal to compile. However, I do not have much experience with lower level languages like C, so I'm unsure if it is even possible.
Thanks
Yes that is what XCode is for.
Look at the tutorial on the open screen of XCode (version 3.2.1 for OSX 10.6) This is for objective C but the tools are the same.
Or if the objective C is confusing choose a new project from XCode. File->New Project) choose command line tool as the project type and then choose type as C from the pop up menu
Xcode will definitely be easier, although for a "hello world"-type project like yours, its advantages may not be obvious. Install it, fire it up, and leave TextEdit behind ...
OTOH, you could edit your source code in vi or emacs (in Terminal), which would avoid having to flip between Terminal and TextEdit. BTW, this is the way development used to be done ...
Use XCode, you already have it. :)

Compiling a C library so it can be used in an iPhone static library

I've never done this before, so I'm not sure where to even start. I have a few projects where I want to use the liblio library, both on the iPhone and OS X. I've put the installation instructions in a gist.
Here are my questions, and I'll try and edit these questions as I figure them out.
Do I want to use make install to compile these files? I feel like all the compilation should be done within XCode.
It looks like there are a lot of platform specific settings during compilation. How do I control this from XCode?
It seems like I should be able to add all the .h/.m files to my XCode project and compile them myself. Is this missing something?
For the record, I'm aware of a few LibLO libraries created for use on the iPhone. I may break down and use one, but I'd prefer to learn how to do this myself.
Yes, if you want to compile these projects from within XCode, you need to add the .c/.h files and then setup them accordingly. XCode has support for passing argument to the compiler of course, so it is indeed possible.
From the gist snippet, it looks like the installation instructions are GNU standard instructions, ie. configure; make; make install. You could try playing with arguments to configure (which, btw, creates the Makefile on the spot) and see what options you have for compiling to a different target platform.
However, it may not be worth all the trouble to convert the Makefile's to a pure XCode project. Another approach, which I think I would start with, is to hack the created Makefile until you are able to compile an iPhone friendly lib-file. After that you can tell XCode to run 'make ...' as part of your projects build steps. Then, once you understand the issues, it may be easier to include them in your XCode project proper.
I have not tried this myself, but Building autoconf-configured libraries for iPhone OS might have some useful information for you.

Resources