Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-26-2004, 06:07 PM   #1
LQ Newbie
Registered: Sep 2004
Location: Poland
Distribution: mandrake/slackware
Posts: 2

Rep: Reputation: 0
SDL compiling problem

I'm trying to compile a simple program using SDL. The problem is that after executing a command:
g++ -o my__program my_program.cpp -lSDL

i receive error messages saying that there are unresolved references in The functions that are 'lacking' are standard functions like pthread_create or sth like sem_init etc.

Any suggestions, please...?
thx in advance

ps. i'm using vectorlinux SOHO 4.0 with SDL 1.2.5 installed as a part of the system
Old 10-26-2004, 06:17 PM   #2
Senior Member
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
The correct way to compile an SDL application is:
g++ `sdl-config --cflags` my_program.cpp -o my_program `sdl-config --libs`
Old 10-27-2004, 12:15 PM   #3
LQ Newbie
Registered: Sep 2004
Location: Poland
Distribution: mandrake/slackware
Posts: 2

Original Poster
Rep: Reputation: 0
seems to be working, thanks
i was misled by a fact, that it worked on my previous installation of vl with sdl installed by hand, the way i've described in my previous post


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem compiling SDL-Programm Cornholio Programming 2 03-07-2005 11:57 AM
SDL error while compiling software icehenge Linux - Software 1 09-28-2004 05:06 PM
Help Compiling SDL(Simple DirectMedia Layer) Mr.Ampersand() Programming 26 07-24-2004 06:15 AM
SDL Compiling Help slackwarefan Linux - Software 1 02-18-2004 05:41 PM
SDL Error While Compiling... Chryzmo Linux - Newbie 1 09-01-2003 01:20 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration