Author Topic: compile C::B with msvc  (Read 11250 times)

Offline Joerg

  • Multiple posting newcomer
  • *
  • Posts: 100
compile C::B with msvc
« on: January 16, 2009, 10:23:16 am »
Hi,
is there a VC project around for C::B anywhere?
I really don't want to use mingw.
Or can I just open one of the .cbp files and compile
C::B within C::B with msvc?
A visual studio project would be better for debugging I think.
Thank you!
It's never too late to fail!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: compile C::B with msvc
« Reply #1 on: January 16, 2009, 11:51:57 am »
is there a VC project around for C::B anywhere?
No and there can't be. C::B was designed to be compiled with GCC only and is not VC compatible. It would even make no sense as C::B is a cross-platform IDE which shall also run under e.g. Linux and/or MAC where you don't have a VC compiler. So why shall we invest in VC compatibility if we have no use for it?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: compile C::B with msvc
« Reply #2 on: January 16, 2009, 03:00:24 pm »
No and there can't be. C::B was designed to be compiled with GCC only and is not VC compatible.
That might be misinterpreted :)

Code::Blocks was not designed to be compiled specifically with GCC, and it isn't incompatible with Visual C++. It is rather that Visual C++ is not compatible with C++, and no workarounds specific to Visual C++ deficiencies are implemented.

Code::Blocks was designed to be standard C++ to the best of our knowledge and ability (this ability is somewhat limited by several factors, such as for example some of the 3rd party libraries that we use), and to build reasonably warning-free.
When non-standard GCC extensions are used, these are (should be) guarded by corresponding preprocessor statements.
Errors, mistakes, and misconceptions are of course possible, but making Code::Blocks not compile on a particular compiler is not a design criterium :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline XayC

  • Multiple posting newcomer
  • *
  • Posts: 94
Re: compile C::B with msvc
« Reply #3 on: January 16, 2009, 03:17:43 pm »
It would even make no sense as C::B is a cross-platform IDE which shall also run under e.g. Linux and/or MAC where you don't have a VC compiler. So why shall we invest in VC compatibility if we have no use for it?

So I guess even the wxWidgets files to compile the library with Visual C++ make no sense.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: compile C::B with msvc
« Reply #4 on: January 16, 2009, 03:24:09 pm »
So I guess even the wxWidgets files to compile the library with Visual C++ make no sense.
If you plan to use wxWidgets under Windows only, no.
If you work cross platform, probably need VC and/or are willing to do a separate project (meaning:using another IDE/compiler framework) under Windows, no.
Depends on - for C::B it makes no sense. That's all I said.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline XayC

  • Multiple posting newcomer
  • *
  • Posts: 94
Re: compile C::B with msvc
« Reply #5 on: January 16, 2009, 03:40:14 pm »
It doesn't matter, and indeed it's your opinion, but I don't see why having a msvc build option makes sense if you use wxWidgets mainly on Windows and doesn't make sense if you use C:B mainly on windows. If you plan to use C:B on Windows only, to me makes sense having a msvc build option (personally though I don't need it at all, I prefer mingw).

Probably it would have been better to say, when answering to rekisum's question, that currently C:B doesn't have any msvc build option, because nobody needed it so far (and probably it's not even easy to do), instead of a "no, it doesn't make sense".

XayC

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: compile C::B with msvc
« Reply #6 on: January 16, 2009, 04:26:19 pm »
Probably it would have been better to say, when answering to rekisum's question, that currently C:B doesn't have any msvc build option, because nobody needed it so far (and probably it's not even easy to do), instead of a "no, it doesn't make sense".
"No, because nobody needed it so far.".
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: compile C::B with msvc
« Reply #7 on: January 16, 2009, 05:24:01 pm »
I had once tried to compile C::B with MSVC 2005. I was using Bakefile to generate makefile and then compile using it.

But it throws some error while compiling and I couldn't succeed. I don't remember the exact error as I tried it long ago. I have a partial bakefile with which you can start if you are interested. :)

[attachment deleted by admin]
Be a part of the solution, not a part of the problem.

Offline Joerg

  • Multiple posting newcomer
  • *
  • Posts: 100
Re: compile C::B with msvc
« Reply #8 on: January 19, 2009, 10:36:08 am »
Hello biblap,

thanks for the bakefile.
But as msvc is not supported at all I maybe install mingw again.
Or I wait untill martind's OpenOCD plugin is available in the nightlys ;-)
At home I try to switch to Linux anyway but at work I need to use XP.
It's never too late to fail!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: compile C::B with msvc
« Reply #9 on: January 20, 2009, 07:15:10 pm »
I am trying an Second Time to Build Code::Blocks using MSVC.
I am using MSVC9/2008 this time.

Currently have errors compiling wxscintilla DLL.

Does anyone know which wxscintilla version is closest to the one used in Code::Blocks.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: compile C::B with msvc
« Reply #10 on: January 20, 2009, 08:44:28 pm »
Does anyone know which wxscintilla version is closest to the one used in Code::Blocks.
It's v1.71.1. But is has been heavily modified by us (as there is no official support anymore) and the underlying scintilla has been updated to 1.77.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: compile C::B with msvc
« Reply #11 on: January 21, 2009, 12:27:53 am »
Does anyone know which wxscintilla version is closest to the one used in Code::Blocks.
It's v1.71.1. But is has been heavily modified by us (as there is no official support anymore) and the underlying scintilla has been updated to 1.77.

Thanks, I will work on getting the unmodified 1.71.1 working with MSVC9. The problem I am having right now is MSVC9 compiling options.

Edit: Gotten MSVC9 to compile scintilla. Now, I am getting Standard Template Library (STL) related errors.
I am stopping here, for now. I think adding STLport to MSVC is the best way to proceed, but not sure.

Tim S
« Last Edit: January 22, 2009, 06:45:54 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org