Mail Archives: cygwin/1999/02/05/15:11:37
If you cut and pasted the makefile, it probably took the leading tab out of
the makefile.
AIX is a version of unix, and I know how to make this type of makefile,
Thanks,
John
Suhaib M. Siddiqi wrote:
> >Thanks for the response :)
> >
> >I knew the code compiled because I was able to compile and run it
> outside of
> >make. I just wanted a very simple 'HELLO' application to work before I
> move
> >to more complicated code.
> >
> >As far as I can tell I followed the suffix rules for make and defined
> the
> >target rule correctly. The problem seems to be in ld.exe when called
> from
> >make.
> >
>
> You have a problem with your environment. Therefore make is unable to
> ld.exe.
> Read my previous message on how to define $PATH.
> Cygwin is a UNIX like environment. Therefore, to use it effectively you
> should have some
> knowledge of UNIX.
> When I use your posted Makefile, I get "missing separator" error. I do
> not get ld.exe not found error.
> Missing separator error means there is a problem with your Makefile.
> Cygwin follows UNIX rules
> not AIX. You can download a source code for SUN, SGI or LINUX, look
> carefully on the Makefile and you
> will know how to write a Makefile for a UNIX system. That makefile will
> work under Cygwin too.
>
> Suhaib
>
> >My personal e-mail is working again (thank goodness!) I don't like
> having to
> >use work e-mail for personal stuff.
> >
> >Thanks,
> >John Fortin
> >fortinj AT ibm DOT net
> >
> >Suhaib M. Siddiqi wrote:
> >
> >> OK,
> >> The reason I said check with someone else. because the code you
> posted
> >> on the Mail list compiles perfectly OK.
> >> I am not using a Makfile I simply cut and paste your code to a
> >> winhello.c file
> >> and typed
> >>
> >> gcc -O2 -mwindows -o winhello.exe winhello.c
> >>
> >> It compiled and works. I gonna e-mail you the binary winhello.exe in
> a
> >> separate mail.
> >> I do not want to send attachments to dump all the users with
> >> winhello.exe.
> >>
> >> Suhaib
> >>
> >> ----
> >> *************************************************
> >> Suhaib M. Siddiqi, Ph.D.
> >> Senior Research Chemist
> >> Inspire Pharmaceuticals, Inc.
> >> 4222 Emperor Blvd., Suite 470
> >> Durham, NC 27703-8466
> >>
> >> Tel: 919-941-9777 Ext. 238
> >> Fax: 919-941-9797
> >> E-Mail: Ssiddiqi AT inspirepharm DOT com
> >> http://www.inspirepharm.com
> >>
> >> ============================
> >>
> >> ----- Original Message -----
> >> From: <v2te2v2 AT us DOT ibm DOT com>
> >> To: Suhaib M. Siddiqi <Ssiddiqi AT InspirePharm DOT Com>
> >> Cc: cygwin <cygwin AT sourceware DOT cygnus DOT com>
> >> Sent: Friday, February 05, 1999 8:21 AM
> >> Subject: Re: make and .exe targets
> >>
> >> >Thank you for your 'help'. I have been a programmer for over 5
> years
> >> and
> >> >used several different makes on os2,
> >> >aix, and dos. The makefile I presented should follow the rules I
> know
> >> >about. If there is something non-standard here, I don't know what
> it
> >> is.
> >> >
> >> >I don't think you should judge experience based on a request for
> help.
> >> >
> >> >John Fortin, TelTech
> >> >FCMS Support
> >> >8-533-2349
> >> >(914) 894-2349
> >> >
> >> >
> >> >
> >> >"Suhaib M. Siddiqi" <Ssiddiqi AT InspirePharm DOT Com> on 02/05/99 08:22:40
> AM
> >> >
> >> >To: John Fortin/Fishkill/Contr/IBM
> >> >cc: "cygwin" <cygwin AT sourceware DOT cygnus DOT com>
> >> >Subject: Re: make and .exe targets
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >>I used both bash and a dos window with the same results....
> >> >>In case this helps, I am using bash as sh.
> >> >>
> >> >
> >> >
> >> >I think something is wrong with your make file or you cygnus setup.
> >> >I assume you are working at IBM. Could you please ask an
> experienced
> >> >programmer over there
> >> >to help with your Makefile and "bash" setup?
> >> >
> >> >Regards
> >> >Suhaib
> >> >
> >> >>John Fortin, TelTech
> >> >>FCMS Support
> >> >>8-533-2349
> >> >>(914) 894-2349
> >> >>
> >> >>
> >> >>
> >> >>"Suhaib M. Siddiqi" <Ssiddiqi AT InspirePharm DOT Com> on 02/04/99
> 12:13:27
> >> PM
> >> >>
> >> >>To: John Fortin/Fishkill/Contr/IBM
> >> >>cc: cygwin AT sourceware DOT cygnus DOT com
> >> >>Subject: Re: make and .exe targets
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>D:\home\v2te2v2\test>make winhello.exe
> >> >>
> >> >>From where is D:\home..... is comming? Are you trying to run make
> >> >under
> >> >>a DOS shell? If so, it will not work.
> >> >>You need to do this inside a bash shell.
> >> >>
> >> >>gcc -mwindows winhello.c -o winhello.exe
> >> >>
> >> >>Try this in bash shell:
> >> >>
> >> >>gcc -O -mwindows -o winhello.exe winhello.c
> >> >>
> >> >>/cygnus/CYGWIN~1/H-I586~1/i586-cygwin32/bin/ld: cannot open output
> >> file
> >> >>----
> >> >>*************************************************
> >> >>Suhaib M. Siddiqi, Ph.D.
> >> >>Senior Research Chemist
> >> >>Inspire Pharmaceuticals, Inc.
> >> >>4222 Emperor Blvd., Suite 470
> >> >>Durham, NC 27703-8466
> >> >>
> >> >>Tel: 919-941-9777 Ext. 238
> >> >>Fax: 919-941-9797
> >> >>E-Mail: Ssiddiqi AT inspirepharm DOT com
> >> >>http://www.inspirepharm.com
> >> >>
> >> >>============================
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>----- Original Message -----
> >> >>From: <v2te2v2 AT us DOT ibm DOT com>
> >> >>To: <cygwin AT sourceware DOT cygnus DOT com>
> >> >>Cc: <fortinj AT ibm DOT net>
> >> >>Sent: Thursday, February 04, 1999 11:36 AM
> >> >>Subject: make and .exe targets
> >> >>
> >> >>
> >> >>>
> >> >>>I'm a bit confused about building .exe targets. I am trying to
> create
> >> >a
> >> >>>default
> >> >>>makefile for building win32 apps. Created the following Makefile.
> >> >>Make
> >> >>>comes
> >> >>>up with the proper command, but then I get an error opening
> >> >>winhello.exe.
> >> >>>See
> >> >>>output... When I type the command outside of make it works fine.
> >> The
> >> >>>program is attached.
> >> >>>
> >> >>>I am using B20.1 with NT4/SP3.
> >> >>>
> >> >>>Makefile.......
> >> >>>
> >> >>>/**********************************
> >> >>>.SUFFIXES:
> >> >>>.SUFFIXES: .exe .c
> >> >>>.c.exe:
> >> >>> gcc -mwindows $< -o $@
> >> >>>/**********************************
> >> >>>
> >> >>>OUTPUT........
> >> >>>
> >> >>>D:\home\v2te2v2\test>make winhello.exe
> >> >>>gcc -mwindows winhello.c -o winhello.exe
> >> >>>/cygnus/CYGWIN~1/H-I586~1/i586-cygwin32/bin/ld: cannot open output
> >> >file
> >> >>>winhello.exe
> >> >>>: No such file or directory
> >> >>>collect2: ld returned 1 exit status
> >> >>>make: *** [winhello.exe] Error 1
> >> >>>
> >> >>>*******************************************
> >> >>>
> >> >>>Program......
> >> >>>
> >> >>>#include <windows.h>
> >> >>>
> >> >>>LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
> >> >>>
> >> >>>#ifdef __CYGWIN__
> >> >>>WinMainCRTStartup() {
> >> >>> mainCRTStartup();
> >> >>>};
> >> >>>#endif
> >> >>>
> >> >>>
> >> >>>
> >> >>>int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
> >> >>> PSTR szCmdLine, int iCmdShow)
> >> >>>{
> >> >>> static char szAppName[]="HelloWin";
> >> >>> HWND hwnd;
> >> >>> MSG msg;
> >> >>> WNDCLASSEX wndclass;
> >> >>>
> >> >>> wndclass.cbSize = sizeof(wndclass);
> >> >>> wndclass.style = CS_HREDRAW | CS_VREDRAW;
> >> >>> wndclass.lpfnWndProc = WndProc;
> >> >>> wndclass.cbClsExtra = 0;
> >> >>> wndclass.cbWndExtra = 0;
> >> >>> wndclass.hInstance = hInstance;
> >> >>> wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
> >> >>> wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
> >> >>> wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
> >> >>> wndclass.lpszMenuName = NULL;
> >> >>> wndclass.lpszClassName = szAppName;
> >> >>> wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
> >> >>>
> >> >>> RegisterClassEx(&wndclass);
> >> >>>
> >> >>> hwnd = CreateWindow(szAppName,
> >> >>> "The Hello Program",
> >> >>> WS_OVERLAPPEDWINDOW,
> >> >>> CW_USEDEFAULT,
> >> >>> CW_USEDEFAULT,
> >> >>> CW_USEDEFAULT,
> >> >>> CW_USEDEFAULT,
> >> >>> NULL,
> >> >>> NULL,
> >> >>> hInstance,
> >> >>> NULL);
> >> >>>
> >> >>> ShowWindow(hwnd, iCmdShow);
> >> >>> UpdateWindow(hwnd);
> >> >>>
> >> >>> while (GetMessage(&msg, NULL, 0, 0)) {
> >> >>> TranslateMessage(&msg);
> >> >>> DispatchMessage(&msg);
> >> >>> } /* End while */
> >> >>>
> >> >>> return msg.wParam;
> >> >>> }
> >> >>>
> >> >>>
> >> >>>
> >> >>>LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam,
> >> >>>LPARAM lParam)
> >> >>>{
> >> >>> HDC hdc;
> >> >>> PAINTSTRUCT ps;
> >> >>> RECT rect;
> >> >>>
> >> >>> switch (iMsg) {
> >> >>> case WM_CREATE:
> >> >>>// PlaySound("hellowin.wav", NULL, SND_FILENAME |
> SND_ASYNC);
> >> >>> return 0;
> >> >>> case WM_PAINT:
> >> >>> hdc = BeginPaint(hwnd, &ps);
> >> >>> GetClientRect(hwnd, &rect);
> >> >>> DrawText(hdc, "Hello, Windows NT", -1, &rect,
> >> >>> DT_SINGLELINE | DT_CENTER | DT_VCENTER);
> >> >>> EndPaint(hwnd, &ps );
> >> >>> return 0;
> >> >>> case WM_DESTROY:
> >> >>> PostQuitMessage(0);
> >> >>> return 0;
> >> >>> } /* End switch */
> >> >>>
> >> >>> return DefWindowProc(hwnd, iMsg, wParam, lParam);
> >> >>>}
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>--
> >> >>Want to unsubscribe from this list?
> >> >>Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >--
> >> >Want to unsubscribe from this list?
> >> >Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
> >> >
> >> >
> >>
> >> --
> >> Want to unsubscribe from this list?
> >> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
> >
> >
> >
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -