FYI:Compiling source code in Visual Studio 6

t_j_smith
2004-08-11
2013-05-02
  • t_j_smith

    t_j_smith - 2004-08-11

    Source Code:
    sidplay-2.0.9.tar.gz
    sidplay-libs-2.1.1.tar.gz

    Development Environment:
    Windows 2000 SP4
    Visual Studio 6 SP5

    Encountered the following issues when attempting to build libraries and executable:

    (1) The DSW and DSP files must be converted from Unix to DOS format.  By converting (line feed) character to (carriage return) + (line feed) character sequence, this permits loading workspace + projects into IDE.

    (2) Some of the DSP files needed to be converted to newer version.  These migrated ok.

    (3) resid_builder.dsp refers to files in ..\..\src\resid subfolder.  For example:  ..\..\src\resid\envelope.cpp  There are two difficulties.  First, the extension specifies ".cc" instead of ".cpp".  So I renamed the source code in "resid" folder to match DSP reference.  Second, the "resid" folder supplied by sidplay-libs-2.1.1.tar.gz is a top-level folder.  So I moved this folder to .\builders\resid-builder\src

    (4) Compilation error for resid_builder project.  The "VERSION" constant is an unrecognized identifier in siddefs.h  I resolved problem by adding declaration #include "config.h" prior to #include "siddefs.h" in version.cpp source file.

    (5) Compilation error for sidplay project.  Even though scope of variable is valid, the compiler complains about statement "for (int j = 0; j < fir_N; j++) {" due to prior reference to "int j" in same routine of sid.cpp source file.  I resolved by modifying statement to "for (int k = 0; k < fir_N; k++) {"

    (6) Numerous warnings issued by compiler but no further errors.  Able to run executable and successfully listen to Artura.sid - yay!

     
    • Simon White

      Simon White - 2004-08-11

      > (1) The DSW and DSP files must be converted from Unix to
      > DOS format. By converting (line feed) character to (carriage
      > return) + (line feed) character sequence, this permits loading
      > workspace + projects into IDE.

      Your right.  Distribution is created under linux therefore these file end up incorrect.  I'll see what I can do as source distributions will always be done from linux.

      > (2) Some of the DSP files needed to be converted to newer
      > version. These migrated ok.

      Those in the VC5 directory are Visual Studio 5.  Those in the VC directory are VC6 and 7.  I don't have 6 myself and rely on someone else, perhaps the service packs have caused this.  Not sure whether to worry about this or not.

      > (3) resid_builder.dsp refers to files in ..\..\src\resid subfolder.
      > For example: ..\..\src\resid\envelope.cpp There are two
      > difficulties. First, the extension specifies ".cc" instead of
      > ".cpp".

      Your right, Dag (ReSID maintainer) destributes resid as cc files, however VC prior to 7 does not know how to handle them.  His opinion is update VC (not very usefull imo).  Anyway I think infuture I'll still keep them as cc and supply a registry patch to allow VC < 7 to build them.

      > So I renamed the source code in "resid" folder to match DSP
      > reference. Second, the "resid" folder supplied by
      > sidplay-libs-2.1.1.tar.gz is a top-level folder. So I moved this
      > folder to .\builders\resid-builder\src

      Oops, thats where I keep it locally on my windows builds, I'll get it moved to the same place as linux.

      > (4) Compilation error for resid_builder project. The "VERSION"
      > constant is an unrecognized identifier in siddefs.h I resolved
      > problem by adding declaration #include "config.h" prior to
      > #include "siddefs.h" in version.cpp source file.

      Yes, known issue, the variable is created automatically under linux and cannot do this under Windows.  I'll see if I can automate the creation of this variable for Windows as part of the made dist under linux.

      > (5) Compilation error for sidplay project. Even though scope of
      > variable is valid, the compiler complains about statement "for
      > (int j = 0; j < fir_N; j++) {" due to prior reference to "int j" in
      > same routine of sid.cpp source file. I resolved by modifying
      > statement to "for (int k = 0; k < fir_N; k++) {"

      Oops missed that problem, is part of resid.  See comment above about Dags opinion on things.  I'll patch locally.

      > (6) Numerous warnings issued by compiler but no further
      > errors. Able to run executable and successfully listen to
      > Artura.sid - yay!

      Good.  Warnings related to extern being used in a non standard way can be ignored, thats how it must be done on Visual Studio.  Warnings in ReSID are not my concern, but your welcome to report any others here for fixing as I may have missed them.

      Thankyou for the notes.

       
    • t_j_smith

      t_j_smith - 2004-08-11

      >Distribution is created under linux therefore these file end up
      >incorrect. I'll see what I can do as source distributions will
      >always be done from linux.

      What made this a bit mysterious was the behavior of VS6.  Prior to converting the end-of-line markers, I found that the IDE would simply "ignore" the workspace document.  That is, I would attempt to open it and the project window would just remain blank:  no error message displayed but also no source files appearing in IDE.

      >Those in the VC5 directory are Visual Studio 5. Those in the VC
      >directory are VC6 and 7. I don't have 6 myself and rely on someone
      >else, perhaps the service packs have caused this. Not sure whether
      >to worry about this or not.

      My opinion is that this is not a worry since the conversion occurs automatically and without glitch.

      >Thankyou for the notes.

      Your most welcome.

       
  • bernie mnemonic

    bernie mnemonic - 2011-07-15

    /bump

    This thread should be stickied. It's so helpful.

    > Anyway I think infuture I'll still keep them as cc and supply a registry patch to allow VC < 7 to build them.

    Let me give you a quite lol. ROFL.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks