Author Topic: how to make such setting in code blocks.  (Read 4047 times)

Offline vikash

  • Multiple posting newcomer
  • *
  • Posts: 23
how to make such setting in code blocks.
« on: July 17, 2011, 05:36:43 am »
I have installed visual C++ 2008 express in my computer. I feel better to write in code blocks so i want to use editor of code blocks but compiler debugger etc of visual C++.I mean i want to use visual C++ in code blocks environment. Can I change setting of project so that it uses visual C++ compiler linker etc instead of gcc. If yes then how to do this.

thanks for any kind of help.
« Last Edit: July 17, 2011, 05:38:58 am by vikash »

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: how to make such setting in code blocks.
« Reply #1 on: July 18, 2011, 10:06:10 am »
There is a menu in setting, compiler settings.
I don't use this compiler so I can't help more...

But wiki give some instructions:
http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_C_6_with_Code::Blocks_IDE

Offline vikash

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: how to make such setting in code blocks.
« Reply #2 on: July 18, 2011, 11:07:26 am »
There is a menu in setting, compiler settings.
I don't use this compiler so I can't help more...

But wiki give some instructions:
http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_C_6_with_Code::Blocks_IDE
that is for visual C++ 6 i am asking for visual C++ 2008.
did method mentioned there work for VC++ 2008  also? i think no.

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: how to make such setting in code blocks.
« Reply #3 on: July 18, 2011, 12:08:39 pm »
Are those compiler so different?
Instructions maybe relatively close.

Offline vikash

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: how to make such setting in code blocks.
« Reply #4 on: July 18, 2011, 04:17:02 pm »
Are those compiler so different?
Instructions maybe relatively close.

That does not work.
See code blocks is cross platform which means it can use other compilers also(As i think). I go to setting->compiler and debugger->toolchain executable tab there i replace GNU GCC compiler by MS visual C++ 2005/2008 then click on auto detect it detect my visual C++ installation directory all the entries changed. But when i compile Hello world program it say no file like iostream found in directory as an error. Once again i go to setting->compiler and debugger->toolchain executable tab there i open every entry like C compiler C++ compiler and others(see attachment 1). In bin folder of VC++ installation directory every file found(as shown in toolchain) except debugger file name cdb.exe and resource file name rc.exe(see attachment 1). I think it is not compiling because these two files are not in directory and it is mandatory to have those file in bin folder as written above in image(see attachment 1)
see specially those regions which are made round. Is there any error in my tool chain?

[attachment deleted by admin]
« Last Edit: July 18, 2011, 04:18:54 pm by vikash »

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: how to make such setting in code blocks.
« Reply #5 on: July 18, 2011, 05:15:20 pm »
But when i compile Hello world program it say no file like iostream found in directory as an error.
Sounds more like a problem with the library.
Did you look into other tabs to change where C::B search headers and libs?

The 2 absent files should not be mandatory to build a console only program (But I can be wrong, I'm not at all a guru of compilers and compilation). But you can search and specify them by hand to verify.
To be sure, post your complete build log

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: how to make such setting in code blocks.
« Reply #6 on: July 18, 2011, 05:29:43 pm »
Hints to help it work right; set the Compiler You wish to use most of the time as the default compiler.
use ["set as default" button]
After setting up the tool chain, Turn on Full Compiler Logging to troubleshoot Compiler issues.

http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

NOTE: Do NOT use the extension ".c" for C++ Programming source files.

Edit: cdb.exe is only needed for debugging.

Tim S.
« Last Edit: July 18, 2011, 05:31:52 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline vikash

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: how to make such setting in code blocks.
« Reply #7 on: July 18, 2011, 07:51:02 pm »
Hints to help it work right; set the Compiler You wish to use most of the time as the default compiler.
use ["set as default" button]
After setting up the tool chain, Turn on Full Compiler Logging to troubleshoot Compiler issues.

http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

NOTE: Do NOT use the extension ".c" for C++ Programming source files.

Edit: cdb.exe is only needed for debugging.

Tim S.
I have done what i was looking for. I follow these steps.
(1) uninstall codeblocks.
(2) delete this folder  C:\Users\<user name>\AppData\Roaming\codeblocks. It contain configuration files.
(3) install codeblocks it asks in starting to change compiler i set VC++ 2008 express as default(in starting) now it compiles with VC++. unfortunately i can't debug.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: how to make such setting in code blocks.
« Reply #8 on: July 18, 2011, 09:29:32 pm »
Install cdb.exe the directions are somewhere on the web. Maybe even on our wiki.

cdb is a software package from microsoft.

Tim S.
« Last Edit: July 18, 2011, 09:31:14 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12828
    • Travis build status
Re: how to make such setting in code blocks.
« Reply #9 on: July 18, 2011, 10:06:57 pm »
Note1: To get cdb.exe, you need the "Debugging tools" from Microsoft.
Note2: You will get better experience/results with a nightly build of C::B from the debugger's branch.

Good luck...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]