CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2007
    Location
    Pune, INDIA
    Posts
    128

    Question Problem in merging the source code of two VC++ projects

    Hi,

    I am working on VS2008. I have two saperate projects which have almost same functionality along with same file names but few are different. So I decided to use the same .cpp and .h files for both the projects. Both are Dialog based applications.
    So what I did is I merged the source code changes to one by using #ifdef XXXX in all the common .cpp and header(.h) files.
    I also moved the .rc file and .vcproj file to other project (As they were of different name).

    The problem is with the resource.h file, as it is the file with the same name in both the project. By using #ifdef XXXX in .cpp files the compilation is working file but here in resource.h the resource is getting corrupted and the diglogs are not getting displayed.

    Please guide how to merge two resource.h files to one.


    Thanks in advance,
    Mayank

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Problem in merging the source code of two VC++ projects

    I don't know what kind of guidance you could need other than "do it right way." In case automatic way doesn't work for you, do it manually with some tool, winmerge for example.
    Best regards,
    Igor

  3. #3
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: Problem in merging the source code of two VC++ projects

    resource.h and the .rc file is usually "managed" by the resource editors. while you can do some minor manual changes to them, adding #ifdef's is probably going to make the resource editors flip out, or the #ifdefs will continuously be removed each time you make a change from one of the resource editors.

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