Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

textpad help

Name: Anonymous 2009-01-07 20:13

I had taken a couple college class on programing and had worked with sdl a bit with Microsoft visual studios and used text pad for the most part in the other bits. So I have textpad on my laptop and would like to make a few tools in sdl for my gaming sessions but I can't seem to get it to work I have a development kit for c++ and the downloaded the sdl one but I don't know how to get it to work for textpad and can't find anything online.

Name: Anonymous 2009-01-07 20:23

Oh, it's you.

You need to describe what you're doing and the errors you get in a little more detail.

Name: Anonymous 2009-01-07 20:24

>>2
Also C++ is really bad. Consider anything else.

Name: Anonymous 2009-01-07 20:26

i dunno lol

Name: Anonymous 2009-01-07 20:30

>>2
Not really an error I just flat out don't know how to get the sdl libs and includes to work with text pad. With visual studios we had to jump through a few hoops to get it to work with sdl but the teacher more or less set it up. I'm just at a complete loss on how to do it.

Name: Anonymous 2009-01-07 20:34

>>1
by "text pad" you mean that text editor for toy operating systems, right?
and by "sdl" you mean the "simple directmedia layer" library, right?

...what the fuck are you trying to do?

Name: Anonymous 2009-01-07 20:35

>>5
Okay, Textpad is just your text editor and has nothing to do with it. You need to find out how to invoke the compiler you're using from the command line, and where it expects to find include files. Put the SDL headers wherever that is, then in your program put #include <SDL.h> and go about your merry way. Once you've got this working I think you can set up textpad to invoke the compiler with a button press.

Name: Anonymous 2009-01-07 20:43

>>7
Yeah I have it set up for basic c++. As the thread in /g/ suggested I moved the include files into my compiler but I come up with this shit.

c:/djgpp/tmp/cck5XaP1.o(.text+0x11):test.cpp: undefined reference to `_SDL_Init'
c:/djgpp/tmp/cck5XaP1.o(.text+0x16):test.cpp: undefined reference to `_SDL_Quit'
djgpp is the compiler the college gave me to work with so I've been useing it. Any clues on this bit?

code if you need it

#include <SDL.h>

using namespace std;

int main( int argc, char* args[] ) {
    SDL_Init( SDL_INIT_EVERYTHING );
    SDL_Quit();
    return 0;
}

Just trying to test to see if it's working and nothing special at this point.

Name: Anonymous 2009-01-07 20:46

>>8
-lsdl

Name: Anonymous 2009-01-07 20:49

>>9
I'm sorry I'm not good with this what does -lsdl mean?

Name: Anonymous 2009-01-07 20:49

>>8
Linker problem, >>9 has it right. The headers have been successfully included and your test.cpp has been successfully compiled. However, the linker doesn't know you want to link with the SDL dll, so you need to tell it on the command line.

Name: Anonymous 2009-01-07 20:50

>>10
You need to add "-l sdl" or something similar to the command line to tell it to link with the SDL dll when producing an executable.

Name: FrozenVoid!FrOzEn2BUo 2009-01-07 20:57

Your quoting inefficiently. I wouldnt make such trivial mistake, as I am very good at posting on the internet. Me, I would write a Javerscript program to automatically generate these posts and then post it on my BLOG.
You have read my BLOG right?
http://faggots.dicks.butts/
Read my BLOG.

Name: Anonymous 2009-01-07 20:57

>>11
>>12
I'm not sure how to link it. Not accepting it as a parameter nor does it work on the command line.

Name: Anonymous 2009-01-07 21:00

>>14
And yes I am an idiot, talk to me like I'm stupid and it will probably help

Name: Anonymous 2009-01-07 21:03

Name: sage 2009-01-07 21:09

>>16
Thank I think I may be able to get it to work but I'm still screwing up. At least I have that now.

Name: Anonymous 2009-01-07 23:52

OP here, trying to get it to work with the -l but it is still fucking up.

c:/djgpp/bin/ld.exe: cannot find -lSDL.lib

is the error it gives. I am really stuck I read over the stuff and tired a few things but I just don't know what to do.

Name: Anonymous 2009-01-08 0:05

>>18
I think it wants you to statically link SDL. That means that all the SDL code gets included in your program, rather than being stored in a .dll that every program on the system can share. Sooo... you'll need a version of SDL that provides you with a suitable file to link in. I'm not sure whether one exists for djgpp. Maybe you could compile it yourself. Dunno, I work on Linux where things are easy.

Name: Anonymous 2009-01-08 0:15

>>19
I hardly understand what most of that means. Thank you anyhow I guess I'll just scrap the project or go make something console based.

Name: Anonymous 2009-01-08 1:00

>>20
It means that when you want to use a library like SDL, there are two things you need. The first is some header files, which are source code that you insert into your code verbatim with #include directives. These provide definitions of functions and data types that you need to make use of SDL. Your source code can then be compiled into an object file, which is compiled code that hasn't yet had the parts that make it into a legal executable pasted in. The second thing you need is the library in binary form, which contains the actual compiled SDL code. This was compiled in the same way your program was. The linker needs to take this, your object files, and some standard stuff that needs to be in every executable, and combine them to make an .exe.

You're missing the SDL binaries you need.

Name: Anonymous 2009-01-08 8:42

>>22
5/10.

Name: Anonymous 2009-02-25 7:41

Program to int tmain?

Name: Anonymous 2010-11-26 23:30


Don't change these.
Name: Email:
Entire Thread Thread List