Code::Blocks Forums
User forums => Help => Topic started by: PSU_Blue on February 19, 2007, 04:25:54 pm
-
I am using Code::Blocks IDE for some work in a computer graphics course at Penn State. I successfully imported our "starter code" for our first assignment, which was in MS Visual Studio project format. However, when I try to create a new project for our second assignment (a console application with C++ source) from scratch, building/running the code that is automatically generated causes a crash. It appears the error is related to "ntdll.dll" It won't even display the "Hello, world!" before the console runner program crashes. Am I missing something in the configuration of the project, or is there some known issue with this? The problem seems to be unique to console applications with C++ source; the C source works fine. Please let me know if there's a way to fix this. Thanks!
-
Are you using MSVC 8 (MSVC 2005)? Console wizard have problem with MSVC 8. :)
-
I am using the GNU GCC Compiler, which is the same compiler that I used for my first project, which worked fine.
-
Console wizard works perfectly with GCC. I'd request you to check your configuration once.
Also try looking at the differences between your project that worked and the generated console project. :)
-
What should I be looking for that might be amiss in the configuration? I haven't modified anything since creating the project. I am literally just creating a project and clicking "Build & run". I might just try uninstalling/reinstalling.
-
Have you tried running the compiled program outside of Code::Blocks (i.e. from the command line)? If it works, it may be a bug in Code::Blocks. If it doesn't work, it's a problem with MinGW or your PC.
Also, you haven't stated which version of C::B you're using.
-
Are you using latest nightly? If not please upgrade.
You can check the compiler options, linker options, link libraries, to see what are the differences.
-
I think I realized what happened. I had manually added some lib files to be linked, and I had to delete one of them. I think the linker was looking for the lib file even though it wasn't needed, couldn't find it, and crashed. I deleted all my settings and reinstalled, and now it seems to work. Thank you for your help, though. I appreciate it.
-
I think the linker was looking for the lib file even though it wasn't needed, couldn't find it, and crashed.
You may be confusing GCC's compile-time linker, which will give you an error message in C::B's build log at compile time if it can't find a necessary file, with Windows' runtime linker, which resolves dependencies on DLLs. Code::Blocks gives you control over the compile-time linker only; the runtime linker will give you a "can't find DLL" message box if it can't find a necessary DLL when you run the program.
Whatever your problem, I'm glad it's fixed.