SA-MP Forums Archive
[Fixed]C++ Issue - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: [Fixed]C++ Issue (/showthread.php?tid=144651)



[Fixed]C++ Issue - DeathOnaStick - 28.04.2010

Hey. Sorry if this is a dumb question, but i'm a beginner in c++ :/.

Okay, i got following problem:

I made:
pawn Code:
HDC hdc=GetDC(0);
SetPixel(hdc, 100,100, RGB(3,3,0));
I included:
pawn Code:
#include <iostream>
#include <windows.h>
#include <math.h>
#include <fstream.h>
I'm using Dev C++ as a compiler and run this as a console application. When i hit compile it gives me following errors:

Code:
[Linker Error] undefined reference to 'SetPixel@16'
Line 32:2 - Id returned 1 exit status
If you need more information, just tell me.

Would be nice if you would answer, although this might be a stupid question. Thanks!

#edit#: I just found out i forgot linking the libgdi32.o library to the project. Thanks to everyone that reads, anyway.


Re: [Fixed]C++ Issue - Jansish - 28.04.2010

Good job, why bother posting here, when you can fix this yourself?


Re: [Fixed]C++ Issue - Jansish - 29.04.2010

Quote:
Originally Posted by Seif_
Quote:
Originally Posted by PuukainiiC*
Good job, why bother posting here, when you can fix this yourself?
He needed help and ended up fixing it himself. Why are you getting mad on him?
I'm saying that he should check twice before making an useless topic


Re: [Fixed]C++ Issue - Correlli - 29.04.2010

Quote:
Originally Posted by PuukainiiC*
I'm saying that he should check twice before making an useless topic
He's only a human, like you, like everyone else on this forum (except Woet, he might be an animal). Everyone makes mistakes, I'm sure you did this at least one time before.


Re: [Fixed]C++ Issue - Jese - 29.04.2010

He have a problem and asked for it in Everything and Nothing. That is why we have this section for.
Think a little who made useless post(s) in topic.

Now back to topic guys