ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
I have started to use kdevelop4 (3.9.91) on my ne slackware64 13 Desktop. I was developing software which uses SDL in earlier version of slackware 12.2. (I don't know which version of kdevelop).
Now I tried use the same code in kdevelop4 and at build time I get an undefined reference for SDL_Init function. It gives no sense because in #include SDL/SDL.h I can see that SDL_Init function is included.
The export of code stands for me in copy the .cpp source of the main function into newly created c++ project in kdevelop4. I get lot more undefined reference messages for 26 SDL functions which I can locate in included header files.
I noticed that the SDL headers library changed a little and now I have lots of header files like SDL_video.h, SDL_config.h, SDL_main.h. There are 36 header files for SDL in the /usr/include/SDL folder. May it be that the old header file SDL.h have included everything in one and I need to Include more header files?
These is the list of existing header files in /usr/include/SDL/:
I'm a new commer in Linux Graphics Programming field. Please may i know how can you get exactly enough 36 headers like that in SDL directory . For my case i always missed the header SDL_image.h .
I have tried to reinstall SDL_image-1.2.3.rpm and later SDL_image-1.2.7.rpm . For 1.2.3 it show no error but the header SDL_image.h still missing. And for 1.2.7-1 there are 2 dependencies failures : Libc.so.6 is missing and RTLD is missing. Can anyone suggest me a solution please.
I sincerely apologize if my post has created any inconvinience. And i hope to hear a reply soon.
I have the new slackware 13 distribution. It uses the package SDL 1.2.13. The main question is what linux distribution you are using? The version 13 of slackware is very new. (released 27.8.) I cannot help you with managing the new version of SDL package into your distribution. The only solution I know - install slack 13.
But as you can see it is possible that there are still some problems with it. Because the code I am using for my graphic application was running with no problem in previous version of slackware (12.2)
Regards
Zoltan
I have the new slackware 13 distribution. It uses the package SDL 1.2.13. The main question is what linux distribution you are using? The version 13 of slackware is very new. (released 27.8.) I cannot help you with managing the new version of SDL package into your distribution. The only solution I know - install slack 13.
But as you can see it is possible that there are still some problems with it. Because the code I am using for my graphic application was running with no problem in previous version of slackware (12.2)
Regards
Zoltan
Hi Zoltan, i used Red Hat Enterprise Linux 4 and i found that there always a librarie missing and header missing there.So any suggestion ? Should i switch to other OS ? Where can i download Slackware 13 ? And also Debian ?
Each distribution uses its own packaging system. If you cannot find the package for your distribution you have to take care about it yourself. (create a package from source or compile the source (usually C++ code) right into your distribution)
Since I have no experience with Red Hat linux I cannot guide you to implement a new version of SDL into it. There can be other dependencies which I do not know about. I can only guide you to use slackware. You can get it here: http://www.slackware.com/getslack/torrents.php
Its a torrent iso - you can choose weather you use CDs or DVD, 32 bit or 64 bit.
But before this you need to know slackware is different and you need to learn the basic install process. (From my point of view its very simple, because I already walk through the install several times) If you decide to setup slackware you have to be prepared to solve possible "difficulties". I can help you with that.
I cannot tell you how difficult would be the other way - implementing the new SDL version into redhat. You have to decide yourself.
If you decide to try slackware - create a thread in linuxdistros > slackware > Newbie slackware user - install.
I will find your post and guide you there. There are lots of helpful guys (and girls) who will be happy to help out a newbie slackware users.
Good luck
It shows how to set up SDL with various systems, including KDevelop.
Thanks its a very good link. My problem will be with the new kdevelop version (kdevelop4 v. 3.9.95).
I have used SDL exactly the way how it is showed on the link above before kdevelop version 3.9.91. I start a new project wizard which gives me the option of the simple SDL program. Probably this step makes everything for me what is needed for SDL library linking.
But now when I am creating a new project in kdevelop4 I cannot choose simple SDL program. It has very few project templates. So all the steps what the old kdevelop done for me in previous versions I need to do on my own. But how??
Quote:
gcc -o sdl_program sdl_program.cpp -lSDL
What does this command do? Compile the source with the SDL librarie or just generates some reference file to SDL libraries?
I would like to done this the way that my kdevelop build the executable directly from the kdevelop application. I was using build from the project menu.
I get this error:
Quote:
project2.cpp:7:24: error: project2.moc: No such file or directory
project2.cpp:22:24: error: QApplication: No such file or directory
project2.cpp: In constructor 'project2:: project2()':
project2.cpp:58: error: 'qApp' was not declared in this scope
project2.cpp: In member function 'void project2::setupActions()':
project2.cpp:84: error: 'qApp' was not declared in this scope
Thanks its a very good link. My problem will be with the new kdevelop version (kdevelop4 v. 3.9.95).
I have used SDL exactly the way how it is showed on the link above before kdevelop version 3.9.91. I start a new project wizard which gives me the option of the simple SDL program. Probably this step makes everything for me what is needed for SDL library linking.
But now when I am creating a new project in kdevelop4 I cannot choose simple SDL program. It has very few project templates. So all the steps what the old kdevelop done for me in previous versions I need to do on my own. But how??
What does this command do? Compile the source with the SDL librarie or just generates some reference file to SDL libraries?
I would like to done this the way that my kdevelop build the executable directly from the kdevelop application. I was using build from the project menu.
I get this error:
I'm afraid I've never used kdevelop so I can't help you with that, but it looks like it's missing a project template (just a guess).
The command
gcc -o sdl_program sdl_program.cpp -lSDL
compiles your program and creates references to the libSDL.so library. If you prefer to have sdl linked in you'd add a -static directive. It would then load the referenced functions from libSDL.a directly into your program.
I'm a new commer in Linux Graphics Programming field. Please may i know how can you get exactly enough 36 headers like that in SDL directory . For my case i always missed the header SDL_image.h .
I have tried to reinstall SDL_image-1.2.3.rpm and later SDL_image-1.2.7.rpm . For 1.2.3 it show no error but the header SDL_image.h still missing. And for 1.2.7-1 there are 2 dependencies failures : Libc.so.6 is missing and RTLD is missing. Can anyone suggest me a solution please.
I sincerely apologize if my post has created any inconvinience. And i hope to hear a reply soon.
Your sincerely
Andrew.
In some cases you'll have to install headers separately from the library. In other words, you'll often have the library installed but the headers to use it won't be there. You'll probably need to locate a version of the package ending in -dev or one that otherwise indicates it's for development.
Kevin Barry
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.