How to install/import libraries in Xcode? - c

First time writing C on a Mac. I am using Xcode.
I complied the .c file, and get an error saying gsl/gsl_math.h file not found.
I know in Cygwin, this is already installed, I don't know about Mac.
So, I came here and downloaded the library. http://www.gnu.org/software/gsl/
I am having trouble using terminal to install. What are the commands? Thanks!

Related

'gcc' could not be spawned. Is it installed and on your path?

'gcc' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.
Facing this error in Atom editor while compiling C++ program with gpp extension. And I am using Ubuntu, and this error comes every time I compile C, C++, C#, Ruby, etc.
I have tried to change directory, and path too. But nothing happens. I tried different extension to compile but this same issue I am facing again and again.
I just installed Atom and performed 'Hello World' program of C, just to check that this is working or not but it's not.
I just except to get perfect output of program, well it's just Hello World. But one thing I wanted to say that this same problem i faced recently in Windows. But in Windows I changed 'PATH' then is got solved but I don't know anything about Ubuntu so I don't know what to do.
This means you haven't GCC installed in your distro.
Install GCC from here https://gcc.gnu.org/wiki/InstallingGCC

codeblocks createProcess no such file or directory error

So I am very new to programming in C and i'm trying to install Code::Blocks. I downloaded the mingw setup and everything seemed to install correctly. However, when I try building the hello world program it gives me the error "CreateProcess no such file or directory". I have never worked with codeblocks or c before and quite frankly i have no idea what is going wrong.

C with Eclipse on Ubuntu: why is an .exe and no linux executable created?

I am using Neon.3 Release (4.6.3) Eclipse IDE for C/C++ Developers under Ubuntu 15.5. When I build an run my C-program the program
the program executes without any errors/warnings
delivers the expected output in the eclipse-console
and generates an .exe file in the the debug folder
For me it is very much surprising that an .exe file is generated using an Linux OS (I thought these files can only be created under Windows?). How can I configure Eclipse to generate a typical Linux-executable instead?
Many thanks!
Extensions don't matter much in Linux. You can name an executable something.exe and it won't change how it runs...

Xcode cannot find installed library

I am using Mac OS X 10.8 with Xcode. I have installed the jansson library, with the following commands:
./configure
make
make check
sudo make install
Everything went fine and the library installed correctly. I have created a smple .c file with a text editor and tried to include the <jansson.h> file. I builded everything and it gave no errors, meaning that the library is installed on my system.
Now, Xcode doesn't find the library at all, saying that <jansson.h> is not found. I have tried to restart my Mac, but nothing happens. If anyone knows a possible solution, I will be grateful. Thanks!
I resolved the issue, by going under Build phases, and searching for HEADER_SEARCH_PATH. Then I changed the search path label with /usr/local/include, where the library was installed.

Can not use gtk3 FileChooser on Mac OSX?

I migrated my program built with gtk+3.0 from linux to Mac OS X(10.6.8).
And I compiled the program without errors.
However, after I started the program and I chose to open a file, the terminal shows following message.
GLib-GIO-CRITICAL **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
Then, the program ends with Segmentation fault.
How to solve it?
Thanks for any helps.
Seems you're not the one having this problem, and it also happens on Windows on MinGW. Luckily, that person gave a solution:
The thing, as it seems as I was running the test-widget example (that I
built with gtksourceview-3.0.0 using MSVC), was that I need to compile the
org.gtk.Settings.FileChooser.gschema.xml file (from GTK+-3.x, under
$(srcroot)/gtk) with the glib-compile-schemas utility that is from GLib,
which will generate gschemas.compiled in the same folder.
After that, place that gschemas.compiled file in the this folder:
$(parent_folder_of_the_gtk3_dll)\share\glib-2.0\schemas
and one will be set to use the gtkfilechooser without the puzzling
[GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser'
is not installed] error.
I will add to my GLib project files to compile the glib-compile-schemas
utility and add to my GTK+-3.x project files to compile the
the org.gtk.Settings.FileChooser.gschema.xml shortly.
I ran in to this problem with a program that I crosscompiled with mingw for windows, the solutions is to run glib-compile-schemas [path to org.gtk.Settings.FileChooser.gschema] in my case was that file in ./share/glib-2.0/schemas.It will generate gschemas.compiled, that is the file FileChooser is looking for.

Resources