Quantcast

Jump to content

» «
Photo

Set up VC++ 2010 compiler on CodeBlocks

9 replies to this topic
Swoorup
  • Swoorup

    innovator

  • Members
  • Joined: 28 Oct 2008

#1

Posted 22 October 2011 - 08:45 AM

As the title states how do I properly set up Visual C++ 2010 compiler on CODEBLOCKS? I am used to programming in Visual Studio 2010 but it causes a heavy drop in my system performance. Even I looked for fixes for it, they did not help that much.

So thats when I decided to use CodeBlocks as my IDE? I tried setting all the include and lib directories but it still gives me warnings. So my question is to to set up the VC++ compiler on CodeBlocks properly, so that it can be complete replacement of the Visual Studio IDE. Also will it causes some output changes? Also I want it to compile the way the VS compiles.

K^2
  • K^2

    Vidi Vici Veni

  • Moderator
  • Joined: 14 Apr 2004
  • United-States

#2

Posted 22 October 2011 - 10:28 AM

That will be very tricky to do. Why not just use MinGW?

Swoorup
  • Swoorup

    innovator

  • Members
  • Joined: 28 Oct 2008

#3

Posted 22 October 2011 - 11:48 AM Edited by Swoorup, 22 October 2011 - 03:02 PM.

I don't know about other compilers. I once tried the same VC++ codes on Dev C, but I get a lot of errors.

EDIT: I got the VC++ 2010 compiler working by setting include and lib files' directories. But after compilation, I get a lot of warnings. Is it okay to ignore those warnings?

Swoorup
  • Swoorup

    innovator

  • Members
  • Joined: 28 Oct 2008

#4

Posted 23 October 2011 - 06:43 AM

Bump. Damn it feels that WD&P is the most inactive section of the forum. Anyway thanks K^2 sir.

I will check if VS2010 service pack 1 solves the issue though!

K^2
  • K^2

    Vidi Vici Veni

  • Moderator
  • Joined: 14 Apr 2004
  • United-States

#5

Posted 23 October 2011 - 10:58 PM

QUOTE (Swoorup @ Saturday, Oct 22 2011, 07:48)
I don't know about other compilers. I once tried the same VC++ codes on Dev C, but I get a lot of errors.

Yeah, VC++ has some peculiarities specific to it alone. In contrast, it uses fairly standard ASM inserts, while MinGW requires assembly to be written in a funny way. It's one of these things you have to learn as you work with different compilers. I've seen some good articles on the net about converting code between compilers. GNU vs VC++ is a fairly hot topic, so I'm sure you'll find a lot of articles on that. For the most part, what you read about GNU compilers, you can assume for MinGW as well.

Swoorup
  • Swoorup

    innovator

  • Members
  • Joined: 28 Oct 2008

#6

Posted 29 October 2011 - 08:21 AM Edited by Swoorup, 29 October 2011 - 08:31 AM.

The GNU compilers use strange ASM syntax. I don't know why its call AT&T syntax. It uses % in front of operands/registers. What about it?

Also one question? The reason for JAVA being slow than C is that it has its own Bytecode? So basically it has to interpret/convert each bytecode in the compiled file to the assembly byte code. Is this true? Is it pretty much like the GTA's SCM files?

Swoorup
  • Swoorup

    innovator

  • Members
  • Joined: 28 Oct 2008

#7

Posted 29 October 2011 - 11:11 AM Edited by Swoorup, 29 October 2011 - 11:19 AM.

BUMP. I want to say that Compiled file meant the JAVA compiled file. Its really amazing to watch all the instructions boil down to assembly language and then to 1s and 0s biggrin.gif .

Also K^2 I have also been wanting to know how the processor works? I mean how does it process all the opcodes? What goes inside that chip? I have been searching for a video demonstration, but I could only find Intel and AMD's ones just in brief. The video looked like it was meant for kids. Any guidance on this.? Just a briefing?

EDIT: Sorry for double posting. I just hope that this section is alive

K^2
  • K^2

    Vidi Vici Veni

  • Moderator
  • Joined: 14 Apr 2004
  • United-States

#8

Posted 31 October 2011 - 07:15 AM

There is a compiler flag that switches gcc/gpp between AT&T and Intel syntax for Assembly.

Yes, that's basically why JAVA runs a bit slow. There is a Java Virtual Machine that runs on your system, and the bytecode gets processed by that virtual machine. The virtual machine is effectively emulated, and an emulated processor can't run as fast as the physical one. On the plus side, once you have JVM running on your platform, it will run bytecode exactly the same regardless of hardware, so it's good for multi-platform applications where processing power isn't as important.

CPU architecture is a fairly complicated topic. It's not something that can be covered in one post. There are books on the topic, however. You can try "Logic and Computer Design Fundamentals" by M. Morris Mano. It's a bit expensive, but you might be able to get a good deal on an older edition, or find it in a library, or whatever. I have 2nd edition, so I'm not sure how much they've changed. (They're up to 4th now.) But it covers all the basics well enough, starting with fundamentals of digital logic, and up to architecture of CPUs. There are a lot of things it doesn't cover, but for an intro book, it is extremely thorough. At very least, you should get a clear picture of what else you need to learn after reading this. And for a programmer, it's probably enough to know what's in there anyways.

Swoorup
  • Swoorup

    innovator

  • Members
  • Joined: 28 Oct 2008

#9

Posted 31 October 2011 - 11:47 AM

So Java is like an interpreter. The JVS must be different on each platform/architecture. Wow thanks a lot. I find it easy to learn ASM through learning disassembling. Now II am really interesting in learning those stuffs, but how will it end? I meant will there be any career or not? Can you suggest me something. I asked my brother and he said that I should continue learning C/C++ and head on to database SQL as it has great scopes in the future. Also I am not sure but I might be studying in Australia after this!

Well, as for me I am eager to do/learn anything that is related to the computer stuff. Just thanks again

K^2
  • K^2

    Vidi Vici Veni

  • Moderator
  • Joined: 14 Apr 2004
  • United-States

#10

Posted 31 October 2011 - 02:30 PM

It depends on what you want to do. C/C++ is going to be useful regardless, but how much of everything else you should be learning depends on what you want to be using your knowledge for. If you want to write drivers, you have to know architecture. If you want to write databases, you need to know query languages and search algorithms. If you want to write networking code, you need to know more about networks. If you don't know yet, try to pick up a little bit of everything, but until you make a decision, you won't be able to learn it in enough detail to be useful in a career.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users