Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: asrockw7 on May 06, 2011, 07:33:16 pm

Title: Can't run .exe (error)
Post by: asrockw7 on May 06, 2011, 07:33:16 pm
When I try to run the .exe an error message pops up looking for a .dll file. Atm, what I do is code stuff using Code Blocks and move it to VS when it's done so I can start using it which is pretty stupid since it defeats the reason why I started using Code Blocks.

Also, just to save time and not spam, is it possible for me to put a gui on my programs?

EDIT: This is my error: The program can't start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem.

It's when I try to run the program exe from the Code Blocks directory. I can't move the exe around and use it on other computers because it won't execute.
Title: Re: Can't run .exe (error)
Post by: stahta01 on May 06, 2011, 08:14:15 pm
I have no idea if you know can learn to create an GUI.
You really should ask your programming questions on a programming site.

Tim S.
Title: Re: Can't run .exe (error)
Post by: asrockw7 on May 07, 2011, 07:37:57 am
nono I didn't mean it like that. I was thinking if Code Blocks had some sort of feature where it can integrate a GUI or something, a plugin of some sort. But yeah, nevermind that. lol I'm still asking about this error.
Title: Re: Can't run .exe (error)
Post by: virtuosonic on May 07, 2011, 08:47:37 am
yes, it has wxsmith, but it requires wxWidgets

http://wiki.codeblocks.org/index.php?title=WxSmith_tutorials (http://wiki.codeblocks.org/index.php?title=WxSmith_tutorials)
Title: Re: Can't run .exe (error)
Post by: jens on May 07, 2011, 08:52:06 am
yes, it has wxsmith, but it requires wxWidgets

One of the great advantages of wxSmith with wxWidgets is, that it is possible to create cross-platform guis with it.

The missing dll is part of TDM's MinGW install.
Make sure it is installed correctly and the dll can be found by your exe (either in the same folder or in system-path).
Title: Re: Can't run .exe (error)
Post by: sorinev on May 11, 2011, 12:33:34 am
The missing dll is part of TDM's MinGW install.
Make sure it is installed correctly and the dll can be found by your exe (either in the same folder or in system-path).

Is there a way around this? When moving the exe of a simple console program around to other places on my computer, or even another computer altogether (sending the program to a friend, etc.), it's kind of annoying to have to haul this .dll along with it. Is this just the nature of MinGW?

edit: Nevermind, it seems adding -static-libgcc to the linker options of the compiler fixes it.
Title: Re: Can't run .exe (error)
Post by: asrockw7 on May 14, 2011, 10:08:56 am
edit: Nevermind, it seems adding -static-libgcc to the linker options of the compiler fixes it.
It fixed it. lol thanks.

Also, the problem is the wx thing is for C++. I want to use C. But nevermind that, I'm trying to learn that now. thanks anyway. lol