.exe GNU on Windows [message #179582] |
Mon, 13 November 2006 17:50  |
Eclipse User |
|
|
|
Originally posted by: capriani.gmail.com
I have successfully created a C++ project with the CDT plugin and I am
able to run the .exe file on my computer.
When I copy the file to another machine it can't run, I get the error
message:
This application has failed to start because cygwin1.dll was not
found. Re-installing the application may fix this problem.
What should be done do have an exportable .exe? Does it mean I have to
install cygwin on the target machine? Can I include dependant dlls into
the project? Should I use another compiler (heard about MinGW)?
Using Eclipse 3.2.1 with Cygwin compiler.
Thanks
Thomas
|
|
|
|
|
|
Re: .exe GNU on Windows [message #179743 is a reply to message #179660] |
Tue, 14 November 2006 17:32   |
Eclipse User |
|
|
|
Originally posted by: capriani.gmail.com
Hi everybody,
I tried with the cygwin dll wich resolve the situation. Some docs says
that using that library may cause slower startup but it's not critical
enough for the purpose of the application.
I also tried with MinGW and I have a problem during linking (with either
a Managed C++ project or with my own makefile in a Standard C++
project). The log is as follow:
Invoking: GCC C++ Linker
g++ -mwindows -L"C:\Program Files\Microsoft Visual Studio
8\VC\PlatformSDK\Lib" -o"ScannerPushButton.exe" ./Main1.o -lmpr
-lwsock32 -lsti
../Main1.o(.text+0x30f):Main1.cpp: undefined reference to
`StiCreateInstanceW@16'
mingw32-make: *** [ScannerPushButton.exe] Error 1
mingw32-make: Target `all' not remade because of errors.
I have no clue what could be wrong, the only changes I made are the use
of mingw32-make instead of the Cygwin one. In both cases, the include
libraries by default are from MinGW (atomatically detected by the IDE).
I will give a try for the Cygwin "-mno-cygwin" option and see what happens.
Thanks
Thomas
Ray Hurst wrote:
> "Andrés Wellmann" <no@spam.dd> wrote in message
> news:op.tiz0o7c4h2oo1u@we.inf.bi.ruhr-uni-bochum.de...
>> Hi Thomas
>>
>> you can also use the compiler flag "-mno-cygwin". This will create an exe
>> which
>> can be started on other system without the need for this dll.
>>
>> BUT: you will loose some special cygwin functionalities, so you should
>> test first
>> whether your application will start at all using this flag.
>>
>> Hope this helps
>> Andrés
>>
>>> Hi Thomas (exquisitus),
>>>> I have successfully created a C++ project with the CDT plugin and I am
>>>> able to run the .exe file on my computer.
>>>> When I copy the file to another machine it can't run, I get the error
>>>> message:
>>>> This application has failed to start because cygwin1.dll was not
>>>> found. Re-installing the application may fix this problem.
>>> You need only this dll (cygwin1.dll) because there some native
>>> implmentation of DOS/WIN layer for GNU runtime in it.
>>>
>>> "Windows includes similar functionality, so the Cygwin library proper
>>> just needs to translate calls and manage private versions of data, such
>>> as file descriptors"
>>>
>>> Source: http://en.wikipedia.org/wiki/Cygwin
>>>
>>>> What should be done do have an exportable .exe? Does it mean I have to
>>>> install cygwin on the target machine? Can I include dependant dlls into
>>>> the project? Should I use another compiler (heard about MinGW)?
>>> MinGW lives without this dll. It use a kind of static layer.
>>>
>>> "MinGW: A collection of freely available and freely distributable
>>> Windows specific header files and import libraries combined with GNU
>>> toolsets that allow one to produce native Windows programs that do not
>>> rely on any 3rd-party C runtime DLLs."
>>> Source: http://www.mingw.org first sentence.
>>>
>>> Cheers Dirk
>
> As it says above, you only need the cygwin1.dll file on the new machine.
> Either copy it to the same directory as your app for copy it to the
> windows\sytem32 directory.
> Ray
>
>
|
|
|
Re: .exe GNU on Windows [message #180389 is a reply to message #179743] |
Sun, 26 November 2006 21:30  |
Eclipse User |
|
|
|
1.) You might forgot some library?
2.) The order of the libs are important, since g++ searches the
libraries only once, except with some switches to search multiple times.
(At least this has been some years ago.)
3.) You should not link GCC compiled objects against VC8 libraries. This
is usually very problematic. (Name mangling was this called I think)
Use the libs in GCC MinGW\lib directory.
exquisitus schrieb:
> Hi everybody,
>
> I tried with the cygwin dll wich resolve the situation. Some docs says
> that using that library may cause slower startup but it's not critical
> enough for the purpose of the application.
>
> I also tried with MinGW and I have a problem during linking (with either
> a Managed C++ project or with my own makefile in a Standard C++
> project). The log is as follow:
>
> Invoking: GCC C++ Linker
> g++ -mwindows -L"C:\Program Files\Microsoft Visual Studio
> 8\VC\PlatformSDK\Lib" -o"ScannerPushButton.exe" ./Main1.o -lmpr
> -lwsock32 -lsti
> ../Main1.o(.text+0x30f):Main1.cpp: undefined reference to
> `StiCreateInstanceW@16'
> mingw32-make: *** [ScannerPushButton.exe] Error 1
> mingw32-make: Target `all' not remade because of errors.
>
> I have no clue what could be wrong, the only changes I made are the use
> of mingw32-make instead of the Cygwin one. In both cases, the include
> libraries by default are from MinGW (atomatically detected by the IDE).
>
> I will give a try for the Cygwin "-mno-cygwin" option and see what happens.
>
> Thanks
> Thomas
>
|
|
|
Powered by
FUDForum. Page generated in 0.04161 seconds