0

I have an executable from a c++ project that i have done.It works fine to my Pc but it gives error to other cause of a dll missing.I searched a solution and i have found out that in VC++ i can go to

Project > Properties > Configuration Properties > C/C++ > Code Generation > RunTime Library > Multy threaded (/MT)

and if the value is MT with dll it will be fine.

I work with Eclipse and i can not find something similar. Is there any way to make the exe run on other pc without using dll finders?

Web Devie
  • 1,207
  • 1
  • 13
  • 30
kyrpav
  • 756
  • 1
  • 13
  • 43

2 Answers2

1

You haven't said what .dll is missing, but since it's MinGW, i presume it's one of their .dll's missing.

You could try adding -static to your build options; this builds the MinGW libraries into your .exe so that it doesn't need them installed on the other pc.

NB: this probably has some other effects that i don't know about, but in simple cases it should suffice.

alternatively, find the .dll and distribute it with your program, as that will work (provided you don't go windows->mac or something like that).

CommanderBubble
  • 333
  • 2
  • 9
0

The dll must be missing because you are using libraries (ddls) as shared libraries. But if as CommanderBubble suggested your error while running on other PCs is sloved by making linking of ddls static, then yoou can choose to use the method.

But there are some trade offs. (Like duplicvation of common dlls, etc)

This SO answer provides a very good explanation of the situatio and its advantages and disadvantages.

Community
  • 1
  • 1
Rohit Vipin Mathews
  • 11,629
  • 15
  • 57
  • 112