Author Topic: error 0xc00000be from cl.exe  (Read 16876 times)

Offline thed0ctor

  • Single posting newcomer
  • *
  • Posts: 8
error 0xc00000be from cl.exe
« on: December 19, 2012, 12:57:14 pm »
Hello,

I'm a Visual Studio 2012 user trying to use Codeblocks with the Visual C++ compiler however I receive this error:


I tried copying the VS10 settings, making a "new" compiler and modifying the search directory and toolchain executable settings to the following:




And toolchain executable section to:



The code is just a simple hello world:

Code
#include <iostream>

using namespace std;

int main(){

    cout << "Hello" << endl;
    return 0;

}


I still receive this same error. Any ideas on how to get my cpp file to build?

Any ideas or help is much appreciated.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: error 0xc00000be from cl.exe
« Reply #1 on: December 19, 2012, 02:25:22 pm »
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

What is the Code::Blocks version/svn info?

What is the OS Name and version?
ex. Windows 7 SP1

Tim S.
« Last Edit: December 19, 2012, 02:28:49 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thed0ctor

  • Single posting newcomer
  • *
  • Posts: 8
Re: error 0xc00000be from cl.exe
« Reply #2 on: December 19, 2012, 02:33:10 pm »
Version is: Release 12.11 rev 8629 32bit. I did not build CodeBlocks myself. Complete logging was already turned on. Here is the output:
Code
cl.exe /nologo   /I"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include"  /c C:\Users\Patrick\Desktop\Untitled1.cpp /FoC:\Users\Patrick\Desktop\Untitled1.obj
Process terminated with status -1073741634 (0 minutes, 34 seconds)
0 errors, 0 warnings (0 minutes, 34 seconds)
 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: error 0xc00000be from cl.exe
« Reply #3 on: December 19, 2012, 02:39:49 pm »
I do NOT recommend building on the desktop "Desktop\Untitled1.cpp"

What is your windows version?

When does the error happen?
Does CB crash?

Edit
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

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

Offline thed0ctor

  • Single posting newcomer
  • *
  • Posts: 8
Re: error 0xc00000be from cl.exe
« Reply #4 on: December 19, 2012, 03:47:46 pm »
I compiled in "C:\Users\Patrick\SkyDrive" instead and received the same error. I looked up compiling c++ files using the VS11 compiler via the command line and that led me to this website.

This told me to run the Visual Studio 2010 Command Prompt I have installed as Administrator (not the normal command prompt window, using that gave me errors, not the ones I received in Codeblocks). I did this and rand the commands:

Code
cd "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin"
cl /EHsc "C:\Users\Patrick\SkyDrive\Untitled1.cpp"
Untitled1.exe

and it worked.

I tried doing the same in the normal command prompt and it gave me an error:

which isn't the same error as Codeblocks.

I think Codeblocks may be using the wrong commands but I have no idea how to fix this and link it to the correct command prompt. Any ideas?

Also my OS is Windows 8 Enterprise x64
the error happens when I try to build
and no CB doesn't crash, it just doesn't build

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: error 0xc00000be from cl.exe
« Reply #5 on: December 19, 2012, 04:15:59 pm »
I did this and rand the
I tried doing the same in the normal command prompt and it gave me an error:
[...]
which isn't the same error as Codeblocks.
Yes it is exactly the same error. 0xc00000be signifies missing a system library.

Not related to Code::Blocks, really. You have a bad Visual Studio install, or accidentially deleted some files, or accidentially changed the path or dllpath environment variables, or something worse (malware?).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: error 0xc00000be from cl.exe
« Reply #6 on: December 19, 2012, 05:52:20 pm »
Not related to Code::Blocks, really. You have a bad Visual Studio install, or accidentially deleted some files, or accidentially changed the path or dllpath environment variables, or something worse (malware?).
I think this  is not correct, because all installs of VStudio doesn't modify the env. There is a reqirement  to  run cl.exe (and otherd) in the modified env by using the provided scripts.

thed0ctor: can you try to run codeblock, from inside the modified console to see if this fixes your problem?
(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!]

Offline thed0ctor

  • Single posting newcomer
  • *
  • Posts: 8
Re: error 0xc00000be from cl.exe
« Reply #7 on: December 19, 2012, 06:22:10 pm »
@thomas: I install VS11 a while ago and just installed codeblocks today. I then started setting up the environment variables etc and couldn't build anything in codeblocks. I don't get this error when I run the "Visual Studio Command Prompt," it compiles and runs just fine. Running the normal command prompt (i.e. hitting WIN+R, typing in cmd, hit enter) gives me that error. Almost like something is loaded in the VS command prompt that isn't in the normal one.

@oBFusCATed: I'm not sure how to run CodeBlocks from the modified console. Is it in a menu or something?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: error 0xc00000be from cl.exe
« Reply #8 on: December 19, 2012, 07:15:51 pm »
@oBFusCATed: I'm not sure how to run CodeBlocks from the modified console. Is it in a menu or something?
just type path_to_exe\codeblock.exe ...
(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!]

Offline thed0ctor

  • Single posting newcomer
  • *
  • Posts: 8
Re: error 0xc00000be from cl.exe
« Reply #9 on: December 19, 2012, 07:22:28 pm »
Oh haha, thought you meant have CB use this command line instead of the default one. I ran CB from within the VS terminal and it worked. Now do I need to make a script to make codeblocks always open with this or is there an easier way?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: error 0xc00000be from cl.exe
« Reply #10 on: December 20, 2012, 02:31:32 pm »
Not related to Code::Blocks, really. You have a bad Visual Studio install, or accidentially deleted some files, or accidentially changed the path or dllpath environment variables, or something worse (malware?).
I think this  is not correct, because all installs of VStudio doesn't modify the env. There is a reqirement  to  run cl.exe (and otherd) in the modified env by using the provided scripts.
Well, Code::Blocks does not delete files from the user's computer, nor does it tamper with system library paths or environment (envvar plugin exempted). That's a pretty safe thing to assume.

Yet, the error is clear. cl.exe doesn't run because it can't find a shared library. Which means either the DLL is not there (has been deleted, or was never installed?) or is present but can't be found or accessed for some obscure reason (bad system configuration, e.g. lib search path?).

Unless of course, if Microsoft has put extra effort into making their products un-runnable from other IDEs (requiring special magic) than their own, but I would be surprised if that was the case. Other people run the MS compiler with Code::Blocks just fine, so I guess it ought to work (I'm not one of them, VS11 will not even install on my machine, allegedly because "user aborted install").

I install VS11 a while ago [...] started setting up the environment variables
That's my guess where the problem is.

Quote
Almost like something is loaded in the VS command prompt that isn't in the normal one.
What's possible is that maybe the VS command prompt does a sanity check to assure that the environment variables are correct (or even just sets them brute force). You should be able to find out by running Process Explorer, it lets you see the environment if you double-click any running process. Try and do that for cl.exe when you run it from Code::Blocks and when you run it from the VS command prompt. Or, try it on the command prompt directly (50% chance that this just works, too).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: error 0xc00000be from cl.exe
« Reply #11 on: December 20, 2012, 02:42:22 pm »
I think the cure is to add the path to the binaries to the additional paths, but I'm not sure...
(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!]