Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: UrbenLegend on September 23, 2009, 09:27:31 pm

Title: How to compile with MS C/C++ runtime links built into EXE with VS Compiler
Post by: UrbenLegend on September 23, 2009, 09:27:31 pm
I have an SDL/OpenCV program that I am trying to compile in CodeBlocks using the MS Visual Studio 2008 compiler. I've managed to compile it successfully, but when I try to run it, it says it needs msvcp80.dll, mfc90.dll, and another C runtime library file that I forgot the name of. When I copy those files into the same directory as the executable, I get the infamous "An application has made an attempt to load the C runtime library incorrectly". I've done some research and according to this site http://msdn.microsoft.com/en-us/library/ms235560%28VS.80%29.aspx, I need to modify my application to build with a manifest. How do I do this in CodeBlocks?
Title: Re: How to compile with MS C/C++ runtime links built into EXE with VS Compiler
Post by: stahta01 on September 23, 2009, 10:06:09 pm
Is the "WinXP Look'n'Feel" plugin installed and enable?
If not, install and enable it.

IIRC, It does what you want, but I have not used it in years.

Related message(s)
http://forums.codeblocks.org/index.php/topic,11128.0.html

Tim S.
Title: Re: How to compile with MS C/C++ runtime links built into EXE with VS Compiler
Post by: UrbenLegend on September 24, 2009, 12:31:58 am
So I used the plugin and the message disappeared, but now my program won't even start up. I am pretty sure its not a problem with my code because it runs fine under Linux. I've also done a cout message at the very beginning of the main function, and that's not even showing up in the console. I don't know what's going on.
Title: Re: How to compile with MS C/C++ runtime links built into EXE with VS Compiler
Post by: stahta01 on September 24, 2009, 01:02:27 am
Turn on full compiling logging and post the results somewhere they support the Compiler/Library you are using and ask if they see a problem.

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

Note: If you see a bug/problem related to Code::Blocks in the command log; post it here and I will see if I or someone else can confirm that it is an Code::Blocks bug/problem.

Tim S.