graphics in C for learning [closed] - c

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I want to develop some graphical application in C using gcc compiler on Linux.
Which graphics library shall I use to start with? How can I start developing graphics appication on Linux using C?

If you are talking about straight graphics look at:
SDL
GGI (very simple)
If you are talking GUI, QT would certainly be your best bet.

SDL -- http://www.libsdl.org/
Very straightforward to use, and powerful.

If you want pure C (vs C++), there's SDL: SDL, a standard in C library.
If you like C++, there's also SFML: SFML

Related

Is it possible to write Tower Defense in C/SDL [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have to write Tower Defense game in ANSI C using SDL library, but the deeper I go into LazyFoo's tutorial, the more I got this feeling that's impossible to write it in pure C due to limitations. So my questions is - am I in big trouble or I'm just panicking. It has to be a simple tower defense game, nothing fancy, but is it possible to do it using only C?
C is a Turing-complete language so anything you can do in some other language can be done in C, too. And SDL provides you with a graphics API which is commonly used for (usually small/indie) games.
Of course it might be more pleasant to write it e.g. in C++ or a higher-level language such as C# or Python - but it's possible in C nonetheless.
TL;DR: Yes, it is totally possible.

socket library for MS-DOS (C language) [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to write client and server applications for MS-DOS using C language.
I don't want to start from scratch and implement sockets.
Can you advice me library in which socket functionality is implemented and for which exist good manuals and examples.
I already tried mTCP library: I got source files from it, added sources from example file and tried to Compile in Turbo C, but it raises a lot of errors it will be very hard task for me to cope with them.
Try libnet. According to it's web page (http://libnet.sourceforge.net/) it supports DOS systems (djgpp compiler), though I personally haven't tried it on DOS.
There is also WATTCP: http://www.erickengelke.com/wattcp/
Have you tried that?

What's the deal with glibc? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I know it's a standar c library, but I don't understand why c doesn't have a free library, not one that is lgpl. Is there any such library and if not, than that means every company/particular developer has to buy even the most basic libraries to develop commercial apps ?
every company/particular developer has to buy even the most basic libraries to develop commercial apps ?
Well, they have to buy (or get for free) the compiler anyway, and libc comes with it.
Also, writing an universal C library is impossible, since exit(), setjmp(), etc. depend on the particular compiler and platform.

Creating a GUI on ubuntu for software written in C [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm doing a sniffing project and almost done with it. We are now planning to create a GUI for it. We have written the entire network programming project in C language on Ubuntu 10.10 platform. Any idea/tools with tutorials regarding how to create a GUI for these C programs?
Will the language/tool/platform used for creating the GUI affect the C source code?
Thank you
There are different libraries for creating GUI applications in Linux.
There is GTK+, which is the native widget toolkit for GNOME and which has a C API. There is also Qt which has a very good C++ API, and which is also available for Windows, Mac OS X and other platforms.
I would suggest using GTK+ . It was natively written in C so compatibility shouldn't be an issue. I used this to help me learn it when i was messing around with it.

Best way to multi-thread? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What is the best way to multi-thread in the C language? I want something that is very efficient and not a CPU hog. Thanks.
The correct (standard) way to do this on C and Windows is with __beginthreadex.
This is usually preferred to calling CreateThread directly as CreateThread doesn't init C runtime support for the thread. So if you create a thread using CreateThread, and call a CRT function, bad stuff can/will happen.
Note that __beginthreadex calls CreateThread internally, but performs some other work behind the scenes.
If you're on a UNIX-based platform (Linux or Mac OS X) your best option is POSIX threads. They're the standard cross-platform way to multithread in a POSIX environment. They can also be used in Windows, but there are probably better (more native) solutions for that platform.
Your question is a bit general to answer effectively. You might look into such things as:
CreateThread in the windows SDK
boost::thread

Resources