Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Very frustrated beginner needs help...

Status
Not open for further replies.

marksarnold

Programmer
Feb 5, 2005
5
0
0
US
Hi,

is there anything like a guide on starting a new project?
It seems like the project wizard gives me all these choices, I have no idea which one is the best one. Yet, the more code the wizard generates, the more fragile it seems to become.
I am having immense problems just adding a very small number of lines. As soon as I start using some additional classes or methods, I have all these problems with duplicate and missing symbols. How do I find my way through this?

I have spent so much time on this without ever getting anywhere. It seems like one tiny wrong move gets you into a dead-end that you will never get out of any more...

What is the best wayto do this?

I am trying to write some simple single-document Windows application. Since I want to implement some classes and methods that are probably usefull for all future projects (logging, etc), I would like to split those out into a separate library project and link the library in my main projects. However, just using a simple printf() causes huge trouble with duplicate symbols. Anything I try to get rid of the problem then haunts me with unknown symbols on the downside...

Also, what is the difference between an MFC project and a regular Windows app? I want to use some things like SplitterWindows, etc. Do I need MFC for that?

Is there any way to quickly get somewhere and keep the frustration at a minimum level?
I am a professional programmer, I have a Masters in computer science and 10 years of experience in Basic, Turbo Pascal, C++, VB, Java and I've always been fine, but this whole MVC and Windows-crap is just killing me!!!! All I do is fight with library- and windows/MFC related compiler and linker problems, I never even get to work on my actual application logic at all... Everything I touched so far was a big waste of time - I found a million ways to break things, but not one to get to what I want...

Is this a problem of VisualStudio/VC++, or do all the other IDEs have the same problems?

Thanks,

MARK
 
>I have no idea which one is the best one

Depends on what you want to do of course.

>, the more code the wizard generates, the more fragile it seems to become.

I don't reckogninze that problem.

>As soon as I start using some additional classes or methods, I have all these problems with duplicate and missing symbols.

Then how do you add the stuff exactly

>How do I find my way through this?

By dealing with one issue at the time. Add one single item and make sure it works before you move onto the next.

> It seems like one tiny wrong move gets you into a dead-end that you will never get out of any more...

Well, your initial selection for generating the app is vital, if you're moving into the wrong direction at this stage it is sometimes easier to start over from scratch rather than try to fiddle manually. For example if you've generated a dialog application but really wanted a doc-view application.

>Also, what is the difference between an MFC project and a regular Windows app?

MFC if a framework of classes that encapsulate most win32 functions. In addition it provides stuff like document-view architecture etc. It was very-very long time ago I fiddeled with win32 apps directly (unless if I'm doing relly odd stuff). MFC is so much nicer to work with.

>Is there any way to quickly get somewhere

Use the applwizard to generate a MFC application for you. It will compile and run wihtout you adding a single bit of code yourself. If it doesn't I'd say you have some major configuration/installation problem.

>and keep the frustration at a minimum level?

Excersice regularly and/or listen to Rammstein.

>but this whole MVC and Windows-crap is just killing me

There, there. Being a professional developer for some 10 years myself I must say that Visual Studio is one of the best devel. environments I've worked with in windows.

>All I do is fight with library- and windows/MFC related compiler and linker problems

Are you sure you've installed it properly? I never have these kind of issues.

>Is this a problem of VisualStudio/VC++, or do all the other IDEs have the same problems?

I'd image all IDEs you don't master might generate interesting behavior.



/Per
[sub]
www.perfnurt.se[/sub]
 
It depends if you want to do an mfc app, a console app, or a win 32 app.
For begginers with mfc, the best is an MFC app, and name it, then put dialog based, then click next through the wizard then finish.
A console app is your normal C++ dos app.
A win32 app is kind of like aa dos app cept for in a win32 environment with resources.
I can send you a book on Visual C++ if you want, though not everything is perfect in it. Do you want it? (its an ebook, btw)
 
Ok, what I am trying to do is this:
I wanted to write an MFC program and really quickly figured out that instead of printing logs messages out to std-err or std-out, it would be better to have a logging-library to display the messages in some window within my app. I also wanted to have different loggers with log-level based filters. I know there is a c++ version of the jakarta logging library but I could not get it to work.
So I decided to do my own, since it would also be a good way to get back into c++ without having to fight with MFC too much.

So what I thought I would do is just write the library with a simple logview that prints to stdout for now. I figured once that works, I can just subclass a different logView that uses a MFC window instead.
Since I want to use this library probably in all my programs, I wanted to make it a real library. I figured making it a static lib would be easier to use than a dll.

Since I have no clue on how to do this in VC++ and all my ideas obviously failed, I think it would be easier to just ask "How do I approach this?" rather than spending hours trying to remember and write down all the different things I tried. It would probably just be confusing...

So if you could give me a hint on how to start this, that would be great. Maybe somebody has a pointer to a sample or something.
My problem is not the c++ code, it's just how to package it in the right kind of VC++ project, and then start another VC++ project being my MFC app and call the library there.
I thought I had done it right but ended up with all kinds of library problems in the linker....

Thanks,

MARK
 
Oh daniel - the book would be cool... is it free?
thanks, mark
 
choose MFCAPPWizard(exe) (since you said you wanted to make an SDI) from the projects list.. and somewhere in the menus that come up you will see an option for SDI.. the default is MDI so you will ahve to change that.. other than that i suggest you leave all the other defaults unless you see something that you would like to change!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top