CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2001
    Posts
    216

    Cant compile MSDN examples becuase of .sln version

    Hi everyone,

    I am using the 2002 version of Visual C++.Net and can't compile the examples from MSDN because they are for a different version.

    How can I convert these example so that they work with my current version?

    Thanks,

    Jai

  2. #2
    Join Date
    Aug 2002
    Location
    Kerala
    Posts
    1,183

    Re: Cant compile MSDN examples becuase of .sln version

    Which version are the examples meant for?

  3. #3
    Join Date
    Jul 2001
    Posts
    216

    Re: Cant compile MSDN examples becuase of .sln version

    7.10

    I am running 7.0

  4. #4
    Join Date
    Aug 2002
    Location
    Kerala
    Posts
    1,183

    Re: Cant compile MSDN examples becuase of .sln version

    Creating a new project using your version of Visual Studio and adding the source files from the example would make most of them work.

  5. #5
    Join Date
    Jul 2001
    Posts
    216

    Re: Cant compile MSDN examples becuase of .sln version

    I tried doing this without much success.

    Problem is you don't know what type of project to create and all the little project settings that are supposed to be applied to the project.

    Thank for the help anyway.

    Jai

  6. #6
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Cant compile MSDN examples becuase of .sln version

    Do you know what the application or example you are building is supposed to do? If it's a console app, then you create a Win32 console program. If it's a GUI app, then it's a Win32 GUI application.

    You should get used to this. The .sln project file structure is relatively new, and not a lot of programmers even have VC 7.1, as compared to VC 6.0, therefore you won't see .sln files for many sample programs.

    Learn to judge what application the files are supposed to be used for, and create an empty project of that type. You should never have any trouble taking CPP files and creating a project from those CPP files, regardless of compiler or compiler version. What you may have to end up doing is adding libraries to satisfy the linker, but that is a matter of knowing what .lib files to add. Is this the problem you're having (the linker giving you errors)? There should be no problem compiling. If you are having problems, tell us exactly what errors you're getting.

    Regards,

    Paul McKenzie

  7. #7
    Join Date
    Jul 2001
    Posts
    216

    Re: Cant compile MSDN examples becuase of .sln version

    Hi Paul,

    The samples are ATL projects. I managed in the end to compile them but I'm not sure what kind of component they are supposed to be.
    In the readme.txt of the sample directory, it sais that it was created for a basic .exe program, but when I set the output file to .exe the result is that windows said it is not a valid win32 executable.
    If i compile it as a .dll, it doesn't make sense because it is supposed to be a client for another .dll componet.

    I just don't know enough about ATL to figure out whats going on, it seems to be a really complicated topic.

    But i suppose your right, looks like I will have to figure out how to do it manually if all the example are for different versions.

    Thanks,

    Jai

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured