Author Topic: Project runs fine via F9, but crashes outside?  (Read 7618 times)

Offline lmsmi1

  • Multiple posting newcomer
  • *
  • Posts: 11
Project runs fine via F9, but crashes outside?
« on: March 04, 2013, 08:48:44 pm »
I've built a custom DLL in CodeBlocks 12.11 with MinGW, and have linked my executable to it. When I run the executable via F9 in Code::Blocks, it does everything I want it to do. However when I double-click it outside of Code::Blocks, it opens, but immediately crashes. Is this an issue with MinGW, Code::Blocks, or what? Are there any fixes?

Note: The DLL is in the same folder of the executable that uses the functions inside it.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Project runs fine via F9, but crashes outside?
« Reply #1 on: March 05, 2013, 04:28:08 am »
Is this an issue with MinGW, Code::Blocks, or what? Are there any fixes?

Did you copy the DLLs needed by your project into the same folder as the exe?

If not, you need to do so; or at least make sure the DLLs are in the system PATH.

NOTE: It likely is missing the mingw DLL mingwm10.dll and maybe some other DLLs.

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