LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


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

Rep: Reputation: 0
SDL compiling problem


Hi!
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 libsdl.so. The functions that are 'lacking' are standard functions like pthread_create or sth like sem_init etc.

Any suggestions, please...?
thx in advance
kubaj

ps. i'm using vectorlinux SOHO 4.0 with SDL 1.2.5 installed as a part of the system
 
Old 10-26-2004, 05:17 PM   #2
itsme86
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, 11:15 AM   #3
kubaj
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
 
  


Reply



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 10:57 AM
SDL error while compiling software icehenge Linux - Software 1 09-28-2004 04:06 PM
Help Compiling SDL(Simple DirectMedia Layer) Mr.Ampersand() Programming 26 07-24-2004 05:15 AM
SDL Compiling Help slackwarefan Linux - Software 1 02-18-2004 04:41 PM
SDL Error While Compiling... Chryzmo Linux - Newbie 1 09-01-2003 12:20 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:33 AM.

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