Thread: external libraries and distribution

  1. #16
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I see you're using SDL_ttf -- you'll need SDL_ttf.dll as well.

    [edit] And SDL_image.dll too. [/edit]

    [edit=2] And if you're loading JPG images, you'll need other DLLs as well. Here's what I distribute with most of my projects.
    Code:
    jpeg.dll
    libpng12.dll
    libtiff.dll
    SDL.dll
    SDL_image.dll
    SDL_ttf.dll
    zlib1.dll
    If you're loading PNGs, you'll need libpng12.dll and zlib1.dll. I think you only need jpeg.dll for JPEGs. If you want to be safe, distribute all three. They're not really that large.

    If you don't have any of these DLLs, you can download them along with one of my programs, xuni. http://downloads.sourceforge.net/xun...4&big_mirror=0
    The DLLs I mentioned, plus libexpat.dll (for expat, an XML parsing library), are all there.

    Or you could do some work and download the DLLs from libsdl.org yourself. I think mine are reasonably up-to-date, though. [/edit]

    [edit=3] BTW, your program compiles and runs just fine on my Linux system like so:
    Code:
    $ g++ -I /usr/include/SDL SDLfunctions.cpp KeyEvent.cpp -o KeyEvent -lSDL -lSDL_image -lSDL_ttf
    KeyEvent.cpp:30: warning: missing initializer for member ‘SDL_Color::unused’
    KeyEvent.cpp:100: warning: unused parameter ‘argc’
    KeyEvent.cpp:100: warning: unused parameter ‘args’
    $ ./KeyEvent
    $
    What do you know -- it's cross-platform already! [/edit]
    Last edited by dwks; 07-04-2008 at 01:48 PM.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  2. #17
    Registered User Stonehambey's Avatar
    Join Date
    Jan 2008
    Location
    Kent, UK
    Posts
    118
    I included the files you suggested and tried it on another machine and...it worked!

    I still wanna try it on a few other machines in case it was a fluke, but it's definitely a step in the right direction. Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Gamma distribution in C#?
    By dudeomanodude in forum C# Programming
    Replies: 2
    Last Post: 06-07-2008, 01:59 PM