I need to use gtk on Dev C++ and i have tried installing MSYS2 but there are only guides for other development enviroment like Code blocks.
I have followed this guide https://stackoverflow.com/questions/37737020/install-gtk-for-c-on-windows-10 to the "pacman -S mingw-w64-x86_64-toolchain" point.
What can i do from that point on to be able to use <gtk/gtk.h> libraries on DevC?
If i have taken a completely mistaken direction don't hesitate to tell me.
Thanks in advance
I have seen many people saying there are better ways to do it but i am interested in learning something about graphic interfaces and had a specific request from a professor to do this in C.
Related
This is such a silly question, but i'm a beginner programmer, and I was following along a youtube tutorial on how to make a digital clock in the C language, and before the main() function there was #include<windows.h>. My computer had an error and after looking it up, I found out that is a file specific to windows? I saw some others said there are ways to "replace" the file or something, but i'm not really sure what to do. Anything helps. Thanks for your time.
Windows and macOS have very different interfaces. Apples uses a generic tool for all its platforms, thus there's no exact equivalent for windows.h in macOS. The closest equivalent I could find was Cocoa. (I'm not an Apple developer, I work mostly on Windows and Linux)
Use the official documentation as a starting point for developing apps on a specific or generic Apple platform. As it is a widely used platform, I expect you will find support on most issues you will encounter given your experience level, on the apple forum.
Also I found this nice tutorial that gives a basic introduction on Apple API's.
I wanted to start programming with C, just because it is still important, and you need it for many study paths.
So i used eclipse before for programming java (just basics), and saw that you can use it for c/c++ too by installing other features. But I don't understand how to get it working, i tried several guides, but they were all outdated. I don't know how to link a compiler to eclipse, or whatelse I need.
ps: Sorry if my english may sound a little odd, I'm from germany.
please follow this link you can download
https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/lunar
Umm, I've been using Eclipse for Java development and I am trying to use it now for making C apps.
The problem is that I don't feel too comfortable with it. Namely:
I need to include headers by hand, i.e. not automatically.
I've never seen a 'quickfix' to be available for any problem.
I can't spot the problem before it has been compiled.
Any ideas on how I could make myself feel a bit better?
Sorry if my questions are rather stupid, but getting the way down from Java to C is rather hard on me.
Thanks!
Yeah its a little harder to go from Java to C, Java didn't exist when I was programming C.
Some comments:
Automatically including headers is difficult in C
See #include headers in C/C++
You could use lint to catch some errors...
http://syncor.blogspot.com/2010/03/using-lint-in-eclipse-with-netburner.html
Consider doing TDD using something like gTest, and automate your build process.
http://www.slideshare.net/amritayan/test-driven-development-in-c, might help you develop a different rhythm.
gtest in Eclipse ... https://github.com/ospector/gtest-gbar
Have fun!
On Mac OS XCode is an option.
On startup:
New Application -> Command Line Tool ->Type C
And Bob is your proverbial (aunty).
You get all the XCode short cuts & hit ESC in your editor window for code completion.
Hmmm.... think I'll start using it actually. ;-)
re:
I can't spot the problem before it has
been compiled.
You can get immediate feedback on syntax errors. They show up as question marks in the left gutter and yellow squiggly lines under the error. This happens immediately. Make sure under Window->Preferences-General->Editors->Text Editors->Annotations that you have the "Show in" checkboxes checked for the C/C++ Indexer Markers and C/C++ Occurrences.
What could some of you recommend for using when learning C and programming with C?
I have thought of the following options. (On OSX)
Aquamacs
TextMate and the Terminal
XCode
I want to learn more than just the IDE so that I grasp the concept as I will be learning about compilers etc.
I tried Aquamacs when learning Erlang but it was more of a hassle than I enjoyed.
Is there a lot extra to learn when using an Emacs environment?
What is most beneficial for understanding how things work. ( C )
Are there any other tools or possible options worth looking into?
Thanks
If what you want to learn is C Programming Language in Mac OS X I would go with XCode. It has a very good GDB integration, and its learning curve is smoother that EMACS' or just writing your own Makefiles.
If you want to learn about C, in my opinion, you should use the most basic editor available, compile using the terminal with gcc. And that's it.
Once you'll understand the language, picking one IDE over an other will be a no brainer.
But no IDE will really teach you anything about C.
There's also BBEdit on OSX. (I've used it briefly in the OS8 days.) As far as learning C goes, there are a number of books that you can try. I'd pop down to whatever chain bookstore is closest and browse the Programming section.
I'd also invest in a good algorithm book.
If you want to use Emacs as an IDE, you will need to write Makefile in order to be able to compile from within Emacs. Writing Makefile could help you understand the compiler options, object code, linking and such.
So to use Emacs as IDE for learning C, you should be using C-mode, know about M-x compile and using gdb under Emacs(M-x gdb). To look up man pages for library functions, M-x man and supply it (3 printf, for example to read the man page of C I/O function printf) the section number and function name.
I am not sure if using Emacs+Makefile this way is most beneficial in helping you teach how to compile, link, build etc, but it sure does help in learning those ideas.
If you're not comfortable using a more advanced editor like vim or emacs, then I would suggest using TextMate or something similar. This would let you concentrate on the code you're writing rather than struggling to learn how to use the editor.
Using a full blown IDE like XCode will also allow you to pretty much ignore the build system while you're still learning the language itself. Once you get comfortable with C, learning things like make or cmake would be less overwhelming.
Then after that, maybe you can go back to check out vim or emacs and see what a more complex editor can do for you, if anything.
I have programmed in c and I know about data structures and algorithms, but It has been a while since I programmed in c. I forgot things like how function pointers and some advanced stuff in c work. I want to try graphics programming using sdl. my question is how much of c should I know (for example should I know function pointers) before getting into this. Or in other words will I be stuck if I dont remember a lot?
I think basic knowledge of C should be enough. Look for some SDL tutorials and follow them closely, you will refresh your knowledge of C and at the same time learn how to use SDL. It might go a little slower at first, but you will get into it.
Try for example: SDL Tutorials
Or: GPWiki SDL tutorials
Or: Lazy foo
The first one offers also C tuts. As for functions pointers, you might need them later, when you get to the more advanced stuff. With the basics, you will see everything in tutorial source code and believe me it is easy to understand.
If you like books, try: Focus on SDL
Dont know if there are better ones.
I see PeterK posted lots of good stuff, but I figured I'd throw my two cents in as well. When I started using SDL (3-4 months ago), I had a little experience in Java and no experience in c/c++. Using LazyFoo's tutorials (http://lazyfoo.net/), I was able to get up to speed very easily. I would recommend it to anyone who wants to learn SDL.