Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - freopen hangs when using -L/ENTRY:_WinMain 16
When using this source: ---- #include <stdio.h> #include <windows.h> int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, UINT nSW) { FILE* newfp = freopen(TEXT("Testing.log"), TEXT("w"), stdout); printf(TEXT("Testing...")); return 0; } ---- and this command line: dmc src\test2.cpp -o test\test2.exe -L/ENTRY:_WinMain 16 The program hangs on executing freopen, when I leave out the -L switch everything works fine. This seems really strange to me, how can specifying the entry point (which should be the same as when not using the -L switch) have such a strange result? You might ask why I'm using the -L switch, that is because I want to use a library which implements WinMain and OPTLINK does not look for entry points in the library files, only in object files. Which in itself seems somewhat strange to me, Walter, if you would, please have OPTLINK also look for entry points in library files. I am using version 8.39.5n Regards, Remko van der Vossen Feb 20 2004
"Wichetael" <wichetael gmx.net> wrote in message news:c159hl$2fcn$1 digitaldaemon.com...When using this source: ---- #include <stdio.h> #include <windows.h> int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, Feb 20 2004
"Walter" <walter digitalmars.com> wrote in message news:c15h87$30om$2 digitaldaemon.com..."Wichetael" <wichetael gmx.net> wrote in message news:c159hl$2fcn$1 digitaldaemon.com...When using this source: ---- #include <stdio.h> #include <windows.h> int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, Feb 21 2004
"Wichetael" <wichetael gmx.net> wrote in message news:c18dir$2cmn$1 digitaldaemon.com..."Walter" <walter digitalmars.com> wrote in message news:c15h87$30om$2 digitaldaemon.com..."Wichetael" <wichetael gmx.net> wrote in message news:c159hl$2fcn$1 digitaldaemon.com...When using this source: ---- #include <stdio.h> #include <windows.h> int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR Feb 21 2004
|