Thread: [Dev-C++] implementation .o procedure
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Santiago <sa...@ho...> - 2002-10-07 03:42:41
|
Hi, Does anyone know how use a compiled class implementation (ie: = myClass.o)? The class was defined by someone else. When theygave me the myClass.o = and it's public functions, I was asked to refer to it by using #include = "myClass.h" but that didn't work. Please let me know if you have the correct procedure. Thanks! |
|
From: Elizabeth B. <sog...@ya...> - 2002-10-07 04:48:54
|
"Santiago" <sa...@ho...> writes: > Does anyone know how use a compiled class implementation (ie: = > myClass.o)? > The class was defined by someone else. When theygave me the myClass.o = > and it's public functions, I was asked to refer to it by using #include = > "myClass.h" but that didn't work. > Please let me know if you have the correct procedure. If I understand you correctly, the implementation is in myClass.o and the interface is in myClass.h. So, that you do is add myClass.o to the list of object files you use to link. That is, in the code *you* write, you use #include "myClass.h" but the implementation is in myClass.o, so you add myClass.o to the list of files you link with. Elizabeth |
|
From: Per W. <pw...@ia...> - 2002-10-07 10:44:05
|
And you have to use the same compiler with the same settings - or whatever combination of compilers/settings that will: - generate same memory layout of objects - generate same calling conventions for the class methods - supply identical definitions of runtime library as used by class code. - ... As can be seen, it isn't so easy to just take a precompiled object file, made by someone else, and just include in a project. When you buy a software library from a vendor, you either get precompiled libraries for your compiler (debug + release [+ small/large memory model]), or you get the full source. Even under the assumption that the object file is generated with MingW, you would still like a description of which compiler switches was used when building the file. /Per W On 6 Oct 2002, Elizabeth Barham wrote: > "Santiago" <sa...@ho...> writes: > > > Does anyone know how use a compiled class implementation (ie: = > > myClass.o)? > > The class was defined by someone else. When theygave me the myClass.o = > > and it's public functions, I was asked to refer to it by using #include = > > "myClass.h" but that didn't work. > > Please let me know if you have the correct procedure. > > If I understand you correctly, the implementation is in myClass.o and > the interface is in myClass.h. > > So, that you do is add myClass.o to the list of object files you use > to link. > > That is, in the code *you* write, you use #include "myClass.h" but the > implementation is in myClass.o, so you add myClass.o to the list of > files you link with. > > Elizabeth > > > ------------------------------------------------------- > 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: Santiago <sa...@ho...> - 2002-10-13 18:28:29
|
Hi, I only have DevC++, I don't know if it's possible to use the commands gcc -c a.c and gcc -c b.c in DevC++. Anyway I'm still stuck with the first part of the process, creating a .o object file out of the implementation of a class I made. These are my questions again: 1- How do I create an object file using the implementation I created? I want someone else to use this object file so I don't have to give them my implementation code. 2- Once the object file is created, how does the user use it to compile his/her own client code? how does the user refer to the file in his/her client code by using #include "myClass.h", or "myClass.o", or both, or some other way? I'll play class creator and main creator(user) myself using DevC++ for testing purposes. I'll appreciate your help! Santiago ----- Original Message ----- From: "Elizabeth Barham" <sog...@ya...> To: "Santiago" <sa...@ho...> Sent: Monday, October 07, 2002 11:02 AM Subject: Re: [Dev-C++] implementation .o procedure > "Santiago" <sa...@ho...> writes: > > > Where do I add it? > > as an #include in *my* code? > > It is when you link the executable. > > If you have two source files, a.c and b.c, and compile them like: > > gcc -c a.c > gcc -c b.c > > you will have two files, a.o and b.o. Then it is a matter of linking > them to produce the end file: > > gcc -o test.exe a.o b.o > > The #include is in your code because that defines the interface to > myClass, which is all ready compiled and in object code format > in myClass.o. > > So to produce the executable, you'll need to do something like: > > gcc -o test.exe a.o b.o myClass.o > > In Dev-C++, you can make this occur when building using the: > > Project > Project Options > > dialog and placing "myClass.o" in the field labeled, "Linker > options/Optional Libs or Object Files" - the key words being "Object > Files" in this case (files that have the .o extension). > > Elizabeth > |
|
From: Carlos d. M. <cg...@wo...> - 2002-10-13 19:09:16
|
Santiago escribi=F3: > Hi, I only have DevC++, I don't know if it's possible to use the comman= ds > gcc -c a.c and gcc -c b.c in DevC++. Anyway I'm still stuck with the fi= rst > part of the process, creating a .o object file out of the implementatio= n of > a class I made. These are my questions again: Dev-C++ is the IDE for mingw, so you must be able to say gcc -c file.c, = you only need to have it in your path. > > 1- How do I create an object file using the implementation I created? I= want > someone else to use this object file so I don't have to give them my > implementation code. Just that, use the -c option, compile, not link. If you are speaking abou= g making one .o from various source files, that' not possible, or it should= n't (since the exe is done just by joining them) > > 2- Once the object file is created, how does the user use it to compile > his/her own client code? how does the user refer to the file in his/her > client code by using #include "myClass.h", or "myClass.o", or both, or = some > other way? #include "myClass.h", so it knows the functions used in the new code are = defined and will found its implementation somewhere in some of the files it will = link to. And ad myClass.o in the linker options/[...]object files tab of the f= irst tab of the project options. > > > I'll play class creator and main creator(user) myself using DevC++ for > testing purposes. > > I'll appreciate your help! > > Santiago > > ----- Original Message ----- > From: "Elizabeth Barham" <sog...@ya...> > To: "Santiago" <sa...@ho...> > Sent: Monday, October 07, 2002 11:02 AM > Subject: Re: [Dev-C++] implementation .o procedure > > > "Santiago" <sa...@ho...> writes: > > > > > Where do I add it? > > > as an #include in *my* code? > > > > It is when you link the executable. > > > > If you have two source files, a.c and b.c, and compile them like: > > > > gcc -c a.c > > gcc -c b.c > > > > you will have two files, a.o and b.o. Then it is a matter of linking > > them to produce the end file: > > > > gcc -o test.exe a.o b.o > > > > The #include is in your code because that defines the interface to > > myClass, which is all ready compiled and in object code format > > in myClass.o. > > > > So to produce the executable, you'll need to do something like: > > > > gcc -o test.exe a.o b.o myClass.o > > > > In Dev-C++, you can make this occur when building using the: > > > > Project > Project Options > > > > dialog and placing "myClass.o" in the field labeled, "Linker > > options/Optional Libs or Object Files" - the key words being "Object > > Files" in this case (files that have the .o extension). > > > > Elizabeth > > > > ------------------------------------------------------- > 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 Eeps! Just what Mrs Elizabeth says. (Didn't you prove that???????????????????????????????) |
|
From: Santiago <sa...@ho...> - 2002-10-13 20:48:53
|
Excuse my ignorance, How do you put mingw it in your path? Thanks for your help again Santiago ---- Original Message ----- From: "Carlos García del Monte" <cg...@wo...> To: "dev-cpp-users-list" <dev...@li...> Sent: Sunday, October 13, 2002 3:07 PM Subject: Re: [Dev-C++] implementation .o procedure Santiago escribió: > Hi, I only have DevC++, I don't know if it's possible to use the commands > gcc -c a.c and gcc -c b.c in DevC++. Anyway I'm still stuck with the first > part of the process, creating a .o object file out of the implementation of > a class I made. These are my questions again: Dev-C++ is the IDE for mingw, so you must be able to say gcc -c file.c, you only need to have it in your path. > > 1- How do I create an object file using the implementation I created? I want > someone else to use this object file so I don't have to give them my > implementation code. Just that, use the -c option, compile, not link. If you are speaking aboug making one .o from various source files, that' not possible, or it shouldn't (since the exe is done just by joining them) > > 2- Once the object file is created, how does the user use it to compile > his/her own client code? how does the user refer to the file in his/her > client code by using #include "myClass.h", or "myClass.o", or both, or some > other way? #include "myClass.h", so it knows the functions used in the new code are defined and will found its implementation somewhere in some of the files it will link to. And ad myClass.o in the linker options/[...]object files tab of the first tab of the project options. > > > I'll play class creator and main creator(user) myself using DevC++ for > testing purposes. > > I'll appreciate your help! > > Santiago > > ----- Original Message ----- > From: "Elizabeth Barham" <sog...@ya...> > To: "Santiago" <sa...@ho...> > Sent: Monday, October 07, 2002 11:02 AM > Subject: Re: [Dev-C++] implementation .o procedure > > > "Santiago" <sa...@ho...> writes: > > > > > Where do I add it? > > > as an #include in *my* code? > > > > It is when you link the executable. > > > > If you have two source files, a.c and b.c, and compile them like: > > > > gcc -c a.c > > gcc -c b.c > > > > you will have two files, a.o and b.o. Then it is a matter of linking > > them to produce the end file: > > > > gcc -o test.exe a.o b.o > > > > The #include is in your code because that defines the interface to > > myClass, which is all ready compiled and in object code format > > in myClass.o. > > > > So to produce the executable, you'll need to do something like: > > > > gcc -o test.exe a.o b.o myClass.o > > > > In Dev-C++, you can make this occur when building using the: > > > > Project > Project Options > > > > dialog and placing "myClass.o" in the field labeled, "Linker > > options/Optional Libs or Object Files" - the key words being "Object > > Files" in this case (files that have the .o extension). > > > > Elizabeth > > > > ------------------------------------------------------- > 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 Eeps! Just what Mrs Elizabeth says. (Didn't you prove that???????????????????????????????) ------------------------------------------------------- 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: Elizabeth B. <sog...@ya...> - 2002-10-13 19:41:58
|
"Santiago" <sa...@ho...> writes: > Hi, I only have DevC++, I don't know if it's possible to use the commands > gcc -c a.c and gcc -c b.c in DevC++. Anyway I'm still stuck with the first > part of the process, creating a .o object file out of the implementation of > a class I made. These are my questions again: > 1- How do I create an object file using the implementation I created? I want > someone else to use this object file so I don't have to give them my > implementation code. > 2- Once the object file is created, how does the user use it to compile > his/her own client code? how does the user refer to the file in his/her > client code by using #include "myClass.h", or "myClass.o", or both, or some > other way? > > I'll play class creator and main creator(user) myself using DevC++ for > testing purposes. > > I'll appreciate your help! Normally, to do such a thing, one makes a library, which is simply a collection of .o files. On Win32, people tend to make DLL's, which are libraries that are linked in at run-time. But, anyway, just pass the .o file (the object file) to the linker when linking the library or executable. I explained the "menu steps" in the last message. > Project > Project Options > > dialog and placing "myClass.o" in the field labeled, "Linker > options/Optional Libs or Object Files" - the key words being "Object > Files" in this case (files that have the .o extension). Elizabeth |
|
From: Santiago <sa...@ho...> - 2002-10-13 20:38:50
|
Hi Elizabeth, thank you for helping me out. I still need your help creating the .o file with DevC++ and after I have created that file, can you explain what you mean by keywords "Object Files" and where to configure that. I could only find: "Linker options/Optional Libs or Object Files" Thanks again ----- Original Message ----- From: "Elizabeth Barham" <sog...@ya...> To: "Santiago" <sa...@ho...> Cc: "dev-cpp-users-list" <dev...@li...> Sent: Sunday, October 13, 2002 3:41 PM Subject: Re: [Dev-C++] implementation .o procedure > "Santiago" <sa...@ho...> writes: > > > Hi, I only have DevC++, I don't know if it's possible to use the commands > > gcc -c a.c and gcc -c b.c in DevC++. Anyway I'm still stuck with the first > > part of the process, creating a .o object file out of the implementation of > > a class I made. These are my questions again: > > 1- How do I create an object file using the implementation I created? I want > > someone else to use this object file so I don't have to give them my > > implementation code. > > 2- Once the object file is created, how does the user use it to compile > > his/her own client code? how does the user refer to the file in his/her > > client code by using #include "myClass.h", or "myClass.o", or both, or some > > other way? > > > > I'll play class creator and main creator(user) myself using DevC++ for > > testing purposes. > > > > I'll appreciate your help! > > Normally, to do such a thing, one makes a library, which is simply a > collection of .o files. On Win32, people tend to make DLL's, which are > libraries that are linked in at run-time. > > But, anyway, just pass the .o file (the object file) to the linker > when linking the library or executable. I explained the "menu steps" > in the last message. > > > Project > Project Options > > > > dialog and placing "myClass.o" in the field labeled, "Linker > > options/Optional Libs or Object Files" - the key words being "Object > > Files" in this case (files that have the .o extension). > > Elizabeth > |
|
From: Elizabeth B. <sog...@ya...> - 2002-10-13 21:05:46
|
"Santiago" <sa...@ho...> writes:
> Hi Elizabeth, thank you for helping me out. I still need your help creating
> the .o file with DevC++ and after I have created that file, can you explain
> what you mean by keywords "Object Files" and where to configure that. I
> could only find: "Linker options/Optional Libs or Object Files"
^^^^^^ ^^^^^
After you compile a source file, you'll have an Object File (*.o).
Then you add that object file onto "Linker options/Optional Libs or
Object Files"
Elizabeth
|
|
From: Santiago <sa...@ho...> - 2002-10-14 01:52:23
|
Thanks, but I guess my question is how do you put mingw in your path? I don't know how to access mingw through command, only through DevC++. Thanks ----- Original Message ----- From: "Elizabeth Barham" <sog...@ya...> To: "Santiago" <sa...@ho...> Cc: "dev-cpp-users-list" <dev...@li...> Sent: Sunday, October 13, 2002 5:05 PM Subject: Re: [Dev-C++] implementation .o procedure > "Santiago" <sa...@ho...> writes: > > > Hi Elizabeth, thank you for helping me out. I still need your help creating > > the .o file with DevC++ and after I have created that file, can you explain > > what you mean by keywords "Object Files" and where to configure that. I > > could only find: "Linker options/Optional Libs or Object Files" > ^^^^^^ ^^^^^ > After you compile a source file, you'll have an Object File (*.o). > > Then you add that object file onto "Linker options/Optional Libs or > Object Files" > > Elizabeth > > > ------------------------------------------------------- > 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: Elizabeth B. <sog...@ya...> - 2002-10-14 02:29:22
|
"Santiago" <sa...@ho...> writes: > Thanks, but I guess my question is how do you put mingw in your > path? I don't know how to access mingw through command, only > through DevC++. But you do not need to access mingw directly to accomplish what you would like to do. I do not see what was so difficult about my or others' instructions and if you are still having trouble I suggest you study up more on compiling and linking in general. Elizabeth |
|
From: Santiago <sa...@ho...> - 2002-10-14 02:38:36
|
All I'd like to know is where to type: gcc -c a.c gcc -c b.c in DevC++. After I know that, I'll have no problem with anything else. Thanks ----- Original Message ----- From: "Elizabeth Barham" <sog...@ya...> To: "Santiago" <sa...@ho...> Cc: "dev-cpp-users-list" <dev...@li...> Sent: Sunday, October 13, 2002 10:29 PM Subject: Re: [Dev-C++] implementation .o procedure > "Santiago" <sa...@ho...> writes: > > > Thanks, but I guess my question is how do you put mingw in your > > path? I don't know how to access mingw through command, only > > through DevC++. > > But you do not need to access mingw directly to accomplish what you > would like to do. > > I do not see what was so difficult about my or others' instructions > and if you are still having trouble I suggest you study up more on > compiling and linking in general. > > Elizabeth > |
|
From: Elizabeth B. <sog...@ya...> - 2002-10-14 03:27:29
|
"Santiago" <sa...@ho...> writes: > All I'd like to know is where to type: > gcc -c a.c > gcc -c b.c > > in DevC++. *You* don't, as it is in the Makefile that Dev-C++ generates (but you can do it if you want). You just add the object file that you want to share to the line that we spoke of earlier (under Project Options). What you do is write your c/c++ code that uses the shared object file, add the shared object file in that menu thing (under Project Options), then tell Dev-C++ to compile and link your project. NOW, if you want to see how to build an object file by hand, bring up a MS-DOS shell and cd into the directory that has the a.c file (for example). Then, add the directory that has gcc in it onto your path (consult any MS-DOS tutorial on instructions of how to do this), and *in the MS-DOS shell*, type in "gcc -c a.c" (or whatever your source file is called). *But*, Dev-C++ does this for you when you tell it to compile your source code, and if you look at your directory after compiling your code, you shall see the object file just generated. THAT OBJECT FILE is the one you want to share with your friends and place on that line in the menu thing under "Project Options". Normally, however, one makes a library with the "ar" command or a DLL. Elizabeth |
|
From: Santiago <sa...@ho...> - 2002-10-14 03:40:27
|
Thanks Elizabeth, Sorry I'm so new with this. I Tried compiling myClass.cpp (implementation of myClass.h) and I don't get the .o file. I only get the .o file when I compile the userCode.cpp and the myClass.cpp together. In other words, do I have to link the implementation to userCode.cpp in order to create the .o file? Santiago ----- Original Message ----- From: "Elizabeth Barham" <sog...@ya...> To: "Santiago" <sa...@ho...> Cc: "dev-cpp-users-list" <dev...@li...> Sent: Sunday, October 13, 2002 11:27 PM Subject: Re: [Dev-C++] implementation .o procedure > "Santiago" <sa...@ho...> writes: > > > All I'd like to know is where to type: > > gcc -c a.c > > gcc -c b.c > > > > in DevC++. > > *You* don't, as it is in the Makefile that Dev-C++ generates (but you > can do it if you want). > > You just add the object file that you want to share to the line that > we spoke of earlier (under Project Options). > > What you do is write your c/c++ code that uses the shared object file, > add the shared object file in that menu thing (under Project Options), > then tell Dev-C++ to compile and link your project. > > NOW, if you want to see how to build an object file by hand, bring up > a MS-DOS shell and cd into the directory that has the a.c file (for > example). Then, add the directory that has gcc in it onto your path > (consult any MS-DOS tutorial on instructions of how to do this), and > *in the MS-DOS shell*, type in "gcc -c a.c" (or whatever your source > file is called). > > *But*, Dev-C++ does this for you when you tell it to compile your > source code, and if you look at your directory after compiling your > code, you shall see the object file just generated. THAT OBJECT FILE > is the one you want to share with your friends and place on that line > in the menu thing under "Project Options". > > Normally, however, one makes a library with the "ar" command or a DLL. > > Elizabeth > |
|
From: Elizabeth B. <sog...@ya...> - 2002-10-14 04:05:22
|
"Santiago" <sa...@ho...> writes: > Sorry I'm so new with this. I Tried compiling myClass.cpp > (implementation of myClass.h) and I don't get the .o file. I only > get the .o file when I compile the userCode.cpp and the myClass.cpp > together. When you compile source code (.c, .cpp, etc), you receive object code (.o). Granted, it is possible to compile and link in one step, but to the best of my understanding, Dev-C++ compiles (makes .o files) and links (make .exe or .dll files) in separate steps. Regardless, you should have a file entitled "myClass.o" in the same directory as "myClass.cpp" after you compile. If you are using the "File Open" dialog to check for myClass.o's existence, make sure you have it set to "All Files (*.*)" so it will show up. > In other words, do I have to link the implementation to userCode.cpp > in order to create the .o file? No. The .o (object file) is made after compiling a single source code file. Elizabeth |
|
From: Elizabeth B. <sog...@ya...> - 2002-10-14 03:34:36
|
If you still do not understand, do this:
Make a new C project and call it "testC". Then make a new C header
file entitled "testCheader.h" and type in:
#include <stdio.h>
int
tester(void)
Save it.
Then make a new C source code file entitled "testCobject.c":
#include "testCheader.h"
int tester(void) {
printf("hi.\n");
}
Save it.
Then, in Dev-C++, push the Compile button. Provided there are no
errors, look at the directory where testCobject.c was compiled - there
should be a object file entitled "testCobject.o" there. That object
file (testCobject.o) and the header file (testCheader.h) is what you
want to share with your friends.
If you want the tutorial on how to use these, let me know.
Elizabeth
|
|
From: Santiago <sa...@ho...> - 2002-10-14 03:54:30
|
Thanks I got it. Thank you very very much!
----- Original Message -----
From: "Elizabeth Barham" <sog...@ya...>
To: "Santiago" <sa...@ho...>
Cc: "dev-cpp-users-list" <dev...@li...>
Sent: Sunday, October 13, 2002 11:34 PM
Subject: Re: [Dev-C++] implementation .o procedure
> If you still do not understand, do this:
>
> Make a new C project and call it "testC". Then make a new C header
> file entitled "testCheader.h" and type in:
>
> #include <stdio.h>
>
> int
> tester(void)
>
> Save it.
>
> Then make a new C source code file entitled "testCobject.c":
>
> #include "testCheader.h"
>
> int tester(void) {
> printf("hi.\n");
> }
>
> Save it.
>
> Then, in Dev-C++, push the Compile button. Provided there are no
> errors, look at the directory where testCobject.c was compiled - there
> should be a object file entitled "testCobject.o" there. That object
> file (testCobject.o) and the header file (testCheader.h) is what you
> want to share with your friends.
>
> If you want the tutorial on how to use these, let me know.
>
> Elizabeth
>
>
> -------------------------------------------------------
> 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: Santiago <sa...@ho...> - 2002-10-19 23:19:25
|
Hi, thanks for all you help in the past. I'm studying C++ and haven't even touched windows programming with c++. I'd like to find the best possible book for my case scenario. I'm almost done with the "basics" for c++ and I'm looking to move towards windows programming. I need a book which teaches me windows from the scratch. However, I really don't know which way to go. The newer books only talk about .NET and C#, while the so called "best" C++ books are from 1998, 99 and 2000. Would it be better to go ahead and buy one of those books that talk about both or should I get done with win32 API first before I move on to .NET/C#? Or should I even bother learning .NET? A dream book would be a recent one that teaches how to built windows application using win32 API with all its latest components and then guide me through .NET This is very important for me because with the little time I have to study, I really can't afford to waist any time with the wrong or obsolete reference. I will appreciate any feedback you may provide. Thanks San |
|
From: Elizabeth B. <sog...@ya...> - 2002-10-20 00:03:11
|
"Santiago" <sa...@ho...> writes: > Hi, thanks for all you help in the past. I'm studying C++ and haven't even > touched windows programming with c++. I'd like to find the best possible > book for my case scenario. I'm almost done with the "basics" for c++ and I'm > looking to move towards windows programming. I need a book which teaches me > windows from the scratch. However, I really don't know which way to go. The > newer books only talk about .NET and C#, while the so called "best" C++ > books are from 1998, 99 and 2000. Would it be better to go ahead and buy one > of those books that talk about both or should I get done with win32 API > first before I move on to .NET/C#? Or should I even bother learning .NET? > A dream book would be a recent one that teaches how to built windows > application using win32 API with all its latest components and then guide me > through .NET > > This is very important for me because with the little time I have to study, > I really can't afford to waist any time with the wrong or obsolete > reference. > I will appreciate any feedback you may provide. > > Thanks I forget how I found out about this site, but <http://www.relisoft.com/Win32/index.htm> has a nice tutorial that combines C++ with Win32 programming. The author, Bartosz Milewski, also wrote a book that includes this topic: <http://www.amazon.com/exec/obidos/ASIN/0201699486/ref=cm_wl_ovu-pg.3-pos.3/002-2926871-2852856?coliid=I1801V7EXRPBCR> Occasionally, the book is mentioned on this list. The only win32 API book I have is the one Bartosz suggests, Rector and Newcomer's Win32 Programming, which is okay but it is aimed primarily at C programmers. <http://www.amazon.com/exec/obidos/tg/detail/-/0201634929/qid=1035072143/sr=1-1/ref=sr_1_1/002-2926871-2852856?v=glance> Just my .02. Elizabeth |
|
From: Carlos d. M. <cg...@wo...> - 2002-10-20 16:45:57
|
I agree with Mrs Elizabeth, I have "win32 programming" by Rector and Newcomer, too. Since it I achieved to make programs which work (I'm still in experimantation with the programs), and nowI understand what means the things at the Win32API programmer's reference. Reliable's tutorial is a good place for c++ windows programming, but I would recommend take a sight in Foreger's tutorial before (www.winprog.org or com) Another book you'll hear is "programming windows" by Petzold, but it is only C and i more limited than Rector's (judging with the TOC, since I haven't read Petzold's book) |
|
From: Teodorescu C. <te...@xt...> - 2002-10-21 07:33:12
|
Carlos García del Monte wrote: >I agree with Mrs Elizabeth, I have "win32 programming" by Rector and Newcomer, too. Since it I achieved to make programs >which work > why your programs does not use to work ?? :-) > (I'm still in experimantation with the programs), and nowI understand what means the things at the Win32API >programmer's reference. >Reliable's tutorial is a good place for c++ windows programming, but I would recommend take a sight in Foreger's tutorial >before (www.winprog.org or com) >Another book you'll hear is "programming windows" by Petzold, but it is only C and i more limited than Rector's (judging > I've read the petzold book is great book. "but it is only C "-take a closer look. API means procedural programing not oop . they are a collection of functions not a collection of classes. If you want c++ use a wrapper i think MFC(VC ++ ) or from wxWindow are suitable. Best book does not exist every book has a weak chapter and a strong chapter. >with the TOC, since I haven't read Petzold's book) > i think you should read the book. in some chapters are much more than u expected > > > >------------------------------------------------------- >This sf.net email is sponsored by: >Access Your PC Securely with GoToMyPC. Try Free Now >https://www.gotomypc.com/s/OSND/DD >_______________________________________________ >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: Carlos d. M. <cg...@wo...> - 2002-10-21 10:28:31
|
Teodorescu Cristian escribi=F3: > Carlos Garc=EDa del Monte wrote: > > >I agree with Mrs Elizabeth, I have "win32 programming" by Rector and N= ewcomer, too. Since it I achieved to make programs > >which work > > > why your programs does not use to work ?? :-) Why your programs did not use to work??:-) In my first experiments before know Rector's book, with other books more = ore less outdated (I didn't find anything modern) or the explanations of the books were so bad done that I didn't understand t= hem and I did not what I should, or I didn't find anything and I couldn't imagine how to write things, and for what I read = in the books I did not understand the winapi reference, e.g., for creating a font, CreateFont Indirect, oh, you need l= ogfont, what's that?, search some place, chosefont, what? see in other place, and that what is it?, etc, and when I found th= e n-th function or structure I forgot what was the damned meaning of logfont, or what function I was trying to use. > > > > (I'm still in experimantation with the programs), and nowI understand= what means the things at the Win32API > >programmer's reference. > >Reliable's tutorial is a good place for c++ windows programming, but I= would recommend take a sight in Foreger's tutorial > >before (www.winprog.org or com) > >Another book you'll hear is "programming windows" by Petzold, but it i= s only C and i more limited than Rector's (judging > > > I've read the petzold book is great book. > "but it is only C "-take a closer look. API means procedural programing > not oop . they are a collection of functions not a collection of classe= s. > If you want c++ use a wrapper i think MFC(VC ++ ) or from wxWindow are > suitable. > Best book does not exist every book has a weak chapter and a strong cha= pter. Of course, but see at the subject, it says learning c++, and he wants to = learn it for windows programming. You can learn MFC, which is the MS library for C++ over windows api, so we can talk him abou= t books for MFC, ... Do a search for books over MFC, I didn't search any of them because of th= e continuation of what I am saying, I cannot recommend any of them because I don't know any. ..., but I assume he wants either program with MinGW, and MFC is only for= MSVisualC++, and MinGW has not it. I recommend him a book for Win32API, which is not C++, but starts with the "raw API", which= I consider something recommendable to work, and if he won't be able to use MFC I feel that way he will be able to guess what= will be going under classes and the sense of those classes, and if he needs to write a class of his own he will be able to d= o so. But in Petzold's book, for the TOC and what I read about it and saw in a claimed downloadable version of it found somew= here, it uses always C, while Rector's one at the second part starts using MFC and C++, so he'll can see that code and have= a feel, and the code of the C part is organized in a such kind of way that is in a direction pointing to C++, is a C code with= the taste of C++. > > > >with the TOC, since I haven't read Petzold's book) > > > i think you should read the book. > in some chapters are much more than u expected Just yesterday I had a watch at some chapters of the downloadable one, an= d I found a couple of things. And few days ago I had a watch in th TOC of it at amazon and it has either other couple of thing= s, like a chapter about files, a matter absent in Rector's book (this is perhaps the main fall of Rector). |
|
From: Santiago <sa...@ho...> - 2002-10-21 18:23:42
|
So since .NET has nothing to do with C++, one doesn't need to learn C++ =
in order to learn .NET??
Also, Ioannis Vranos say: "Something very important. The next Windows =
version codenamed "Longhorn"
will provide *only* managed .NET APIs. MS is committed to provide .NET
APIs for all its products. "
So, does that mean win32API applications won't work on "Longhorn"?
San
----- Original Message -----=20
From: Carlos Garc=EDa del Monte=20
To: dev-cpp-users-list=20
Sent: Monday, October 21, 2002 6:26 AM
Subject: Re: [Dev-C++] Re: learning c++, best book
=20
Teodorescu Cristian escribi=F3:=20
Carlos Garc=EDa del Monte wrote:=20
>I agree with Mrs Elizabeth, I have "win32 programming" by Rector =
and Newcomer, too. Since it I achieved to make programs=20
>which work=20
>=20
why your programs does not use to work ?? :-)
Why your programs did not use to work??:-)=20
In my first experiments before know Rector's book, with other books =
more ore less outdated (I didn't find anything modern) or the =
explanations of the books were so bad done that I didn't understand them =
and I did not what I should, or I didn't find anything and I couldn't =
imagine how to write things, and for what I read in the books I did not =
understand the winapi reference, e.g., for creating a font, CreateFont =
Indirect, oh, you need logfont, what's that?, search some place, =
chosefont, what? see in other place, and that what is it?, etc, and =
when I found the n-th function or structure I forgot what was the damned =
meaning of logfont, or what function I was trying to use.=20
=20
> (I'm still in experimantation with the programs), and nowI =
understand what means the things at the Win32API=20
>programmer's reference.=20
>Reliable's tutorial is a good place for c++ windows programming, =
but I would recommend take a sight in Foreger's tutorial=20
>before (www.winprog.org or com)=20
>Another book you'll hear is "programming windows" by Petzold, but =
it is only C and i more limited than Rector's (judging=20
>=20
I've read the petzold book is great book.=20
"but it is only C "-take a closer look. API means procedural =
programing=20
not oop . they are a collection of functions not a collection of =
classes.=20
If you want c++ use a wrapper i think MFC(VC ++ ) or from wxWindow =
are=20
suitable.=20
Best book does not exist every book has a weak chapter and a strong =
chapter.
Of course, but see at the subject, it says learning c++, and he wants =
to learn it for windows programming. You can learn MFC, which is the MS =
library for C++ over windows api, so we can talk him about books for =
MFC, ...=20
Do a search for books over MFC, I didn't search any of them because of =
the continuation of what I am saying, I cannot recommend any of them =
because I don't know any.=20
..., but I assume he wants either program with MinGW, and MFC is only =
for MSVisualC++, and MinGW has not it. I recommend him a book for =
Win32API, which is not C++, but starts with the "raw API", which I =
consider something recommendable to work, and if he won't be able to use =
MFC I feel that way he will be able to guess what will be going under =
classes and the sense of those classes, and if he needs to write a class =
of his own he will be able to do so. But in Petzold's book, for the TOC =
and what I read about it and saw in a claimed downloadable version of it =
found somewhere, it uses always C, while Rector's one at the second part =
starts using MFC and C++, so he'll can see that code and have a feel, =
and the code of the C part is organized in a such kind of way that is in =
a direction pointing to C++, is a C code with the taste of C++.=20
=20
>with the TOC, since I haven't read Petzold's book)=20
>=20
i think you should read the book.=20
in some chapters are much more than u expected
Just yesterday I had a watch at some chapters of the downloadable one, =
and I found a couple of things. And few days ago I had a watch in th TOC =
of it at amazon and it has either other couple of things, like a chapter =
about files, a matter absent in Rector's book (this is perhaps the main =
fall of Rector). |
|
From: Ioannis V. <no...@ho...> - 2002-10-22 04:47:53
|
-----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Santiago Sent: Monday, October 21, 2002 9:24 PM To: Carlos Garc=EDa del Monte; dev-cpp-users-list Subject: Re: [Dev-C++] Re: learning c++, best book So since .NET has nothing to do with C++, one doesn't need to learn C++ in order to learn .NET?? Also, Ioannis Vranos say: "Something very important. The next Windows version codenamed "Longhorn" will provide *only* managed .NET APIs. MS is committed to provide .NET APIs for all its products. " So, does that mean win32API applications won't work on "Longhorn"?=20 You can use .NET from within any language (with a compiler that supports .NET). =20 Regarding Longhorn, this is what i have read in various web sites: "Longhorn will provide only Managed APIs". In any case, even if Win32 API (together with its encapsulations like MFC etc), continues to be supported, it will not be further developed. =20 =20 Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com <http://www.noicys.freeurl.com/>=20 * Alternative URL: http://run.to/noicys |
|
From: metalseb <met...@fr...> - 2002-10-22 06:56:24
|
Ioannis wrote : Hi again Ioannis > Regarding Longhorn, this is what i have read in various web sites: > "Longhorn will provide only Managed APIs". In any case, even if Win32 > API (together with its encapsulations like MFC etc), continues to be > supported, it will not be further developed. That's why I wanted to know. Win32 root will continue to be supported. At least. An emulation of Win32 base API through .NET ? What does MS so big is that there are zillions of applications available for their system, for every need. If now, Microsoft decides to get rid of the past and make a *brand new* system without any support for older applications (From 3.0 to XP !!!), they will smash down their empire and restart from ground zero. I cannot believe a word of that. What I understand from the MSDN article, is that there won't be any way in further Longhorn release of VC++ to write and compile proggies with only MFC or Win32 API. -- Seb |