Archived

This topic is now archived and is closed to further replies.

Makefile

This topic is 5593 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have a little problem that I''m sure someone can help me with. I''ve been programming in Unix using Java and C for a couple of years, and now I have started using Visual C++ in Windows. I really don''t want to use the IDE, I prefer using Emacs and a terminal (Cygwin), seperated. And I want to use GNU''s ''make'' to build my programs. I''ve never programmed Windows before, and therefore never used Microsoft''s compiler, and I don''t know what flags to use in my makefile. I tried to build a very simple WinMain program, and the compilation passed (of course), but the linker complained about ''unresolved external symbols''. Probably I should include something, but what, and what to write? I know this may sound like I am a silly programmer. I hope I''m not. I don''t think so. Thanks for any help.

Share this post


Link to post
Share on other sites
quote:
Original post by GMMigge
I know this may sound like I am a silly programmer. I hope I''m not. I don''t think so.


Uh, you are.

Why not do this? Fire up that IDE with a default project, go to Project->Settings (or hit Alt-F7), switch on over to the Link tab, and look at the options that are there by default.

Then you can go back to wasting your time with renewed confidence.

-scott

Share this post


Link to post
Share on other sites
If you''ve never programmed WIN32 before, your best bet to learn the very basics is to look for some tutorials on the web. There are tons and they will show you the basics of making a skeleton Windows application. But it won''t do much. There''s a lot more to it than that. The best book I''ve come across on the subject of Win32 Programming is called Programming Windows by Charles Petzold. I''m not sure what revision they''re on but you can still find the book, and it''s very thorough. It''s not cheap, so you might consider buying a used one, even if it says Win9X or something. If you''re serious about becoming a Windows Developer, you should get the newest revision, and also eventually look into programming with MFC (Microsoft''s Foundation Classes). Be warned though that there is a lot to digest. Happy coding



Share this post


Link to post
Share on other sites
VC++6.0(not 7.0) has an option to export a makefile. Although it will be in nmake format, you can at least see what the compiler switches are.
However, I suggest you drop the dogmatic thinking and just get with the program. VC++ is an excellent environment to work in.


"We should always be disposed to believe that that which appears white is really black, if the hierarchy of the Church so decides."

Ignatius Loyola, founder of the Jesuits

Share this post


Link to post
Share on other sites
quote:
Original post by scaught
Why not do this? Fire up that IDE with a default project, go to Project->Settings (or hit Alt-F7), switch on over to the Link tab, and look at the options that are there by default.

Then you can go back to wasting your time with renewed confidence.

-scott



You should just shut your damn pie-hole. I mean, really.

This guy is legitimately asking for help, and you knock him for it. Grow up.

Going to a Windows environment from a Unix one is probably just as confusing as going from Windows to ''nix. I tried it (win->nix), and couldn''t figure out a god damn thing on my own.

GMMigge: The problem is that Visual C++ links with a whole bunch of default libraries right off the bat.

Minimally, you should include link with kernel32.lib, user32.lib, and gdi32.lib

Share this post


Link to post
Share on other sites
quote:
Original post by daerid
You should just shut your damn pie-hole. I mean, really.

This guy is legitimately asking for help, and you knock him for it. Grow up.


I, in no way, insulted his character. I merely pointed out that by circumventing the IDE, he was spending his time in ways that would eventually dead-end. And, fyi, my "damn pie-hole" will remain open, thank you very much.

In fact, Mr. Arlid Fines there suggested the OP''s thinking was dogmatic, yet his pie-hole wasn''t mentioned. Why pick on little ol'' me?

-scott

Share this post


Link to post
Share on other sites
Thank guys for your help. That''s all I need to continue. And I will not bury myself because of scaught''s harsh words.

The reason I don''t use the IDE is simply because I feel really comfortable with Emacs, and that''s what I have been using for 2 years. I think it''s more powerful in an editing point of view, but that''s just me. And I like the "none-mouse" environment.

And besides, I study CS and we use Unix, and Emacs. There''s another reason for ya.

As long as everyone is happy, does it matter what method you use? I''m used to makefiles and terminals and stuff, and I know people making large applications in Windows this way.

Thank you, zya.

Share this post


Link to post
Share on other sites
quote:
Original post by scaught
I, in no way, insulted his character. I merely pointed out that by circumventing the IDE, he was spending his time in ways that would eventually dead-end. And, fyi, my "damn pie-hole" will remain open, thank you very much.

In fact, Mr. Arlid Fines there suggested the OP''s thinking was dogmatic, yet his pie-hole wasn''t mentioned. Why pick on little ol'' me?

-scott




Sorry about that, I was a little edgy earlier today, and I missed Arid''s comment. I apologize for the brash behavior.

Share this post


Link to post
Share on other sites