User forums > Using Code::Blocks

running code blocks programs directly from command prompt

(1/2) > >>

I am new to code blocks.  Using it as an ide in replacement of visual 2003.  Previously have studied C, C++ and C# a number of years ago and want
to come up to speed again.  I try running some of my starter programs developed in code blocks directly from the command prompt and not in code blocks ide.
I keep getting the message that I am missing a .dll file.  Other programs do start directly in the command prompt environment.  Is there a way to get around this?

What is the exact error message you are getting? (Depending on the error message depends on the fix)
What version of C::B did you install? (Also depending on the version depends on the fix)
What is the exe/zip filename of the C::B file you downloaded?  (Also depending on what file you used depends on the fix)
What directory did you install the C::B exe? (This is to check that the version of C::B will run okay in the directory you installed it in)

If you downloaded the nightly files please click on the "how it works" hyperlink in the nightly post that is the the red text. It will explain how to use/setup the nightly builds.

Your message is not enough explicit, but if the missing dll(s) is in the bin subdirectory of your compiler (probably a MinGW), add simply this full bin path to your PATH variable (your system one or your user one : easier if you are not admin).
For your information, Code::Blocks adds this path for his own usage, it's why your code works inside code::blocks, but the Windows general path is not modified: it's why dll is missing because Windows does not know where to find it (or them). More, if you want to distribute your code, it may be neccessary to add those dll to your distribution in the same directory where your exe is. You can also copy those dll in your exe directory for yourself, but I prefer the first solution : modifying the PATH variable.

NOTE : this question has been asked many many times on this forum. Use the search button with "miising dll" (for example) as the search key !

Yes I saw in the files that this question has been asked before.  The error message  states it cannot find libstdc++-6.dll.  In the process of using a utube video to work around this.  Release 20.03 rev 11983     Program is on c: \c++programs

I see the libstdc++-6.dll file in code blocks.  Is it possible to copy that file into my projects?  How would I link that to my projects so that I can go directly into command prompt and run the programs from there?


[0] Message Index

[#] Next page

Go to full version