dev-cpp-users Mailing List for Dev-C++ (Page 2)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(24) |
2
(12) |
3
(10) |
4
(5) |
5
(30) |
6
(6) |
7
(18) |
8
(17) |
9
(36) |
10
(22) |
11
(7) |
12
(3) |
13
(10) |
14
(31) |
15
(6) |
16
(18) |
17
(18) |
18
(24) |
19
(9) |
20
(11) |
21
(43) |
22
(18) |
23
(32) |
24
(51) |
25
(38) |
26
(14) |
27
(12) |
28
(5) |
29
(24) |
30
(31) |
31
(12) |
|
|
From: Marc H. <ma...@e-...> - 2002-10-30 11:43:04
|
To Ioannis, Funny thing is I was reading an old Turbo C reference guide I have lying around that mentioned linking Turbo C and Turbo Fortran (was it called that?). Borland seemed to very proud of this cross language linking. There are some difficulties with function name decoration and what-not that you need to be aware of. I can't quite recall what they were, but I'll try to remember to take a look this evening. I'm not sure if the same advice will apply here since it is clearly different compilers, but it may give you an idea. I'd still look on the net for info specific to the compilers you want to use. To Per, Is there anything you don't know anything about? (LOL). I don't recall if the above mentioned book mentioned any difficulties with multi-dimensional arrays. Besides, as far as I'm aware, C uses arrays of arrays and not multi-dimensional arrays, so would the trick not be to set your arrays up in the same way that Fortran does? _____________________________ Marc Heiligers -----Original Message----- From: Per Westermark [mailto:pw...@ia...] Sent: 30 October 2002 11:40 AM To: Ioannis Vranos Cc: Dev-C++ Mailing List Subject: RE: [Dev-C++] Mixed Language Programming w/Dev-Cpp I think there might be acoule of gotchas more to think about. Doesn't fortran have the reversed row/column order for multi-dimensional arrays? Anyway, I assume that there already exists excellent FAQ documents for this kind of problems. /Per W On Wed, 30 Oct 2002, Ioannis Vranos wrote: > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...] On Behalf > > Of Scott Williams > > Sent: Tuesday, October 29, 2002 10:34 PM > > To: Dev-Cpp-Users@Lists. Sourceforge. Net > > Subject: [Dev-C++] Mixed Language Programming w/Dev-Cpp > > > > > > Hi, > > > > Wondering if anyone has experience with mixed language programming > > and whether it can be done with Dev-Cpp? > > > > In particular, I'm writing a mathematical simulation in C > > (using Dev-Cpp) > > and would like to make using of some existing numerical > > routines in Fortran. > > My C knowledge is necessity-based self-taught and so limited; > > don't know > > anything about Fortran. Neither do I know much about using > > compilers/linkers/etc in command line mode (which is why I > > use Dev-Cpp--I > > let it worry about that stuff). > > > > Still, I know that built-in to the gcc interface is the g77 > > compiler so > > there must be a way to compile the fortran source to an > > object with g77 and > > then link to & call the routines from C. Could it be as > > simple as added > > fortran source files to my Dev-Cpp project? If so, any > > thoughts on how to > > prototype the Fortran functions & subfunctions to make them > > accessible to > > the C calling routines? > > > Well if you download the whole MINGW distribution it contains a > Fortran compiler. In theory as i can think of it, if you compile your > fortran source code files to .o files and use C-style declarations of > those functions in your C source code, you should be able to use them. > > > Ioannis > > * Ioannis Vranos > * Programming pages: http://www.noicys.freeurl.com > * Alternative URL: http://run.to/noicys > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Per W. <pw...@ia...> - 2002-10-30 11:41:12
|
You want a *.a library file, not a *.lib library file. Anyway, this isn't a problem, since you are not going to build wxWindows with Dev-C++, but with your MinGW compiler. There are already working make file for use with the MinGW compiler, so you will build from the command line. If you do download the wxWindows source, there is an excellent document describing the few steps you have to perform, to configure the wxWindows build environment, and perform the build on a Windows platform. /Per W On Wed, 30 Oct 2002, Luc Saint-Elie wrote: > Thanks Per, > > Its what I suspected .. > Another question (this could seem stupid, and probably is, but I'm not very > at ease with this building stuff). > > Can I build 2.3.3 (or any other release) with Borland C++ 5.5 (free command > line tool) and use the result with dev-c++ ? > > (the reason is that Borland C++ was the first compiler that I set up when I > was looking for a compiler to learn C++, and I have it set up correctly and > running, but I prefer by far Dev-C++) > > Luc > > At 10:32 30/10/2002 +0100, Per Westermark wrote: > >wxWindows stable is 2.2.9 > > > >The 2.3.3 version you have seen is a development version. If you wan't to > >use versino 2.3.3 you have to download and build a library yourself, and > >then set Dev-C++ to use the new library and the new include files. > > > >/Per W > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Carlos d. M. <cg...@wo...> - 2002-10-30 11:08:23
|
Menu Tools->compiler options->linker->do not create a console window pr...@le... escribi=F3: > Thanks Carlos, > That was enlightening. But isn't there a way to override the unit from > being created as a console app? I didn't find any option like that in t= he > DevC++ GUI, so I figure it must be part of the command line parameters. > > Pranav Negandhi > Software Engineering > Learnet India Limited, Mumbai. > Phone: 91-22-859 8042 Ext: 316 > http://www.learnetindia.com > > <snip> > What I imagine is that, although you should have a warning of undefined > reference to WinMain@32, it compiled the unit as a console app, so when= you > run it it creates at first a console, but after it works creating the > window. > <snip> |
From: Ioannis V. <no...@ho...> - 2002-10-30 10:33:43
|
> -----Original Message----- > From: Per Westermark [mailto:pw...@ia...] > Sent: Wednesday, October 30, 2002 11:40 AM > To: Ioannis Vranos > Cc: Dev-C++ Mailing List > Subject: RE: [Dev-C++] Mixed Language Programming w/Dev-Cpp > > > I think there might be acoule of gotchas more to think about. > > Doesn't fortran have the reversed row/column order for > multi-dimensional > arrays? I do not remember anything from Fortran except that it allows for counters in loops i, j etc.. But what you mentioned sounds like a syntax issue rather than an implementation issue. > > Anyway, I assume that there already exists excellent FAQ documents for > this kind of problems. Probably. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL: http://run.to/noicys |
From: Luc Saint-E. <lu...@re...> - 2002-10-30 09:53:01
|
Thanks Per, Its what I suspected .. Another question (this could seem stupid, and probably is, but I'm not very at ease with this building stuff). Can I build 2.3.3 (or any other release) with Borland C++ 5.5 (free command line tool) and use the result with dev-c++ ? (the reason is that Borland C++ was the first compiler that I set up when I was looking for a compiler to learn C++, and I have it set up correctly and running, but I prefer by far Dev-C++) Luc At 10:32 30/10/2002 +0100, Per Westermark wrote: >wxWindows stable is 2.2.9 > >The 2.3.3 version you have seen is a development version. If you wan't to >use versino 2.3.3 you have to download and build a library yourself, and >then set Dev-C++ to use the new library and the new include files. > >/Per W |
From: Per W. <pw...@ia...> - 2002-10-30 09:40:13
|
I think there might be acoule of gotchas more to think about. Doesn't fortran have the reversed row/column order for multi-dimensional arrays? Anyway, I assume that there already exists excellent FAQ documents for this kind of problems. /Per W On Wed, 30 Oct 2002, Ioannis Vranos wrote: > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...] On Behalf > > Of Scott Williams > > Sent: Tuesday, October 29, 2002 10:34 PM > > To: Dev-Cpp-Users@Lists. Sourceforge. Net > > Subject: [Dev-C++] Mixed Language Programming w/Dev-Cpp > > > > > > Hi, > > > > Wondering if anyone has experience with mixed language programming and > > whether it can be done with Dev-Cpp? > > > > In particular, I'm writing a mathematical simulation in C > > (using Dev-Cpp) > > and would like to make using of some existing numerical > > routines in Fortran. > > My C knowledge is necessity-based self-taught and so limited; > > don't know > > anything about Fortran. Neither do I know much about using > > compilers/linkers/etc in command line mode (which is why I > > use Dev-Cpp--I > > let it worry about that stuff). > > > > Still, I know that built-in to the gcc interface is the g77 > > compiler so > > there must be a way to compile the fortran source to an > > object with g77 and > > then link to & call the routines from C. Could it be as > > simple as added > > fortran source files to my Dev-Cpp project? If so, any > > thoughts on how to > > prototype the Fortran functions & subfunctions to make them > > accessible to > > the C calling routines? > > > Well if you download the whole MINGW distribution it contains a Fortran > compiler. In theory as i can think of it, if you compile your fortran > source code files to .o files and use C-style declarations of those > functions in your C source code, you should be able to use them. > > > Ioannis > > * Ioannis Vranos > * Programming pages: http://www.noicys.freeurl.com > * Alternative URL: http://run.to/noicys > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Per W. <pw...@ia...> - 2002-10-30 09:36:33
|
Since your include file - Control.h - doesn't contain any implementation of OnInitPopup, you have to locate a source (*.cpp) file that contains the implementation, or an object file or library that contains the method. Add this source/object/lib to your project. /Per W On Tue, 29 Oct 2002, Napoleon Ahiable wrote: > Hi, > > I have this "Undefined reference error" ... > > ------------------------------------------------------------- > Building Makefile: "C:\Projects\DocuSort\Makefile.win" > Executing make... > mingw32-make.exe -f "C:\Projects\DocuSort\Makefile.win" all > g++.exe -c Ctrl.cpp -o Ctrl.o -I"C:/MinGW/include" > -I"C:/Dev-Cpp/Include" -I"C:/MinGW/include/c++" -I"C:/MinGW/include" > -I"C:/Dev-Cpp/Include" -D_WIN32_IE=0x0300 -g3 -DSTRICT -s -mwindows > g++.exe Main.o Class.o Maker.o Icon.o Procedure.o Commander.o View.o > MenuTable.o Cmd.o Menu.o Exception.o Ctrl.o DocuSort_private.res -o > "DocuSort.exe" -L"C:/MinGW/lib" -L"C:/Dev-Cpp/Lib" -lcomctl32 > -I"C:/MinGW/include" -I"C:/Dev-Cpp/Include" -I"C:/MinGW/include/c++" > -I"C:/MinGW/include" -I"C:/Dev-Cpp/Include" -D_WIN32_IE=0x0300 -g3 > -DSTRICT -s -mwindows Main.o: In function `ZN4Menu5MakerD2Ev': > c:/mingw/include/c++/3.2/memory(.data$_ZTVN3Win10ControllerE+0x10): > undefined reference to `Win::Controller::OnCreate(Win::CreateData > const*, bool&)' > Main.o: In function `WinMain': > C:/Projects/DocuSort/Main.cpp:9: undefined reference to > `Win::Controller::OnInitPopup(HMENU__*, int)' mingw32-make.exe: *** > [DocuSort.exe] Error 1 Execution terminated > ----------------------------------------------------------------------- > > which i posted and was advised to make sure that the file defines the > flaged functions are added to the project. This I have checked and > seems to be okay. In fact the functions in question are defined in > Control.h which in turn is included in Ctrl.h. Below is the content of > Control.h. > > #if !defined (CONTROL_H) > #define CONTROL_H > > #include <windows.h> > #include "Window.h" > #include "Procedure.h" > > namespace Win > { > class Controller > { > friend LRESULT CALLBACK Procedure (HWND hwnd, > UINT message, WPARAM wParam, LPARAM lParam); > > void SetWindowHandle (HWND hwnd) { _h = hwnd; } > public: > virtual ~Controller () {} > virtual bool OnCreate (Win::CreateData const * create, bool & > success) throw (); > virtual bool OnDestroy () throw () > { return false; } > virtual bool OnMouseMove (int x, int y, KeyState kState) throw () > { return false; } > virtual bool OnInitPopup (HMENU menu, int pos) throw (); > protected: > HWND _h; > }; > } > > #endif > > I still however have the same error as above. I'll appreciate your help > please. > > Napoleon. > > > __________________________________________________ > Do you Yahoo!? > HotJobs - Search new jobs daily now > http://hotjobs.yahoo.com/ > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Per W. <pw...@ia...> - 2002-10-30 09:32:33
|
wxWindows stable is 2.2.9 The 2.3.3 version you have seen is a development version. If you wan't to use versino 2.3.3 you have to download and build a library yourself, and then set Dev-C++ to use the new library and the new include files. /Per W On Wed, 30 Oct 2002, Luc Saint-Elie wrote: > Hello, > > I downloaded wxWindows package and the install works like a charm (Dev-CPP > 4.9.6.6). > The only problem is that the packaged version is 2.2.9 and now wxWindows is > currently in version 2.3.3. > > How can I update my setup (without breaking anything) or How can I make a > package? > > Thanks in advance > > Luc > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Ioannis V. <no...@ho...> - 2002-10-30 09:26:44
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Scott Williams > Sent: Tuesday, October 29, 2002 10:34 PM > To: Dev-Cpp-Users@Lists. Sourceforge. Net > Subject: [Dev-C++] Mixed Language Programming w/Dev-Cpp >=20 >=20 > Hi, >=20 > Wondering if anyone has experience with mixed language programming and > whether it can be done with Dev-Cpp? >=20 > In particular, I'm writing a mathematical simulation in C=20 > (using Dev-Cpp) > and would like to make using of some existing numerical=20 > routines in Fortran. > My C knowledge is necessity-based self-taught and so limited;=20 > don't know > anything about Fortran. Neither do I know much about using > compilers/linkers/etc in command line mode (which is why I=20 > use Dev-Cpp--I > let it worry about that stuff). >=20 > Still, I know that built-in to the gcc interface is the g77=20 > compiler so > there must be a way to compile the fortran source to an=20 > object with g77 and > then link to & call the routines from C. Could it be as=20 > simple as added > fortran source files to my Dev-Cpp project? If so, any=20 > thoughts on how to > prototype the Fortran functions & subfunctions to make them=20 > accessible to > the C calling routines? Well if you download the whole MINGW distribution it contains a Fortran compiler. In theory as i can think of it, if you compile your fortran source code files to .o files and use C-style declarations of those functions in your C source code, you should be able to use them. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL: http://run.to/noicys |
From: Luc Saint-E. <lu...@re...> - 2002-10-30 08:50:03
|
Hello, I downloaded wxWindows package and the install works like a charm (Dev-CPP 4.9.6.6). The only problem is that the packaged version is 2.2.9 and now wxWindows is currently in version 2.3.3. How can I update my setup (without breaking anything) or How can I make a package? Thanks in advance Luc |
From: Per W. <pw...@ia...> - 2002-10-30 08:34:31
|
And besides, the function prototypes below are of the normal fortran quality, since - at least for all old fortran standrds - the language haven't been known to support very long symbol names. I'm a but rusty, but isn't it somewhere around 6 characters that's the limit? There isn't many people tht would call Fortran code beautiful, but that's the language. /Per W On Wed, 30 Oct 2002, Scott Williams wrote: > Well. . . there wasn't any 'code' in my message, just a sketch of the > fortran subroutine prototypes I'm trying to call from c. If you read my > message, you'll note the source of the 'code' is an existing numerical > package. The author's standards of variable naming/white space use are of > little concern to me and certainly have nothing to do with the question > posed. > > Scott > > -----Original Message----- > From: Daniel Glenfield [mailto:sp...@ho...] > Sent: Wednesday, October 30, 2002 3:08 AM > To: se...@al...; dev...@li... > Subject: Re: [Dev-C++] Mixed Language Programming w/Dev-Cpp > > > That is really ugly code! I'm sorry but please give variables meaningful > names! And use Whitespace! > > Sorry, I've been reading Code Complete recently. Excellent book - by Steve > McConnell. A bit dated in places but excellent for ALL programmers (language > and experience independent). > > > >From: "Scott Williams" Reply-To: To: "Dev-Cpp-Users@Lists. Sourceforge. > >Net" Subject: [Dev-C++] Mixed Language Programming w/Dev-Cpp Date: Tue, 29 > >Oct 2002 15:33:56 -0500 > > > >Hi, > > > >Wondering if anyone has experience with mixed language programming and > >whether it can be done with Dev-Cpp? > > > >In particular, I'm writing a mathematical simulation in C (using Dev-Cpp) > >and would like to make using of some existing numerical routines in > >Fortran. My C knowledge is necessity-based self-taught and so limited; > >don't know anything about Fortran. Neither do I know much about using > >compilers/linkers/etc in command line mode (which is why I use Dev-Cpp--I > >let it worry about that stuff). > > > >Still, I know that built-in to the gcc interface is the g77 compiler so > >there must be a way to compile the fortran source to an object with g77 and > >then link to & call the routines from C. Could it be as simple as added > >fortran source files to my Dev-Cpp project? If so, any thoughts on how to > >prototype the Fortran functions & subfunctions to make them accessible to > >the C calling routines? > > > >BTW, I've tried f2c but have been unable to make that work. That approach > >is suboptimal anyway because the resulting C code is far less efficient > >than the original Fortran source. > > > >Perhaps specifics would help. The fortran code I'm trying to use is a > >single file ode.f The entry point is the subroutine ode. Here's how the > >file is laid out: > > > >// ode.f > > > >subroutine ode(f,neqn,y,t,tout,relerr,abserr,iflag,work,iwork) implicit > >real*8(a-h,o-z) > > > >c f -- double precision subroutine f(t,y,yp) to evaluate c derivatives > >yp(i)=dy(i)/dt c neqn -- number of equations to be integrated (integer*4) c > >y(*) -- solution vector at t (real*8) c t -- independent variable (real*8) > >c tout -- point at which solution is desired (real*8) c relerr,abserr -- > >relative and absolute error tolerances for local c error test (real*8). at > >each step the code requires c dabs(local error) .le. dabs(y)*relerr + > >abserr c for each component of the local error and solution vectors c iflag > >-- indicates status of integration (integer*4) c work(*) (real*8) -- arrays > >to hold information internal to c iwork(*) (integer*4) which is necessary > >for subsequent calls > > > >. . . ode calls de: subroutine de(f,neqn,y,t,tout,relerr,abserr,iflag, 1 > >yy,wt,p,yp,ypout,phi,alpha,beta,sig,v,w,g,phase1,psi,x,h,hold, 2 > >start,told,delsgn,ns,nornd,k,kold,isnold) implicit real*8(a-h,o-z) > > > >. . . de calls step & intrp: subroutine step(x,y,f,neqn,h,eps,wt,start, 1 > >hold,k,kold,crash,phi,p,yp,psi, 2 alpha,beta,sig,v,w,g,phase1,ns,nornd) > >implicit real*8(a-h,o-z) > > > >subroutine intrp(x,y,xout,yout,ypout,neqn,kold,phi,psi) implicit > >real*8(a-h,o-z) // end ode.f > > > >The derivative function f is written in C (and that's where I was having > >probs with the f2c route). > > > >All help is appreciated (sorry for the long post). > > > >Scott > > > > > > > >------------------------------------------------------- This sf.net email > >is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf > >_______________________________________________ Dev-cpp-users mailing list > >Dev...@li... TO UNSUBSCRIBE: > >http://www.noicys.cjb.net/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Daniel G. <sp...@ho...> - 2002-10-30 08:34:24
|
How easy is it to write code to monitor ports? Say you wanted to watch what was happening at port 80 (which is where http packets are retrieved (correct?)) would it be easy for an intermediate programmer? Would it require many hours of work? Could you set up a text file to store activity and then look at it after? I've not done anyhting like this before so any advice would be great. I'm just interested to know that's all. Daniel _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp |
From: Daniel G. <sp...@ho...> - 2002-10-30 08:31:43
|
LOL oh yes! Quite right, I apologise. Still, in my browser it looks a little difficult to read. It's early here lol. Once again sorry about that. Still, Code Complete is a very good book ;) >From: "Scott Williams" <se...@al...> >Reply-To: <se...@al...> >To: "Daniel Glenfield" ><sp...@ho...>,<dev...@li...> >Subject: RE: [Dev-C++] Mixed Language Programming w/Dev-Cpp >Date: Wed, 30 Oct 2002 03:23:17 -0500 > >Well. . . there wasn't any 'code' in my message, just a sketch of the >fortran subroutine prototypes I'm trying to call from c. If you read my >message, you'll note the source of the 'code' is an existing numerical >package. The author's standards of variable naming/white space use are of >little concern to me and certainly have nothing to do with the question >posed. > >Scott > >-----Original Message----- >From: Daniel Glenfield [mailto:sp...@ho...] >Sent: Wednesday, October 30, 2002 3:08 AM >To: se...@al...; dev...@li... >Subject: Re: [Dev-C++] Mixed Language Programming w/Dev-Cpp > > >That is really ugly code! I'm sorry but please give variables meaningful >names! And use Whitespace! > >Sorry, I've been reading Code Complete recently. Excellent book - by Steve >McConnell. A bit dated in places but excellent for ALL programmers >(language >and experience independent). > > > >From: "Scott Williams" Reply-To: To: "Dev-Cpp-Users@Lists. Sourceforge. > >Net" Subject: [Dev-C++] Mixed Language Programming w/Dev-Cpp Date: Tue, >29 > >Oct 2002 15:33:56 -0500 > > > >Hi, > > > >Wondering if anyone has experience with mixed language programming and > >whether it can be done with Dev-Cpp? > > > >In particular, I'm writing a mathematical simulation in C (using Dev-Cpp) > >and would like to make using of some existing numerical routines in > >Fortran. My C knowledge is necessity-based self-taught and so limited; > >don't know anything about Fortran. Neither do I know much about using > >compilers/linkers/etc in command line mode (which is why I use Dev-Cpp--I > >let it worry about that stuff). > > > >Still, I know that built-in to the gcc interface is the g77 compiler so > >there must be a way to compile the fortran source to an object with g77 >and > >then link to & call the routines from C. Could it be as simple as added > >fortran source files to my Dev-Cpp project? If so, any thoughts on how to > >prototype the Fortran functions & subfunctions to make them accessible to > >the C calling routines? > > > >BTW, I've tried f2c but have been unable to make that work. That approach > >is suboptimal anyway because the resulting C code is far less efficient > >than the original Fortran source. > > > >Perhaps specifics would help. The fortran code I'm trying to use is a > >single file ode.f The entry point is the subroutine ode. Here's how the > >file is laid out: > > > >// ode.f > > > >subroutine ode(f,neqn,y,t,tout,relerr,abserr,iflag,work,iwork) implicit > >real*8(a-h,o-z) > > > >c f -- double precision subroutine f(t,y,yp) to evaluate c derivatives > >yp(i)=dy(i)/dt c neqn -- number of equations to be integrated (integer*4) >c > >y(*) -- solution vector at t (real*8) c t -- independent variable >(real*8) > >c tout -- point at which solution is desired (real*8) c relerr,abserr -- > >relative and absolute error tolerances for local c error test (real*8). >at > >each step the code requires c dabs(local error) .le. dabs(y)*relerr + > >abserr c for each component of the local error and solution vectors c >iflag > >-- indicates status of integration (integer*4) c work(*) (real*8) -- >arrays > >to hold information internal to c iwork(*) (integer*4) which is necessary > >for subsequent calls > > > >. . . ode calls de: subroutine de(f,neqn,y,t,tout,relerr,abserr,iflag, 1 > >yy,wt,p,yp,ypout,phi,alpha,beta,sig,v,w,g,phase1,psi,x,h,hold, 2 > >start,told,delsgn,ns,nornd,k,kold,isnold) implicit real*8(a-h,o-z) > > > >. . . de calls step & intrp: subroutine step(x,y,f,neqn,h,eps,wt,start, 1 > >hold,k,kold,crash,phi,p,yp,psi, 2 alpha,beta,sig,v,w,g,phase1,ns,nornd) > >implicit real*8(a-h,o-z) > > > >subroutine intrp(x,y,xout,yout,ypout,neqn,kold,phi,psi) implicit > >real*8(a-h,o-z) // end ode.f > > > >The derivative function f is written in C (and that's where I was having > >probs with the f2c route). > > > >All help is appreciated (sorry for the long post). > > > >Scott > > > > > > > >------------------------------------------------------- This sf.net email > >is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf > >_______________________________________________ Dev-cpp-users mailing >list > >Dev...@li... TO UNSUBSCRIBE: > >http://www.noicys.cjb.net/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >_________________________________________________________________ >Surf the Web without missing calls! Get MSN Broadband. >http://resourcecenter.msn.com/access/plans/freeactivation.asp > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Get faster connections -- switch to MSN Internet Access! http://resourcecenter.msn.com/access/plans/default.asp |
From: Zubillaga F. <FZu...@ik...> - 2002-10-30 08:28:14
|
I have install dev-c++ on win2000 and works ok. I have tried to install it over Linux (mandrake 8.2) and I cannot make it work. The installation goes OK. Then I execute the file devcpp (I think that is called like that) and nothing happens. I execute a "ps" Unix command (ps -ef|grep devcpp) to see if the process was created, and it was. I think that I miss an X module to display the application. Please does anyone know what is going on? thanks Fernando |
From: Scott W. <se...@al...> - 2002-10-30 08:23:08
|
Well. . . there wasn't any 'code' in my message, just a sketch of the fortran subroutine prototypes I'm trying to call from c. If you read my message, you'll note the source of the 'code' is an existing numerical package. The author's standards of variable naming/white space use are of little concern to me and certainly have nothing to do with the question posed. Scott -----Original Message----- From: Daniel Glenfield [mailto:sp...@ho...] Sent: Wednesday, October 30, 2002 3:08 AM To: se...@al...; dev...@li... Subject: Re: [Dev-C++] Mixed Language Programming w/Dev-Cpp That is really ugly code! I'm sorry but please give variables meaningful names! And use Whitespace! Sorry, I've been reading Code Complete recently. Excellent book - by Steve McConnell. A bit dated in places but excellent for ALL programmers (language and experience independent). >From: "Scott Williams" Reply-To: To: "Dev-Cpp-Users@Lists. Sourceforge. >Net" Subject: [Dev-C++] Mixed Language Programming w/Dev-Cpp Date: Tue, 29 >Oct 2002 15:33:56 -0500 > >Hi, > >Wondering if anyone has experience with mixed language programming and >whether it can be done with Dev-Cpp? > >In particular, I'm writing a mathematical simulation in C (using Dev-Cpp) >and would like to make using of some existing numerical routines in >Fortran. My C knowledge is necessity-based self-taught and so limited; >don't know anything about Fortran. Neither do I know much about using >compilers/linkers/etc in command line mode (which is why I use Dev-Cpp--I >let it worry about that stuff). > >Still, I know that built-in to the gcc interface is the g77 compiler so >there must be a way to compile the fortran source to an object with g77 and >then link to & call the routines from C. Could it be as simple as added >fortran source files to my Dev-Cpp project? If so, any thoughts on how to >prototype the Fortran functions & subfunctions to make them accessible to >the C calling routines? > >BTW, I've tried f2c but have been unable to make that work. That approach >is suboptimal anyway because the resulting C code is far less efficient >than the original Fortran source. > >Perhaps specifics would help. The fortran code I'm trying to use is a >single file ode.f The entry point is the subroutine ode. Here's how the >file is laid out: > >// ode.f > >subroutine ode(f,neqn,y,t,tout,relerr,abserr,iflag,work,iwork) implicit >real*8(a-h,o-z) > >c f -- double precision subroutine f(t,y,yp) to evaluate c derivatives >yp(i)=dy(i)/dt c neqn -- number of equations to be integrated (integer*4) c >y(*) -- solution vector at t (real*8) c t -- independent variable (real*8) >c tout -- point at which solution is desired (real*8) c relerr,abserr -- >relative and absolute error tolerances for local c error test (real*8). at >each step the code requires c dabs(local error) .le. dabs(y)*relerr + >abserr c for each component of the local error and solution vectors c iflag >-- indicates status of integration (integer*4) c work(*) (real*8) -- arrays >to hold information internal to c iwork(*) (integer*4) which is necessary >for subsequent calls > >. . . ode calls de: subroutine de(f,neqn,y,t,tout,relerr,abserr,iflag, 1 >yy,wt,p,yp,ypout,phi,alpha,beta,sig,v,w,g,phase1,psi,x,h,hold, 2 >start,told,delsgn,ns,nornd,k,kold,isnold) implicit real*8(a-h,o-z) > >. . . de calls step & intrp: subroutine step(x,y,f,neqn,h,eps,wt,start, 1 >hold,k,kold,crash,phi,p,yp,psi, 2 alpha,beta,sig,v,w,g,phase1,ns,nornd) >implicit real*8(a-h,o-z) > >subroutine intrp(x,y,xout,yout,ypout,neqn,kold,phi,psi) implicit >real*8(a-h,o-z) // end ode.f > >The derivative function f is written in C (and that's where I was having >probs with the f2c route). > >All help is appreciated (sorry for the long post). > >Scott > > > >------------------------------------------------------- This sf.net email >is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf >_______________________________________________ Dev-cpp-users mailing list >Dev...@li... TO UNSUBSCRIBE: >http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp |
From: Daniel G. <sp...@ho...> - 2002-10-30 08:08:33
|
That is really ugly code! I'm sorry but please give variables meaningful names! And use Whitespace! Sorry, I've been reading Code Complete recently. Excellent book - by Steve McConnell. A bit dated in places but excellent for ALL programmers (language and experience independent). >From: "Scott Williams" Reply-To: To: "Dev-Cpp-Users@Lists. Sourceforge. >Net" Subject: [Dev-C++] Mixed Language Programming w/Dev-Cpp Date: Tue, 29 >Oct 2002 15:33:56 -0500 > >Hi, > >Wondering if anyone has experience with mixed language programming and >whether it can be done with Dev-Cpp? > >In particular, I'm writing a mathematical simulation in C (using Dev-Cpp) >and would like to make using of some existing numerical routines in >Fortran. My C knowledge is necessity-based self-taught and so limited; >don't know anything about Fortran. Neither do I know much about using >compilers/linkers/etc in command line mode (which is why I use Dev-Cpp--I >let it worry about that stuff). > >Still, I know that built-in to the gcc interface is the g77 compiler so >there must be a way to compile the fortran source to an object with g77 and >then link to & call the routines from C. Could it be as simple as added >fortran source files to my Dev-Cpp project? If so, any thoughts on how to >prototype the Fortran functions & subfunctions to make them accessible to >the C calling routines? > >BTW, I've tried f2c but have been unable to make that work. That approach >is suboptimal anyway because the resulting C code is far less efficient >than the original Fortran source. > >Perhaps specifics would help. The fortran code I'm trying to use is a >single file ode.f The entry point is the subroutine ode. Here's how the >file is laid out: > >// ode.f > >subroutine ode(f,neqn,y,t,tout,relerr,abserr,iflag,work,iwork) implicit >real*8(a-h,o-z) > >c f -- double precision subroutine f(t,y,yp) to evaluate c derivatives >yp(i)=dy(i)/dt c neqn -- number of equations to be integrated (integer*4) c >y(*) -- solution vector at t (real*8) c t -- independent variable (real*8) >c tout -- point at which solution is desired (real*8) c relerr,abserr -- >relative and absolute error tolerances for local c error test (real*8). at >each step the code requires c dabs(local error) .le. dabs(y)*relerr + >abserr c for each component of the local error and solution vectors c iflag >-- indicates status of integration (integer*4) c work(*) (real*8) -- arrays >to hold information internal to c iwork(*) (integer*4) which is necessary >for subsequent calls > >. . . ode calls de: subroutine de(f,neqn,y,t,tout,relerr,abserr,iflag, 1 >yy,wt,p,yp,ypout,phi,alpha,beta,sig,v,w,g,phase1,psi,x,h,hold, 2 >start,told,delsgn,ns,nornd,k,kold,isnold) implicit real*8(a-h,o-z) > >. . . de calls step & intrp: subroutine step(x,y,f,neqn,h,eps,wt,start, 1 >hold,k,kold,crash,phi,p,yp,psi, 2 alpha,beta,sig,v,w,g,phase1,ns,nornd) >implicit real*8(a-h,o-z) > >subroutine intrp(x,y,xout,yout,ypout,neqn,kold,phi,psi) implicit >real*8(a-h,o-z) // end ode.f > >The derivative function f is written in C (and that's where I was having >probs with the f2c route). > >All help is appreciated (sorry for the long post). > >Scott > > > >------------------------------------------------------- This sf.net email >is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf >_______________________________________________ Dev-cpp-users mailing list >Dev...@li... TO UNSUBSCRIBE: >http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp |
From: Teodorescu C. <te...@xt...> - 2002-10-30 07:39:33
|
André Macário Barros wrote: >Gentelmen, > > Sorry about the off-topic question, but let me know if you can help: > > 1. Consider the following Class > Class any{ > public: > any (int x=0, int y=0, int z=0); > void dummy_func1(); > void not_so_dummy_func2(); > void very_important_func3(); > void only_for_bad_boys_func4(); > private: > int x; > int y; > int z; > }; > > 2. Let suppose 3 different groups of users (supose programmers): > "The dummies", "The Nerds", and "The Bad Boys" > > 3. I want to restrict the access to the public functions by group, >that is, dummies programs only accessing func1, nerds programs accessing >func1 to func3, and badboys programs accessing all the functions; > > 4. Is it possible do this, step 3, in C++? > On windows YES :) . Write a COM with license and authentication . Put restriction on your interface and you can use windows groups and what ever you wan't. > > 5. If item 4 is possible, is it possible in Dev-C++? How? > i don't know but you can use any ide that know COM like borland c-builder Delphi i think you can use borland compiler (i nerver tied) and of course VC ++ ($$$$) Sorry if my answer is not such explicit in how to do it.There are a lot of tutorials on web so you can use abny of them. > >Regards >André > > > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > -- Best Regards Teodorescu Cristian Liviu (te...@xt...) |
From: Napoleon A. <n_a...@ya...> - 2002-10-30 04:31:38
|
Hi, I have this "Undefined reference error" ... ------------------------------------------------------------- Building Makefile: "C:\Projects\DocuSort\Makefile.win" Executing make... mingw32-make.exe -f "C:\Projects\DocuSort\Makefile.win" all g++.exe -c Ctrl.cpp -o Ctrl.o -I"C:/MinGW/include" -I"C:/Dev-Cpp/Include" -I"C:/MinGW/include/c++" -I"C:/MinGW/include" -I"C:/Dev-Cpp/Include" -D_WIN32_IE=0x0300 -g3 -DSTRICT -s -mwindows g++.exe Main.o Class.o Maker.o Icon.o Procedure.o Commander.o View.o MenuTable.o Cmd.o Menu.o Exception.o Ctrl.o DocuSort_private.res -o "DocuSort.exe" -L"C:/MinGW/lib" -L"C:/Dev-Cpp/Lib" -lcomctl32 -I"C:/MinGW/include" -I"C:/Dev-Cpp/Include" -I"C:/MinGW/include/c++" -I"C:/MinGW/include" -I"C:/Dev-Cpp/Include" -D_WIN32_IE=0x0300 -g3 -DSTRICT -s -mwindows Main.o: In function `ZN4Menu5MakerD2Ev': c:/mingw/include/c++/3.2/memory(.data$_ZTVN3Win10ControllerE+0x10): undefined reference to `Win::Controller::OnCreate(Win::CreateData const*, bool&)' Main.o: In function `WinMain': C:/Projects/DocuSort/Main.cpp:9: undefined reference to `Win::Controller::OnInitPopup(HMENU__*, int)' mingw32-make.exe: *** [DocuSort.exe] Error 1 Execution terminated ----------------------------------------------------------------------- which i posted and was advised to make sure that the file defines the flaged functions are added to the project. This I have checked and seems to be okay. In fact the functions in question are defined in Control.h which in turn is included in Ctrl.h. Below is the content of Control.h. #if !defined (CONTROL_H) #define CONTROL_H #include <windows.h> #include "Window.h" #include "Procedure.h" namespace Win { class Controller { friend LRESULT CALLBACK Procedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); void SetWindowHandle (HWND hwnd) { _h = hwnd; } public: virtual ~Controller () {} virtual bool OnCreate (Win::CreateData const * create, bool & success) throw (); virtual bool OnDestroy () throw () { return false; } virtual bool OnMouseMove (int x, int y, KeyState kState) throw () { return false; } virtual bool OnInitPopup (HMENU menu, int pos) throw (); protected: HWND _h; }; } #endif I still however have the same error as above. I'll appreciate your help please. Napoleon. __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ |
From: Mark L. W. <ma...@al...> - 2002-10-29 21:40:30
|
I am trying to get my first WxWindows application started. The first thing I wanted the program to do was display a "splash" screen ala windows... The compiler said I was missing wx/splash.h and indeed I am... I downloaded the WxWindows DevPak via the check for updates in Dev-C++. Am I doing something wrong here??? Thanks in advance... Mark |
From: <h.r...@gm...> - 2002-10-29 21:37:18
|
> Hi, > > Wondering if anyone has experience with mixed language programming and > whether it can be done with Dev-Cpp? > > In particular, I'm writing a mathematical simulation in C (using Dev-Cpp) > and would like to make using of some existing numerical routines in > Fortran. > My C knowledge is necessity-based self-taught and so limited; don't know > anything about Fortran. Neither do I know much about using > compilers/linkers/etc in command line mode (which is why I use Dev-Cpp--I > let it worry about that stuff). > > Still, I know that built-in to the gcc interface is the g77 compiler so > there must be a way to compile the fortran source to an object with g77 > and > then link to & call the routines from C. Could it be as simple as added > fortran source files to my Dev-Cpp project? If so, any thoughts on how to > prototype the Fortran functions & subfunctions to make them accessible to > the C calling routines? > > BTW, I've tried f2c but have been unable to make that work. That approach > is suboptimal anyway because the resulting C code is far less efficient > than > the original Fortran source. > > Perhaps specifics would help. The fortran code I'm trying to use is a > single file ode.f The entry point is the subroutine ode. Here's how the > file is laid out: > > // ode.f > > subroutine ode(f,neqn,y,t,tout,relerr,abserr,iflag,work,iwork) > implicit real*8(a-h,o-z) > > c f -- double precision subroutine f(t,y,yp) to evaluate > c derivatives yp(i)=dy(i)/dt > c neqn -- number of equations to be integrated (integer*4) > c y(*) -- solution vector at t (real*8) > c t -- independent variable (real*8) > c tout -- point at which solution is desired (real*8) > c relerr,abserr -- relative and absolute error tolerances for local > c error test (real*8). at each step the code requires > c dabs(local error) .le. dabs(y)*relerr + abserr > c for each component of the local error and solution vectors > c iflag -- indicates status of integration (integer*4) > c work(*) (real*8) -- arrays to hold information internal to > c iwork(*) (integer*4) which is necessary for subsequent calls > > . . . ode calls de: > subroutine de(f,neqn,y,t,tout,relerr,abserr,iflag, > 1 yy,wt,p,yp,ypout,phi,alpha,beta,sig,v,w,g,phase1,psi,x,h,hold, > 2 start,told,delsgn,ns,nornd,k,kold,isnold) > implicit real*8(a-h,o-z) > > . . . de calls step & intrp: > subroutine step(x,y,f,neqn,h,eps,wt,start, > 1 hold,k,kold,crash,phi,p,yp,psi, > 2 alpha,beta,sig,v,w,g,phase1,ns,nornd) > implicit real*8(a-h,o-z) > > subroutine intrp(x,y,xout,yout,ypout,neqn,kold,phi,psi) > implicit real*8(a-h,o-z) > // end ode.f > > The derivative function f is written in C (and that's where I was having > probs with the f2c route). > > All help is appreciated (sorry for the long post). > > Scott > there are many interesting articels about this topic in the web, e.g.: Carsten A. Arnholm Mixed language programming using C++ and FORTRAN 77 at: http://home.online.no/~arnholm/cppf77.htm#Section1 If you use google for search you will find many others. Horst -- Horst Rößner Postf. 1802 52205 Stolberg ICQ ID #74808448 h.r...@gm... h.g...@t-... +++ GMX - Mail, Messaging & more http://www.gmx.net +++ NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen! |
From: Cesare P. <pad...@in...> - 2002-10-29 20:56:50
|
At 15:31 29/10/2002 +0100, Frank Wagner wrote: >Hello Cesare, > >to use the serial ports with DevC++ depends on the compiler to use >with. >As far as I know (but I'm not sure) with borland these functions are >included >in the conio.h. >There is also a conio.h that comes with the DevC++ IDE written by >Hongli Lai but I don't know whether it will compatible with borland. > >I use the cygwin system because of the ability to port these >applications to unix systems. >With cygwin the required funktions are in termios.h and fcntl.h > >If you are interested in I can send you a little example that uses the >cygwin system. It would be nice ... I use Mingw compiler. Thanks, Cesare > >Greetings > >Frank > >>>> Cesare Padovani <pad...@in...> 10/29 1:10 >>> >Does anyone know how to write to and read from an i/o port? > >In the dos version of Borland C++ there were the functions: > >void outport(int portid, int value); >int outp(int portid, int byte_value); > >located in dos.h. > >What about Dev-C++ in this area? > >Regards, Cesare Padovani > > > >------------------------------------ >Cesare Padovani >Dipartimento di Ingegneria Elettrica >Universita' degli Studi di L'Aquila >Italy >Tel. +39-0862-434432 >Fax +39-0862-434403 > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > ------------------------------------ Cesare Padovani Dipartimento di Ingegneria Elettrica Universita' degli Studi di L'Aquila Italy Tel. +39-0862-434432 Fax +39-0862-434403 |
From: Scott W. <se...@al...> - 2002-10-29 20:33:49
|
Hi, Wondering if anyone has experience with mixed language programming and whether it can be done with Dev-Cpp? In particular, I'm writing a mathematical simulation in C (using Dev-Cpp) and would like to make using of some existing numerical routines in Fortran. My C knowledge is necessity-based self-taught and so limited; don't know anything about Fortran. Neither do I know much about using compilers/linkers/etc in command line mode (which is why I use Dev-Cpp--I let it worry about that stuff). Still, I know that built-in to the gcc interface is the g77 compiler so there must be a way to compile the fortran source to an object with g77 and then link to & call the routines from C. Could it be as simple as added fortran source files to my Dev-Cpp project? If so, any thoughts on how to prototype the Fortran functions & subfunctions to make them accessible to the C calling routines? BTW, I've tried f2c but have been unable to make that work. That approach is suboptimal anyway because the resulting C code is far less efficient than the original Fortran source. Perhaps specifics would help. The fortran code I'm trying to use is a single file ode.f The entry point is the subroutine ode. Here's how the file is laid out: // ode.f subroutine ode(f,neqn,y,t,tout,relerr,abserr,iflag,work,iwork) implicit real*8(a-h,o-z) c f -- double precision subroutine f(t,y,yp) to evaluate c derivatives yp(i)=dy(i)/dt c neqn -- number of equations to be integrated (integer*4) c y(*) -- solution vector at t (real*8) c t -- independent variable (real*8) c tout -- point at which solution is desired (real*8) c relerr,abserr -- relative and absolute error tolerances for local c error test (real*8). at each step the code requires c dabs(local error) .le. dabs(y)*relerr + abserr c for each component of the local error and solution vectors c iflag -- indicates status of integration (integer*4) c work(*) (real*8) -- arrays to hold information internal to c iwork(*) (integer*4) which is necessary for subsequent calls . . . ode calls de: subroutine de(f,neqn,y,t,tout,relerr,abserr,iflag, 1 yy,wt,p,yp,ypout,phi,alpha,beta,sig,v,w,g,phase1,psi,x,h,hold, 2 start,told,delsgn,ns,nornd,k,kold,isnold) implicit real*8(a-h,o-z) . . . de calls step & intrp: subroutine step(x,y,f,neqn,h,eps,wt,start, 1 hold,k,kold,crash,phi,p,yp,psi, 2 alpha,beta,sig,v,w,g,phase1,ns,nornd) implicit real*8(a-h,o-z) subroutine intrp(x,y,xout,yout,ypout,neqn,kold,phi,psi) implicit real*8(a-h,o-z) // end ode.f The derivative function f is written in C (and that's where I was having probs with the f2c route). All help is appreciated (sorry for the long post). Scott |
From: B. <ama...@uo...> - 2002-10-29 17:41:15
|
Yes, perfect both methods and the solutions suggested. Thank you. The cla= ss side, that is, when the access to the fuction members of the class is made, it is we= ll defined. Now I'm thinking in a way to discover whose program is accessing them (th= e classes). In a Unix world I could check the gid and discover which kind of user pro= gram is requesting it. And in a Win environment? Are you understanding now? How can, in a run-time mode, I can check this = access Regards Andr=E9 =3D=3D=3D Daniel Glenfield wrote: > I'd considered derived classes as a solution, but I think perhaps the > exercise (it sounds like one) involves creating a portable class - one = that > can be plugged in to a project. > > The variables specified could have been anything, so we're not sure on > whether our solutions are going to work or not. The functions are not > specified so they could do anyhting. I thought setting access via the > constructors would work better. After all, if the object was to derive = the > class into child classes the exercise would have said so surely? > > >From: "Abhijit Shylanath" <mu...@gm...> > >To: "Daniel Glenfield" > ><sp...@ho...>,<ama...@uo...>,<dev...@li...u= rceforge.net> > >Subject: Re: [Dev-C++] Off:Classes Access Restrictions > >Date: Tue, 29 Oct 2002 18:26:02 +0530 > > > >Greets, everyone. > > > > > So a superdummy could be (DummyAccess =3D true, NerdAccess =3D true= ) > > > and the function will not care what the object is named, it will ju= st > >see > > > the value of the variable for NerdAccess. If it were a string, the > >function > > > would have to be rewritten to accomodate "superdummy" > > > >I came in late (I'd disabled my mail delivery for sometime), so I may = not > >be > >talking about what you're talking about. But according to what Daniel = is > >talking about, someone wants a class, some parts of which are accessib= le to > >some dudes, other parts to other dudes. His method makes sense. Also, = it > >should be more efficient than using strings (less time to compare or > >check). > >You could also modify the method to use a flag, like > > > > Constructor(int access_mode); > > > >which could be a combination of > > > > #define FOO_MODE_DUMMY 0x01 > > #define FOO_MODE_NERD 0x02 > > > >like so: > > > > Constructor(FOO_MODE_DUMMY | FOO_MODE_NERD); > > > >Within the methods, checking would be like so: > > > > if(access_mode & FOO_MODE_NERD) > > { > > // Do nerdy stuff > > } > > > >But this method is run-time checking, and you wouldn't know what to do= if a > >dummy tries to access a nerd-only-function. Error-message? Drop to OS? > >Wouldn't it be better if there were compile-time errors? Yes, so we ha= ve > >the > >new and improved C++-style DERIVED CLASSES! Yes, with one simple wave = of > >the > >hand... never mind... how's this? > > > >class FooParent > >{ > > public: > > FooParent(); > > ~FooParent(); > > > > virtual int WhichFoo() =3D 0; > > > > private: > > int num_stuff; > >}; > > > >class FooDummy : public FooParent > >{ > > /* blah */ > >}; > > > >class FooNerd : public FooNerd > >{ > > /* different blah */ > >}; > > > >Was this what was asked? > > > >___________________________________________________________ > > > >Abhijit Shylanath > > > >E-mail: mu...@gm... || ibr...@bi... > >Web-site: http://mudeth.tripod.com/ > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp |
From: Frank W. <F.W...@wi...> - 2002-10-29 14:32:23
|
Hello Cesare, to use the serial ports with DevC++ depends on the compiler to use with. As far as I know (but I'm not sure) with borland these functions are included in the conio.h. There is also a conio.h that comes with the DevC++ IDE written by Hongli Lai but I don't know whether it will compatible with borland. I use the cygwin system because of the ability to port these applications to unix systems. With cygwin the required funktions are in termios.h and fcntl.h If you are interested in I can send you a little example that uses the cygwin system. Greetings Frank >>> Cesare Padovani <pad...@in...> 10/29 1:10 >>> Does anyone know how to write to and read from an i/o port? In the dos version of Borland C++ there were the functions: void outport(int portid, int value); int outp(int portid, int byte_value); located in dos.h. What about Dev-C++ in this area? Regards, Cesare Padovani ------------------------------------ Cesare Padovani Dipartimento di Ingegneria Elettrica Universita' degli Studi di L'Aquila Italy Tel. +39-0862-434432 Fax +39-0862-434403 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Daniel G. <sp...@ho...> - 2002-10-29 13:53:47
|
I'd considered derived classes as a solution, but I think perhaps the exercise (it sounds like one) involves creating a portable class - one that can be plugged in to a project. The variables specified could have been anything, so we're not sure on whether our solutions are going to work or not. The functions are not specified so they could do anyhting. I thought setting access via the constructors would work better. After all, if the object was to derive the class into child classes the exercise would have said so surely? >From: "Abhijit Shylanath" <mu...@gm...> >To: "Daniel Glenfield" ><sp...@ho...>,<ama...@uo...>,<dev...@li...> >Subject: Re: [Dev-C++] Off:Classes Access Restrictions >Date: Tue, 29 Oct 2002 18:26:02 +0530 > >Greets, everyone. > > > So a superdummy could be (DummyAccess = true, NerdAccess = true) > > and the function will not care what the object is named, it will just >see > > the value of the variable for NerdAccess. If it were a string, the >function > > would have to be rewritten to accomodate "superdummy" > >I came in late (I'd disabled my mail delivery for sometime), so I may not >be >talking about what you're talking about. But according to what Daniel is >talking about, someone wants a class, some parts of which are accessible to >some dudes, other parts to other dudes. His method makes sense. Also, it >should be more efficient than using strings (less time to compare or >check). >You could also modify the method to use a flag, like > > Constructor(int access_mode); > >which could be a combination of > > #define FOO_MODE_DUMMY 0x01 > #define FOO_MODE_NERD 0x02 > >like so: > > Constructor(FOO_MODE_DUMMY | FOO_MODE_NERD); > >Within the methods, checking would be like so: > > if(access_mode & FOO_MODE_NERD) > { > // Do nerdy stuff > } > >But this method is run-time checking, and you wouldn't know what to do if a >dummy tries to access a nerd-only-function. Error-message? Drop to OS? >Wouldn't it be better if there were compile-time errors? Yes, so we have >the >new and improved C++-style DERIVED CLASSES! Yes, with one simple wave of >the >hand... never mind... how's this? > >class FooParent >{ > public: > FooParent(); > ~FooParent(); > > virtual int WhichFoo() = 0; > > private: > int num_stuff; >}; > >class FooDummy : public FooParent >{ > /* blah */ >}; > >class FooNerd : public FooNerd >{ > /* different blah */ >}; > >Was this what was asked? > >___________________________________________________________ > >Abhijit Shylanath > >E-mail: mu...@gm... || ibr...@bi... >Web-site: http://mudeth.tripod.com/ _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp |