Author Topic: Strange error when running my program  (Read 680 times)

Offline igdegoo

  • Single posting newcomer
  • *
  • Posts: 4
Strange error when running my program
« on: December 28, 2017, 05:53:08 pm »

I have no idea why this pops up.
When I run in the Code::Blocks editor it runs fine, but when I run the .EXE from the file explorer I get that message.
I am using MinGW compiler.

I can post the source code if it is required.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10736
    • Travis build status
Re: Strange error when running my program
« Reply #1 on: December 28, 2017, 06:20:04 pm »
It is either a missing dll or mismatched dll. Use dependency walker to find which of the two is...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline igdegoo

  • Single posting newcomer
  • *
  • Posts: 4
Re: Strange error when running my program
« Reply #2 on: December 28, 2017, 06:41:06 pm »
It is either a missing dll or mismatched dll. Use dependency walker to find which of the two is...
What is dependency walker?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10736
    • Travis build status
Re: Strange error when running my program
« Reply #3 on: December 28, 2017, 07:15:25 pm »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline igdegoo

  • Single posting newcomer
  • *
  • Posts: 4
Re: Strange error when running my program
« Reply #4 on: December 29, 2017, 04:21:15 pm »
http://bfy.tw/Uww
thanks, it works now
do you know how to compile it without it requiring all these DLLs?

Offline igdegoo

  • Single posting newcomer
  • *
  • Posts: 4
Re: Strange error when running my program
« Reply #5 on: February 22, 2018, 03:56:37 pm »
i still don't know know how to compile it without it requiring all these DLLs

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6160
    • My Best Post
Re: Strange error when running my program
« Reply #6 on: February 22, 2018, 05:24:56 pm »
i still don't know know how to compile it without it requiring all these DLLs

I suggest asking on a site the supports the compiler.
The normal way is to use static library instead of a shared/DLL library.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1785
Re: Strange error when running my program
« Reply #7 on: February 22, 2018, 07:12:38 pm »
Quote
I suggest asking on a site the supports the compiler.
Or the site that supports the library. You don't tell us what library so we can not say how to link it statically

Offline BentL

  • Single posting newcomer
  • *
  • Posts: 7
Re: Strange error when running my program
« Reply #8 on: March 13, 2018, 01:21:27 pm »
When I run in the Code::Blocks editor it runs fine, but when I run the .EXE from the file explorer I get that message.

The reason you get this error is because your exe-file cannot find the necessary dynamic link libraries. You either have to include these in the same folder as the exe-file, or you can specify that all libraries should be statically linked to the exe-file, so the application contains just one file:

File > Project > Build options... > Select application name > Linker settings > Other linker options > -static