Cookster

I wasn't sure really where to post this but I'm having issues with compiling released products using Microsoft Visual Studio 2005.

All programs are written in C++.

I have 3 differennt programs I'm trying to compile.
1.) Console application in C++
2.) GUI application in C++
3.) GUI application in C++ with .Net framework

Now, I've compiled 1 and 2 succesffuly in Bloodshed Dev C++ and was able to run them on seperate computers.
I did the same with MS VS 2005, and they can ONLY be run on computers with .Net Framework it would seem.

I've been looking every where for how to set up the compiler to run, these programs will be run on XP machines - but they may or may not have .Net framework installed, so I'm concerned with all the compatability issues I'm having while programming with VS 2005.

If anyone could point me in the right direction or give me some pointers I'd really appreciate it.
I like the MS VS environment, but its uesless if it isn't compatable, and what really irks me is that it should be since they're all XP based machines!

:::angry face:::

Thanks in advance,
Rick



Re: Visual C++ General Visual Studio Compile Settings

Ted.

for programs 1 and 2, you simply need the visual C++ redistributable (install it on the target machine - install both if you're not sure which one you're using)

non SP1 version

http://www.microsoft.com/downloads/details.aspx familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en

SP1 version:

http://www.microsoft.com/downloads/details.aspx FamilyID=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en

or change project settings to link to the static version of the C-Runtime library (instead of dynamic)





Re: Visual C++ General Visual Studio Compile Settings

Eugene Zakhareyev

Right click on the project in Solution Explorer, open Properties and look under Configuration Properties->General; Project Defaults\Common Language Runtime value should be set to No for your projects 1 and 2, and yes for project 3.

There is no pre-requisite of .NET if you do not compile your app in managed C++.

Cheers, Eugene






Re: Visual C++ General Visual Studio Compile Settings

Cookster

Unfortunately not one of these options worked.

I still get an error that suggests reinstalling the applicaiton when I try to run it.

I want this to run as a simple C++ application so it can run on any machine that can handle '.exe'.

Why can't I compile simple C++ code in Visual Studio 2005 and have it work on other machines

Surely, Bloodshed Dev C++ compiler is not more compatible than MS Visual Studio 2005 !!

And thanks for the quick responses to the 2 above!

- Rick






Re: Visual C++ General Visual Studio Compile Settings

Eugene Zakhareyev

How do you mean not worked

And what are your settings in Project Properties C/C++/Code generation, Runtime Library

Cheers, Eugene






Re: Visual C++ General Visual Studio Compile Settings

Cookster

Here's a screen shot, I am really new to VS 2005, only been messing around with it on my free time, as most of my experience is in Java since that is what my school promotes (why I don't know, but it does! Sad )

http://www.u.arizona.edu/~cookster/images/stuff.bmp

Another question is - what is the difference between Win32 and Avtive(Win32)

I just want to develop with out having any unnecessary libraries and such being linked into my program that require extra bells and whistles be installed on the PC for that program to run, and Visual Studio seems to be making that difficult. *sigh






Re: Visual C++ General Visual Studio Compile Settings

Eugene Zakhareyev

Rick,

Ok, we are getting somewhere. Now look under C++ in properties, in Code generation - what version of Runtime Library is set

Cheers, Eugene






Re: Visual C++ General Visual Studio Compile Settings

Cookster

Multi-threaded DLL (/MD)






Re: Visual C++ General Visual Studio Compile Settings

Eugene Zakhareyev

Then that's probably why you are having problem running it. Set it to static linkage, namely /MT (see here for details).

Hope that helps,

Eugene






Re: Visual C++ General Visual Studio Compile Settings

Cookster

Awesome! That worked, thank you so much for the help Eugene.

I have one last question, and I'm pretty sure its 'no', but is it possible to compile a C++ program with the .Net framework w/o having .Net installed I wasn't sure if there was a way to package in all the libraries and files into the executable, I'm guessing not, but worth a shot.

The reason is I've developed a start-up CD and I'd like it to be a bootable application, but I developed it with the .Net framework not realizing machines need the .net framework installed to run any of the applications I compile.

But with deadlines approaching I'll have to resort back to C++ Console application since I won't have time to redesign the GUI in C++ alone.






Re: Visual C++ General Visual Studio Compile Settings

Eugene Zakhareyev

Rick,

To run .NET app you need .NET framework installed. So that's 'no' Smile

Cheers, Eugene