Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Forum Support

    3. Suggestions

SDL_image linker errors


the_darkside_986
 Share

Recommended Posts

the_darkside_986

I am trying to compile a tutorial but I keep getting this from g++:

 

g++ main.o -o gametut -lSDL -lSDL_image/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libSDL_image.a(IMG_gif.o)(.text+0xcfe): In function `IMG_LoadGIF_RW':: undefined reference to `__sprintf_chk'/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libSDL_image.a(IMG_xcf.o)(.text+0xa36): In function `do_layer_surface':: undefined reference to `__fprintf_chk'collect2: ld returned 1 exit statusmake: *** [gametut] Error 1

 

I made sure I had all the right SDL rpms from rpm.pbone.net for Redhat 9. It's not the newest SDL version (1.2.5 instead of 1.2.10) but I can't get the newer version because of glibc being too old. And I can't get a better linux distro because they all can't boot from floppy, but from CD or DVD, which I can't do.

 

The link to the tutorials is http://lazyfooproductions.com/SDL_tutorials/index.php

I tried building the SDL_image library from a source code .tar.gz but even the configure script wants me to have the newest version of SDL.

Link to comment
Share on other sites

Looks like you might be missing an object or a library. Is main.o the only object you compile from source?

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

the_darkside_986

yeah I'm just tryin to compile main. I have no earthly idea where to find those functions really. I'm thinking about getting a new but cheap PC that will be able to boot from CD/DVD so I can get a better distro. I am thinkin about trying Ubuntu or something. My PC is way outdated.

Link to comment
Share on other sites

Ubuntu can boot from a floppy and I've heard it can run quite well in some oudated machines. (There are distros that would run way better of course)

Link to comment
Share on other sites

If you can figure out what these functions are meant to do, you can simply replace them with your own functions that do the same thing. Their name suggests that they behave similarly to sprintf and fprintf, so it shouldn't be difficult to replace them.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

the_darkside_986

I'm not sure I got enough C++ skill to write a new printf but I guess I should try to search for rpms or tar.gz's that have the library for those missing functions.

 

Not only is booting from floppy an issue with new distro, but the specs of my PC being too slow to run gnome very efficiently or run many programs at once. My motherboard only supports up to 256 MB of RAM so I think it's time for an upgrade. I have to restart X11 everytime I want to close Limewire.

 

Edit: I typed those function names into google and I think it has something to do with my version of Glibc and my version of SDL.

 

Another Edit: Thanks for all the replies but I finally fixed it. It turns out that I had the wrong SDL_image-devel rpm installed. I was trying to follow along too closely with the tutorial's suggestions of downloading the SDL_image rpms instead of using the ones that are appropriate for RH9. It was a very noobish mistake but rpms are extremely difficult like that, especially when they involve GLIBC. I still want a new PC though.

Edited by the_darkside_986
Link to comment
Share on other sites

I'm not sure I got enough C++ skill to write a new printf but I guess I should try to search for rpms or tar.gz's that have the library for those missing functions.

The odds are, these are just utility functions that use fprintf and sprintf functions to write certain data structure to file/buffer in one call. If you know the structure that it writes*, you can write the block of fprintf/sprintf calls that does the same thing.

 

* You can establish which structure is being written by examining the prototypes of the missing functions, and then finding the structure in the headers. Both the prototypes and structure definitions have to be somewhere among the headers included from main.cpp.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

SDL does not require X11. If your computer is so slow, you might want to try DirectFB (Direct Flame Buffer), which is an alternative to X11. If you are not confortable with that, you might want to try Fluxbox or Xfce, these X window managers does not require much resources and can run smooth on your old computer.

 

You can also try to get the hdd out of your computer, and install Linux on it from another machine, and then move the hdd back into your old computer. That way you might be able to get newer distros. But!!! Distros that relies heavily on hardware detection may not work probably. Althoug, you might as well take the change, don't expect any problems with the original computer (the computer you use it to install it on), just insert the "correct hdd" it was using before, and everything should be alright.

 

Also, you might want to try Slackware if you choose above method. It does not come with GNOME, but the dropline-installer (dropline GNOME is a special version of GNOME for Slackware) is ultra simple. But then again, Slackware lets you choose KDE, Xfce, Fluxbox among a few others.

 

Slackware comes with all the SDL libaries out of the box, including everything you need to programming. Ubuntu does not. In fact, Ubuntu did not install make and gcc on default install! wow.gif

 

But I am not very familar with Red Hat, after it killed itself, I haven't used it.

Link to comment
Share on other sites

I'm running Damn Small Linux on a x486 DX2 @ 66MHz and 16MB RAM. XWindow manager it uses (KDE?) runs very slow, to the point of being nearly unusable, but I'm sure that whatever the_darkside_986 has, it is a little better than 66MHz.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

I'm running Damn Small Linux on a x486 DX2 @ 66MHz and 16MB RAM. XWindow manager it uses (KDE?) runs very slow, to the point of being nearly unusable, but I'm sure that whatever the_darkside_986 has, it is a little better than 66MHz.

DSL runs on Fluxbox, KDE or GNOME are way too large for it. It surprises me it also contains Firefox, when it has Dillo.

 

Nonetheless, your computer, K^2 is a bit expectional slow. I'd advice you to learn the terminal instead of using X. You will discover that even though it might not be graphical, that the mouse still works. (if it has such a thing)

Link to comment
Share on other sites

To DSL's favour, I ran it @ 120Mhz and 32MB RAM and it did extremly well.

 

But, don't you think it's better to try to find some kind of work around for your problem rather than getting a whole new PC? You could follow K^2's advice or maybe try not to use those functions?

Link to comment
Share on other sites

DSL runs on Fluxbox, KDE or GNOME are way too large for it. It surprises me it also contains Firefox, when it has Dillo.

Ah. Thanks for the correction.

 

Nonetheless, your computer, K^2 is a bit expectional slow.  I'd advice you to learn the terminal instead of using X.  You will discover that even though it might not be graphical, that the mouse still works.  (if it has such a thing)

The first thing I did was to stop X from running on login. Primaraly, I access it through SSH. It's primary function is a dedicated HTTP server, so I don't even have a monitor connected to it, except for when I need to boot it. I should write a script to automatically configure the networking on startup, so that I don't have to do that either, but I've been lazy.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

the_darkside_986

Thanks everyone for quick replies, but I got a new PC today. It has a 3.2 GHz Intel Celeron D processor and 512 MB of RAM and a ATI Radeon graphics card that has 256 MB (I can't remember the exact model of it). I got that system for only $348 USD plus tax and it even runs Black and White 2 (at a somewhat playable framerate). I'm gonna add a Gig of RAM and a DVD burner later.

 

I'm gonna try to resize the pre-installed Windows partition without messing it up like I did on my old computer sad.gif . I'm not sure how to do that, or how to use the free non-destructive trial-version partition resizer thing that Norton or some company makes. I need to resize it so I can install Linux. I've also looked at the open suse website. Does anyone know if that distro is good?

 

I read that suse comes with a bunch of gui interfaces for various things. I need a good linux distro that will be able to play music and videos as well as programming, especially game programming (like with SDL, for example).

 

Another question, slightly off-topic: would my new compaq presario (I don't care too much for HP/Compaq but it was a good deal) be able to run the PC version of GTA:SanAn. Is it somehow possible to hack the second edition to mod stuff? I have the version of it on PS2 but I've always wanted to mod GTA games on the PC. I realize that the 2nd edition does not support text-based modding like the first, but I was hoping that hackers might have found a way around it.

 

 

Link to comment
Share on other sites

It will have no problem running SA. I'm running it on a machine with a slower CPU and most likely worse graphics card with no problems.

 

I've heard something about Ubuntu having a partition resizer in installer. You might also be able to find something free and operational on-line. It might be easier, though, to just format the drive and partition it from scratch. You'd have to install the OS, etc, but I can't imagine it being too much work if you just got the system.

Edited by K^2

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

Well, you can always ask linuxquestions.org, unlike here, they will gladely help with questions that have been answered before. Or at least link you to a topic where help can be found.

 

Also, you may also get some problems dual booting between a GNU/Linux distro and Microsoft Windows. It will actually only be Windows troubling you. I tried it once, Linux ran fine, Windows wouldn't start up. After that, I have never dual booted again.

 

Anyways, you might want to search for "dual boot Linux Windows" on Google, you may also want to add "HOWTO" to your search. But check out linuxquestions.org also. smile.gif

Link to comment
Share on other sites

I have installed Red Hat 8 twice on a machine with XP Pro on the first primary partition, and had no troubles doing so. It seems to work best if during Windows installation you scrap all existing partitions, then create a partition for Windows and leave the space you want to use with Linux unpartitioned. Once Windows is in place and operational, start installing Linux. Partition the remaining space the way Linux likes it, and let Linux installer put in a boot selector for you.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.