Visual C++ Compatibilty info.

Discussion in 'Effects and the DSP' started by Russ, Mar 22, 2005.

  1. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Here is some info regarding the compatibility of different versions of Visual C++ and the kX Project SDK.

    Visual C++ 6
    • This is the recommended version as this is the version used to create the SDK.
    Visual C++ .NET 2002
    • Changes in the MFC libraries make this version incompatible with the kX SDK. You can however create plugins, etc, using this version, provided that you link with the MFC library files from VC++ 6. (this seems to work, but it is possible that you could run into problems, and you still need to get a hold of the MFC library files from VC++ 6, so if you have these files, then you probably have VC++ 6 and should probably just use it instead)
    Visual C++ .NET 2003
    • This has the same issue with the MFC library as the 2002 version, but due to additional incompatibilities it does not seem that this version can be used to create kX Plugins, etc.
    Addtional Info:
    Current versions of Visual C++ include a downgrade option. What this means is that you could purchase the current version (i.e. Visual C++ .NET 2003 Standard), and use your downgrade option to get Visual C++ 6, etc for the price of the media plus shipping and handling (i.e. media only version). See the following link for more info: Downgrade Information for Visual C++

    I thought this info might be useful to anyone wanting to create kX Plugins, but are not sure what thier options are. Of course this information may not be accurate with future versions of kX, and Microsoft could change it's downgrade options in the future, so be sure to check these things before deciding to purchase anything in order to develop kX plugins, etc.
     
  2. Soeren_B

    Soeren_B kX Project DSP Engineer

    Joined:
    Dec 12, 2002
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    0
    This is indeed useful information, which should be in a FAQ and/or perhaps a sticky thread

    /Soeren
     
  3. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    I did so more testing with Visual C++ .NET 2003, and discovered that you can get it to work, using the same method as with the 2002 version, however you must also make some modifications to afxtempl.h. (tested with the fx_demo plugin).

    I was also able to compile (and tested successfully) a very basic plugin using VC++ 2003 .NET without the MFC 6.0 lib files, by making some small modifications to some of the kX SDK headers (kDefs.h and plgmath.h). Again this was just a very basic plugin (hardly used any of the kX SDK API functions), and would not work with other plugins (i.e. does not work with fx_demo).

    This was just some basic testing, but it shows that you can use the newer VC++ versions to create kX plugins, and may even be able to do it without using the MFC files from VC++ 6 (but much more testing would be needed to figure out all the necessary changes to the kX SDK headers, and/or MFC files).

    -Russ
     
  4. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Unfortunately, I hit a dead end with the VC++ .NET 2003 testing. As was discovered in this thread, there seems to be a problem/incompatibility in the CKXPluginGUI::create() function, which causes a crash when trying to open the tweak window (when not using VC++ 6 MFC files). Without the source code for that function, I do not know of anyway to get around that problem. This means that unless you want to make plugins without a custom GUI (i.e. not using that function, as it seems to work otherwise (i.e. no tweak window, or tweak window from microcode 'control's)), that you will have to use the VC++ 6 MFC files, and as such, might as well just use VC++ 6.
     
  5. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    Any freeware Compilers for us amatures that could work?
     
  6. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Currently kX uses the Microsoft Foundation Class libraries (MFC), so you are limited with your options on what compiler you can use.
     
  7. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    BTW: The above tests using different versions of VC++, only apply to plugin development, and not necessarilly to other areas of kX. i.e. I have been able to successfully use the kxapi (i.e. reading/writing AC97 registers using kxapi and the iKX interface) with VC++ .NET 2003 without any problems. Use with other areas of kX Development (i.e. addons, or whatever) would require further testing.
     
  8. Eugene Gavrilov

    Eugene Gavrilov kX Project Lead Programmer and Coordinator

    Joined:
    Dec 7, 2002
    Messages:
    3,146
    Likes Received:
    9
    Trophy Points:
    48
    yes, you can use any compiler provided you have vc6's MFC headers and libraries (.h & .lib)

    E.
     
  9. ROBSCIX

    ROBSCIX New Member

    Joined:
    Mar 28, 2004
    Messages:
    1,732
    Likes Received:
    4
    Trophy Points:
    0
    OK, Thats what I wanted to know...
     
  10. Lex Nahumury

    Lex Nahumury DH Senior Member

    Joined:
    Jan 5, 2003
    Messages:
    1,944
    Likes Received:
    6
    Trophy Points:
    0
    Correction: (to avoid incorrect info floating around)
    No, it is currently NOT possible to use any compiler even if you have all
    required MFC headers and libs!

    Reason (discussed elsewhere);
    You can not link to kxapi.lib with any non-MS compiler due to incompatible C++ ABIs.
    So kX's MFC dependancy is NOT the real bottleneck here.

    /LeMury
     
  11. Max M.

    Max M. h/h member-shmember

    Joined:
    Dec 7, 2002
    Messages:
    2,690
    Likes Received:
    9
    Trophy Points:
    63
    >So kX's MFC dependancy is NOT the real bottleneck here.

    confirmed.

    /m
     
  12. Max M.

    Max M. h/h member-shmember

    Joined:
    Dec 7, 2002
    Messages:
    2,690
    Likes Received:
    9
    Trophy Points:
    63
    Îòâåò: Visual C++ Compatibilty info.

    just to update the info (yek, it's 2009 now).
    the following information is quite raw and may not be 100% correct - it's just to keep this thread less or more up-to-date as the earlier posts here are really obsolete and could be confusing:

    Current versions of kX SDK are supposed to be used with the WDK.
    Technically it's also possible to use the DDK or Visual Studio (>= 2003) - but there you likely will face some necessity of certain cosmetic modifications here and there (specificaly some extra global macros, due to minor crt/mfc incompatibilities).

    Note that the "express" versions of the Visual Studio do not include MFC headers and libraries, therefore the "express" cannot be used to compile plugins with the "default kX GUI".
    (Although it's possible to use (like me does for example) a combination of DDK/WDK and VS IDE (including "express"), but this requires quite tricky tweaking of the VS configurations)
     
    Last edited: Apr 20, 2009
  13. stylus02

    stylus02 New Member

    Joined:
    Jan 11, 2008
    Messages:
    283
    Likes Received:
    2
    Trophy Points:
    0
    Last edited: Jun 9, 2009
  14. Max M.

    Max M. h/h member-shmember

    Joined:
    Dec 7, 2002
    Messages:
    2,690
    Likes Received:
    9
    Trophy Points:
    63
    Last edited: Jun 9, 2009
  15. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    <edit>
    Nevermind... Max beat me to it... :)

    Make sure that you are building the the Release version, not the Debug version...
     
  16. stylus02

    stylus02 New Member

    Joined:
    Jan 11, 2008
    Messages:
    283
    Likes Received:
    2
    Trophy Points:
    0
    active configuration set to "win32 release". output window shows..

    ...
    Linking...
    LINK : error : Internal error during ReadSymbolTable
    ExceptionCode = C0000005
    ExceptionFlags = 00000000
    ExceptionAddress = 004623F2
    NumberParameters = 00000002
    ExceptionInformation[ 0] = 00000000
    ExceptionInformation[ 1] = 00000008
    CONTEXT:
    Eax = 00980DC0 Esp = 0012E6D8
    Ebx = 00000002 Ebp = 007399D0
    Ecx = 00980DC0 Esi = 009A0764
    Edx = 00000000 Edi = 009A0764
    Eip = 004623F2 EFlags = 00010246
    SegCs = 0000001B SegDs = 00000023
    SegSs = 00000023 SegEs = 00000023
    SegFs = 0000003B SegGs = 00000000
    Dr0 = 0012E6D8 Dr3 = 00000002
    Dr1 = 007399D0 Dr6 = 00980DC0
    Dr2 = 00000000 Dr7 = 00000000
    Error executing link.exe.
    Tool execution canceled by user.

    stylus
     
  17. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Try doing a "Clean" and then "Rebuild All".
     
  18. stylus02

    stylus02 New Member

    Joined:
    Jan 11, 2008
    Messages:
    283
    Likes Received:
    2
    Trophy Points:
    0
    after "clean", "rebuild all" same error. perhaps a problem with the linker call?

    build log
    --------Configuration: demo - Win32 Release-----
    ..

    C
    reating command line "link.exe ..\lib\kxapi.lib ..\lib\kxgui.lib /nologo /dll /incremental:no /pdb:"Release/demo.pdb" /machine:I386 /out:"Release/demo.dll" /implib:"Release/demo.lib" ".\Release\debug.obj" ".\Release\demo.obj" ".\Release\simple.obj" ".\Release\fxlib.res" "

    btw: i use win xp version 2002/ sp2/ P4/ 2.6ghz/ 512mb
    don't know if this could be important. my last succesfully builds were on windows me/ P2 (celeron)/ 256mb.


    stylus
     
    Last edited: Jun 9, 2009
  19. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    You are talking about the fx_demo, right?
    Did you use the included workspace (which includes all the necessary compiler and linker options, etc) or are you trying to compile from command line? It compiles fine for me (using the workspace), without having to do anything...
     
    Last edited: Jun 9, 2009
  20. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Assuming you using the workspace (so we know the settings are correct), I wonder if maybe one of your lib files got corrupted... You might try adding /verbose to the linker options and see if it gives any clues about the problem.
     

Share This Page

visited