Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Member Since 04 Jul 2012
Offline Last Active Today, 07:32 AM

Posts I've Made

In Topic: cryptopp, issues. every first time i try to build it i get errors, but then i...

16 November 2014 - 04:51 PM

Just to update, i ended up not using cryptopp.

In Topic: cryptopp, issues. every first time i try to build it i get errors, but then i...

12 November 2014 - 09:07 AM

Include path is correct "./cryptopp/include/"

lib path "./cryptopp/lib/"

lib : cryptopp   (which will link to only one in folder, that being libcryptopp.a)

followed tutorial.


About the A-B dependency, any ideas how i can figure that out? It makes sense, i just ain't got clue how check or even fix that.


By the way, i made a static cryptopp build, because i couldn't find a dinamically built one.
If you know of a tutorial how to build cryptopp dynamically id use it please.

In Topic: Switching IDE, having issue with "code completion"?

20 October 2014 - 02:46 PM

Well thank you on suggestions, but only now i see how poor my request for help was, i should spent more time on it sorry for lack of information on my side.


Well after having massive issues with 32Bit windows, i switched to 64, and also switched IDE to CodeLite, now everything works fine, its code completion is as good as VS, so i am pleased.


If code completion is important for you, I'd advice you to use VS, Qt or CDT. I don't know why you would use anything other than Visual Studio on Windows, as in almost all cases it is free (as a student through DreamSpark, as a small business through BizPark, as MSDN subscription if you are a partner - that is, have enough Microsoft-certified employees through your local Microsoft branch).

Because VS is using allot of stuff that's non standard, and after we tried converting a project which has ~10k lines from VS project to Code::Blocks and CodeLite we had a job on our hands, and also we couldn't all work on it at same time, so the "Non standard" of the VS is so bad, i won't use the IDE. Even thou it can be set up to be using ISO. I did not find a easy tutorial so i decided to switch as well.

In Topic: Converting project code from VS13 to Code::Blocks, massive amount of errors

16 October 2014 - 04:54 AM

I think even VS13 doesn't allow that code unless argument is const.


I've just tested similar situation using http://coliru.stacked-crooked.com/

void func(const int & v) {

int main() {
    return 0;

And it doesn't throw error.


Maybe you're missing "-std=c++11" compiler parameter? I think this kind of syntax is new one.

I have set code::blocks compiler to use c++11 standard.



You've inadvertently relied on a horrible and well-known bug in VC++. Your code is invalid C++. GCC is very right to reject it; not only is the code wrong, it's an error _for a good reason_.

Temporaries cannot bind to lvalue references. You must use a value (as your fix did), a constant reference, or an rvalue reference. Again, this is for very good reason, and it's a bug in VC++ that your code ever worked in the first place.

For small struct types (like your two-component vector) passing by value is often as fast or faster than using a reference, at least with an up-to-date compiler using a modern ABI.

I was not aware of that.

I am just sad VS has c++ standard different then other compilers. I will probably not use it for that reason, but its a best IDE i ever used.


You do realise that VS(Microsoft MSVS C++ compiler, in this case) and Code:blocks(GCC compiler) are different compilers? Although C++ is a standard there is a lot going on in a compiler and many tricks, bugs, lack of understanding of the standard and optimization techniques are used. Then there is lack of support(to a degree) for third party libraries like the Win32 API in GCC, and then there are all the Microsoft extensions that they add, which are not difficult to correct mainly typedefs or defines, but as said this looks like a genuine bug at the Microsoft side.

I do understand its a different compiler.




It's not a VS bug, it's a intended (and useful) feature. It's what VS calls an extension. Unfortunately it's non standard.


There's a switch in the compiler options to turn any non standard extensions off.

Now that's a thing i will attempt to do, but i don't trust it any more honestly. What other stuff that's non standard does it do? I don't know and i don't want to deal with that kind of stuff, its a setback. I was aware that it shouldn't work that way, but it did, so i supposed i was wrong.

In Topic: Rotating point around point in 2D

11 October 2014 - 10:25 AM

You posted entirely too much code. You should be able to make a simple test call to your Rotate function and tell us what you expected to get and what you got instead. But by then you can probably inspect every operation by hand and figure out what the problem is.

I'll tell you that your `angle' is in degrees and you never convert it to radians before sending it through sin() and cos(). Friends don't let friends use degrees. You can use degrees to get an angle from the user, to show it to the user or to set the value of a constant, but then you immediately convert it to radians and do everything internally as radians.

Ooh, i did not know that. Thank you!




What Álvaro said.


You need to convert to radians.


You also need to translate to the origin, rotate and then translate back.


Here is your rotate method, this should probably work:

void Rotate(sf::Vector2f & p, double angle, sf::Vector2f r)
double pi = 3.14159;
float rad = angle*pi/180.0f;
float s = sin(rad);
float c = cos(rad);
float rx = r.x;
float ry = r.y;
r.x -= p.x;
r.y -= p.y;
p.x = rx + r.x * c - r.y * s;
p.y = ry + r.x * s + r.y * c;


The example code, thank you kind sir!