Link to home
Start Free TrialLog in
Avatar of Dave Shields
Dave Shields

asked on

Visual c++ problem with command line conflicts

I am using Visual c++ 2013 community to write an MFC dialog based program.  I am at the point where I am introducing an MS common dialog for user support.  Now, it will not build, telling me that I need /clr support.
If I add /clr it complains that /clr and /MTd command line options are incompatible.  I am WAY beyond my expertise level when dealing with command line options.
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Is it possible for your to attach your test program that you are trying to build and run using MS VS 2013?
>>Remove that component and use one that is not .net based.

which common dialog did you use? it is a good chance that mfc also provides a similar dialog.

Sara
actually the answer was given by Andy and not by me. therefore he should get the points.

Sara
Thanks sara
Avatar of Dave Shields
Dave Shields

ASKER

I've answered this problem myself, by disregarding instructions that I had been following in a book from 2002.
What did you do to solve it.
Look, this was so hectic, trying to get an answer under a deadline, I honestly believe I solved this myself.  I do recall that I did pay attention to sara's comments, and did intereract with her so it would be appropriate if you awarded the points to her.
Dave, thanks. I appreciate your comment.

Eenookami, in my comment I referred to an answer given by Andy and asked for more information which was not given for the reasons Dave has elaborated.

since I added only minimal value to the answer - if at all - I recommend to close the question by accepting Andy's comment https://www.experts-exchange.com/questions/28610058/Visual-c-problem-with-command-line-conflicts.html?anchorAnswerId=40588998#a40588998.

Sara
>>I do recall that I did pay attention to sara's comments, and did intereract with her so it would be appropriate if you awarded the points to her.

That sort of implies you ignored anyone else, including the first comment instructing you not to use that new component you added and use a different one instead.
Andy
Can you refresh my memory on the comment that you made, as I do not remember any of your comments being on point.
Dave
? Just look - it is the very first comment in response to your question.
Andy are referring to this comment
"You can run MFC and .net together but it is rather complex. "
That is probably true, but as I have stated, the crux to the solution was to abandon the book I was following, and I picked up on Sara's questions about classes, I had been adding a class to the project, which was necessary in VS2003, but was completely causing a stumbling in VS2013.  

Your comment that MFC and .net can run together was of NO help to me.  It is very generous of Sara to defer the points to you, but I don't find that fair.  Sara and I had a fairly long conversation over several days.  She gave me code to get over the first hurdle, and her questions actually led me to find the answer, by looking closely at the classes in 2003 vs 2013.  

I don't remember all the details, but I do feel that Sara's correspondence was always on point.  Truthfull I didn't understand many other posts.

Dave
>>Andy are referring to this comment
Actually no, that is a part of the comment.

As you seem to have real troubles with your browser I'll copy and paste the rest and more relevant part - because that is the bit Sara referred to - of it here.

You have added a .net based component (according to the clr requirement in the error message).  Remove that component and use one that is not .net based.

That seems to be precisely what you 'discovered yourself' some days later.


>>Sara and I had a fairly long conversation over several days.

Four experts made one comment each, then you closed the question without making any intermediate comment yourself.  My understanding of conversation apparently differs from yours,


>> Truthfull I didn't understand many other posts.

OK, so jkr and myself were talking in too advanced a way - if that happens just ask nicely to dumb down our level to something you can cope with.  Ignoring means you just ignore top quality advice.
Actually by this point I was out of the woods thanks to Sara.  What I wanted to do was activate a Browse button on the dialog, by calling up a common file dialog.   I eventually found a code example online which worked smoothly.  It adds a great deal to my program.  I could NOT in my opinion do without this   A Browse button saves a lot of typing and typos.  Evntually I resorted to searching on line for the error codes associated with this addition.  As i recall, I had to make changes to 5 different items before the code would compile.

So, you see I could not take your advice even if I understood it, as the Browse feature was an essential design choice.
deja vu:

 Remove that component and use one that is not .net based.
Remove that component and use one that is not .net based.????????????
I originally planned on using a Microsoft common file dialog, and I did use a Microsoft common file dialog.  By finding code samples that showed me how to do it.  If the component was net based originally, I think it is still NET based.  What's your point.
     What I asked for was help in modifying the compiling switches, which you never mentioned, and which I was able to find online.

Dave
Force accept
probably you meant 'forced assist' ...

Sara