Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / DarkGDK in a different compiler

Author
Message
Doc
16
Years of Service
User Offline
Joined: 6th Nov 2007
Location:
Posted: 9th Dec 2007 22:25 Edited at: 9th Dec 2007 22:26
Is it possible to get DarkGDK to run in another C++ compiler like Dev-C++? Because I really just hate Visual C++.

and I guess the more important question is, would I be allowed to? Does it go against the license agreement or anything?

"The boldness of asking deep questions may require unforseen flexibility if we are to accept the answers." --Greene
aersixb9
16
Years of Service
User Offline
Joined: 29th Nov 2007
Location:
Posted: 9th Dec 2007 22:28
It sure integrates nicely with visual c++ 2008 express, and, uh, how can you not like visual c++ 2008? There's probably a way to get it to work in dev-c++, but you're better off using VS. Why don't you like VS? I noticed this new version runs much faster than the old (2005) version...
Doc
16
Years of Service
User Offline
Joined: 6th Nov 2007
Location:
Posted: 10th Dec 2007 00:06 Edited at: 10th Dec 2007 00:09
Because when I try to bring all my Dev-C++ code over to VS they run slower, I have to include an extra header "stdafx.h", and they all seem to have errors in my old code.
I don't want to have 2 C++ compilers, I just want 1.

Code that runs perfectly fine on Dev-C++ without any warnings gets errors in VS, like:


That runs like it should in Dev, but in VS it says can't allocate array of size 0: ( int a[x]; )
I think this is because the compiler in VS doesn't recognize "cin".

NOTE: if using VS then add #include "stdafx.h" to the top.


Then there is also some windows code that doesn't seem to work right in VS, like loading DLL's

"The boldness of asking deep questions may require unforseen flexibility if we are to accept the answers." --Greene
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Dec 2007 14:44
Quote: "Is it possible to get DarkGDK to run in another C++ compiler like Dev-C++?"


There's no way that you can use the existing libraries in Dev-C++. The name mangling scheme used by VC++ just won't work with GCC.

Quote: "when I try to bring all my Dev-C++ code over to VS they run slower"

VC++ adds safety checks to your code to avoid buffer overruns and other related security stuff - it can be switched off if necessary and then usually runs faster than its GCC equivalent.

Quote: "Code that runs perfectly fine on Dev-C++ without any warnings gets errors in VS"

This is invalid C++ (at least until the 0x standard is released):
int a[x];

I guess it's an extension that GCC provides that isn't supported by VC++. Use a vector instead - that's what it's for

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 10th Dec 2007 15:49
Quote: "VC++ adds safety checks to your code to avoid buffer overruns and other related security stuff - it can be switched off if necessary and then usually runs faster than its GCC equivalent.
"


Good Point - Now I need to "Recheck" my settings in VS2005xpress and see if there is anything I can shut off to speed things up here and there - Thankx for that little reminder IanM

icuurd 12b42
16
Years of Service
User Offline
Joined: 7th Dec 2007
Location:
Posted: 11th Dec 2007 07:54
I actually trashed the 2005 VS (lets face it, it simply was not good Interdev was better) and used Dev c++... Mainly because I could not make DLLs with it

2008 Is much better and I am now thinking I will not use dev c++ anymore (no integrated help)

I guess you can always make a standard c dll in 2008 to wrap dark gdk functions and use that in dev c++. Though why bother. I have the 2 compilers on my machine and find 2008 easier to use (like the good old days of Interdev). Koodos to dev-c++ though. For a 8 meg download, it's quite impressive. Thank god for the people who still value simplicity.

The ego is a dangerous thing to feed.

Login to post a reply

Server time is: 2024-09-29 07:27:32
Your offset time is: 2024-09-29 07:27:32