|
From: Brian C. B. <bcb...@ya...> - 2001-06-19 22:10:13
|
Hi, Don't worry about sending to my email address, that is perfectly alright. As for my IDE, it is extremely new and has very little functionality to offer at this time. I had planned to have it GCC specific because I am most familiar with GCC. I am not against including other compiler support if someone points out good reasons to include it. That said, you might want to check out the free V IDE available at http://www.objectcentral.com/vide.htm. It can use GCC, Borland C++ 5.5, or Sun JDK. Here is what it says "Supports development of both C/C++ with the GNU gcc/g++ compiler for MS-Windows and Linux, (OS/2 environment soon), as well as the Java development using the Sun JDK. Borland C++ Compiler 5.5 - VIDE has very good support for the free Borland command line compiler tools. It can build Console, GUI, and static library project files. It also includes some extra documentation about the Borland environment. VIDE also supports Borland's Turbo Debugger TD32." Email me if you have any other questions. Also, I can post a message to the DevCpp list concerning this topic (I am assuming you can recieve messages); email me with the message to post and I will post it. Sincerely, Brian "Shall we accept good from God, and not trouble?" Job 2:10 -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Johannes Pretorius Sent: Tuesday, June 19, 2001 12:07 PM To: dev...@li... Subject: RE: [Dev-C++] Reading GCC output Hi there ------------ Sorry for sending to your personal mail. but I have trouble sending to the DevCpp list. it something (well most of the times) reject my mail. Also I want to ask if this IDE that you are planning to code. Will be compiler specific. For (exept for WinEdit) I am looking for a IDE that can use almost any compiler. Like Borland C++ 5. Well just wanted to ask considering I cant get onto the DevCpp list to ask this Question.. Thanks for your time and sorry for mailing your private.. Johannes Pretorius At 07:25 19/06/2001 -0400, you wrote: >Hi, >Thank you for this code, it appears to work correctly with GCC. > >Sincerely, >Brian > >"Shall we accept good from God, and not trouble?" Job 2:10 >-----Original Message----- >From: dev...@li... >[mailto:dev...@li...]On Behalf Of Elias >Pschernig >Sent: Monday, June 18, 2001 5:17 PM >To: dev...@li... >Subject: Re: [Dev-C++] Reading GCC output > > > > I apologize for not being clear. I am coding a small IDE that invokes >the GCC compiler, just > > like Dev-C++ does. Dev-C++ catches the output produced by GCC and displays >the errors, > > warnings, and other GCC output at the bottom of the program. I would like >to know how to do > > just that: invoke GCC from my program, catch the output, and display it. I >know how to invoke > > GCC and display any output, but I do not know how to catch the output. >Could someone point me > > in the right direction? Thanks in advance. > >Hi, i don't know why the source code you posted doesn't work. I'm using >basically the same code in my programs. The program below works fine for me >under win98, i'm using the code to catch output for another program, but it >seems to work with 'gcc' just the same. > >I didn't look at your code in detail, but it's almost the same procedure: > >Cerate a temporary file, redirect the output from the called command into >that file, then read the contents of the temporary file and delete the file. > >I compiled with 'gcc -mwindows -O3 -s -o catch.exe catch.c', but should of >course work with a dev-c++ project as well. > >(Warning: This code may contain all sort of mistakes and bugs)(but i hope it >does work) > >Elias Pschernig > >-- catch.c >#include <windows.h> > >void execute(char *command) { > char tempdir[1024]; > char tempfile[1024]; > STARTUPINFO sui; > PROCESS_INFORMATION pi; > HANDLE capture; > > GetTempPath(1024, tempdir); > GetTempFileName(tempdir, "bla", 0, tempfile); > > capture=CreateFile(tempfile,GENERIC_READ|GENERIC_WRITE,0,NULL, > CREATE_ALWAYS,FILE_ATTRIBUTE_TEMPORARY,NULL); > > memset(&sui,0,sizeof sui); > > sui.cb = sizeof sui; > sui.lpTitle = "my redir"; > sui.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; > sui.hStdOutput = capture; > sui.hStdError = capture; > sui.hStdInput = NULL; > sui.wShowWindow = SW_HIDE; > > if(CreateProcess(NULL, command, > NULL, NULL, TRUE, 0, NULL, tempdir, &sui, &pi)) { > > char *buffer; > DWORD size; > > WaitForSingleObject(pi.hProcess, INFINITE); > > SetFilePointer(capture, 0, NULL, FILE_BEGIN); > size = GetFileSize(capture, NULL); > buffer = alloca(size+1); > > ReadFile(capture, buffer, size, &size, NULL); > buffer[size] = 0; > > CloseHandle(capture); > > CloseHandle(pi.hThread); > CloseHandle(pi.hProcess); > > DeleteFile(tempfile); > > MessageBox(NULL,buffer,"Captured Output",MB_OK); > > } else { > MessageBox(NULL,command,"Error: Could not execute",MB_OK); > } > >} > >int WINAPI WinMain(HINSTANCE hinst,HINSTANCE prev,LPSTR arg,int show) { > execute("gcc -v"); > return 0; >} > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >http://lists.sourceforge.net/lists/listinfo/dev-cpp-users >--- >Incoming mail is certified Virus Free by AVG >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001 > >--- >Outgoing mail is certified Virus Free by AVG >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001 > > >NetZero Platinum >No Banner Ads and Unlimited Access >Sign Up Today - Only $9.95 per month! >http://www.netzero.net > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >http://lists.sourceforge.net/lists/listinfo/dev-cpp-users _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/lists/listinfo/dev-cpp-users --- Incoming mail is certified Virus Free by AVG Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001 --- Outgoing mail is certified Virus Free by AVG Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001 NetZero Platinum No Banner Ads and Unlimited Access Sign Up Today - Only $9.95 per month! http://www.netzero.net |