Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8172033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:39:12+00:00 2026-06-06T21:39:12+00:00

This code gives me an error: uses SDL uses SDLGraphics uses SDLImage screen: unowned

  • 0

This code gives me an error:

uses SDL
uses SDLGraphics
uses SDLImage
screen: unowned SDL.Screen
alto: int16=400
ancho:int16 =600
imagen: SDL.Surface
src: SDL.RWops 
init
    SDL.init(SDL.InitFlag.VIDEO)
    screen = SDL.Screen.set_video_mode (ancho, alto, 30, SurfaceFlag.FULLSCREEN | SurfaceFlag.DOUBLEBUF | SurfaceFlag.HWACCEL | SurfaceFlag.HWSURFACE)
    var fin = false
    var y=110
    var x=100
    var radius=10
    var color=1003232242
    var mov_x=1
    var mov_y=3
    src = new SDL.RWops.from_file ("/home/gontzal/Mahaigaina/boy.png", "rb")
    imagen =  SDLImage.load_png (src)
    while fin == false
        event: SDL.Event
        while (Event.poll (out event))== 1
            if event.type ==SDL.EventType.QUIT
                print "adios"
                fin= true
                break
            else if event.type == EventType.KEYDOWN
                fin=true
                break

        if x>ancho do mov_x=-mov_x
        if x<0 do mov_x=-mov_x
        if y>alto do mov_y=-mov_y
        if y<0 do mov_y=-mov_y
        x=x+mov_x
        y=y+mov_y


        Circle.fill_color (screen, x, y, radius, color);
        Circle.outline_color_aa (screen, x, y, radius, color);
        Rectangle.fill_color(screen,0, 0,ancho, alto,1801222)
        screen.flip()

    SDL.quit()

Error:
valac –pkg sdl –pkg sdl-gfx –pkg sdl-image -X -lSDL_gfx “SDL.gs” (in directory: /home/gontzal)
/tmp/ccMPg7h0.o: In function _vala_main':
SDL.vala.c:(.text+0x115): undefined reference to
IMG_LoadPNG_RW’
collect2: ld returned 1 exit status
Compilation failed: 1 error(s), 0 warning(s)
error: cc exited with status 256
Compilation failed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:39:16+00:00Added an answer on June 6, 2026 at 9:39 pm

    You have to manually add the relevant library and cflags. See https://live.gnome.org/Vala/SDLSample#Compile_and_Run for an example.

    The reason for this is that Vala uses pkg-config to try to figure out the correct flags to pass to the C compiler, but at the time the Vala bindings were written SDL didn’t distribute pkg-config files. AFAICT some (but not all) of their modules do now, but the names do not match the Vala bindings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This code gives me this error:Cannot implicitly convert type ArrayList[] to ArrayList[][] at this
This piece of code gives a syntax error at the colon of elif process.loop(i,
I'm trying this code to access a property but it gives me an error:
I have this in my code: SelectList(blah, blah, blah, cu.Customer.CustomerID.ToString()) It gives a error
The following code when compiled give this error I cannot understand why this is
this code gives an instant seg fault,I tried placing printf's all over, I even
This code gives me an empty result. I expect it to print out the
I am not sure why this code (gives stackoverflow at runtime) compiles: import java.io.*;
This code gives me EXC_BAD_ACCESS, why? NSMutableDictionary *d = [[NSMutableDictionary alloc] init]; IMP imp=
This question uses the code for server.c and client.c found here. I want a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.