|
|||||||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,037
Rep Power: 56 ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
kX Project SDK and development
some time ago there were questions about porting kX Driver to a more recent compiler (e.g. VS .Net etc.) or to any 'free' compiler (GNU/mingw32/...)
the main problem is with VS6's MFC headers and libraries - the new versions are no longer compatible with kX the best solution so far is to get a -free- version of compiler + headers + libraries from microsoft: http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx the package is called 'KMDF', although it is just Windows .NET DDK + KMDF extensions this should fix any compatibility issues, since I use KMDF1.1 for building kX Driver Eugene |
|
|
|
|
|
#2 |
|
DH Senior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,884
Rep Power: 48 ![]() ![]() ![]() ![]() |
To summerize all this a bit;
1. It is *not* possible to develop kX plugins, or otherwise use kX API, with any non-MS compiler such as GNU/MINGW etc. This is because of different ABIs, not because of MFC dependancies! 2. It *is* possible to develop kX plugins, or otherwise use kX API, with any MS compiler such as VC6, and all the free .NET variants provided that; a. you have the correct MFC headers & libraries/Lex. |
|
|
|
|
|
#3 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,037
Rep Power: 56 ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
yes, this is correct
however, care must be taken when compiling with newer C++ compilers (.NET): for 'debug' builds the compiler might generated additional code (stack checks, buffer overrun detection, exception handling) -- this might conflict with kX binaries, so, please disable such extensions -- kX only supports 'debug' builds, since it is linked against msvcrtd and mfc42d libraries. if you wish to compile your plugins as 'release' builds, you need to be sure you do NOT use these libraries. otherwise a conflict between 'msvcrt' and 'msvcrtd' will occur. -- the link above has full compiler, MFC libraries (headers and libs), CRT etc., however, it lacks 3-4 files. (such as 'zmouse.h' or 'richtext.h') These files are found in either in different folders of the NTDDK, or in the platform SDK. some of them can be easily changed to empty 'placeholders'. E. |
|
|
|
|
|
#4 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,037
Rep Power: 56 ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
by the way, there's an unofficial, unsupported, unrelated to kX Project site with all MFC42 headers and libraries: http://mfc42.narod.ru/
E. |
|
|
|
|
|
#5 |
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 36 ![]() ![]() |
Sorry to drudge up an old subject... but I was wondering what it would take to make the 'non-GUI' parts of KX API compatible with other non-MS compilers.
It seems all the discussion is on plugins - is that all the KX SDK is good for? I would think a wrapper for the non-GUI & non-plugin aspects of KX would be possible. Like making an addon (with its own GUI, or 'ini file' based) in GCC for instance.) Or does that conflict with the NDA E. signed?? Sorry if I ask dumb questions... Mark |
|
|
|
|
|
#6 |
|
d/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,418
Rep Power: 47 ![]() |
unfortunalty, making kX API "any compiler friendly" means rewriting everything in a pure C - a hell of stupid work... (that's not MS fault but general C++ weirdness - none of C++ compilers have compatible ABI). Finally, i'd say this would be a real waste of time (finally it would much easier for you to learn a basics of C++ then for anyone to rewrite anything from scratch in a lowerlevel language). Today, there're already three variants of free MS C++ compilers available for free (VC Toolkit (VC7.1), one built in DDK (same VC7.1 + all nesessary headers & libraries) and VC Express (VC8 + anything and IDE).
|
|
|
|
|
|
#7 |
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 36 ![]() ![]() |
Well I see your point max -thanks btw..
But Im more interested in the ability to import KX lib into other languages that are at least within my comprehension level - like FreeBasic or PureBasic. Which, can import C++ libs (in purebasic AFAIK)- but the name mangling need 'conversion' or something like that - But I was told the original SDK could be exported or wrapped in VC to allow more easier import... I most certainly could be (probably) confused in this, and for that I appologize.... I'm a programming idiot trying to learn and make something with KX SDK in any way I can. I tried VC and its just too much for my idiot brain to grasp. I'll stop now ![]() Thanks again Max. Mark |
|
|
|
|
|
#8 |
|
d/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,418
Rep Power: 47 ![]() |
btw. if i'm not mistaken - Eugene has blustered to provide such compability. I seriously doubt - but nobody made him to say so
Last edited by Max M.; Jan 4, 2007 at 02:49 AM. |
|
|
|
|
|
#9 |
|
S-3D enthusiast
|
I successfully compiled a few kX plugins (demo, TheDelay, TimeBalanceV2) using Microsoft Visual Studio .NET 2003 by using the includes and libs in Windows Driver Kit (WDK).
You have to download WDK (2,4 GB) and install it. The files from WDK that you need for compiling kX plugins only take about 49 MB of disk space. From reading the license of WDK, it does not seem that you can legally redistribute the headers and library files. I personally installed "Microsoft Document Explorer" and "WDK Build Environments, Samples, and Documentatin (Development Kit)". Microsoft Visual Studio .NET 2003 contains a list of include files and library files. You can get to that list that way : Tools->Options...->Projects->VC++ Directories. Before attempting to compile kX plugins, the IDE was already correctly set-up to compile Windows programs by having the includes ands libraries paths of DirectX and the Windows Platform SDK entered. To compile kX plugins, I added the following include folders : (WDK install folder)\inc\mfc42 (WDK install folder)\inc\api and the following library folders : (WDK install folder)\lib\mfc\i386 This worked to compile the demo and TheDelay plugins. When compiling TimeBalanceV2, I got a linker error on the function KillTimer. I fixed this by adding Code:
#define _AFX_ENABLE_INLINES |
|
|
|
|
|
#10 | |
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 36 ![]() ![]() |
Quote:
You mention we only need 49MB of what the WDK installs - yet the mcf42.zip file linked to above is showing 775KB only. I mean - thats > 50:1 compression ration does that sound right? Id like to avoid the extra ~1,195 (thats 'thousand') MB install of the build environment of the WDK? Has anyone verified the linked mfc42.zip works? edit: nvrmnd - that mfc42.zip file appears to be corrupt. winzip and winrare choke on it and I notice its only 50KB not the 775KB FF d/l manager indicated. So - I guess I'll just install the build env of WDK and let everyone know that mfc42.zip was very slow to D/L and the file doesnt open. Mark Last edited by Maddogg6; Feb 25, 2007 at 12:50 PM. |
|
|
|
|
|
|
#11 |
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 36 ![]() ![]() |
Update:
here before you is a complete moron who can confirm - after, installing the WDK with VC2003 as Tril posted, I was able to compile AND run successfully the KX demo plugin. And if I can do it - pfff.... |
|
|
|
|
|
#12 |
|
DH Senior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,884
Rep Power: 48 ![]() ![]() ![]() ![]() |
|
|
|
|
|
|
#13 | |
|
DriverHeaven Senior Member
Join Date: Mar 2003
Location: Montevideo, MN USA
Posts: 957
Rep Power: 0 ![]() |
Quote:
I guess I will have to go back to the beginning and see if I can figure out any of this type of programming. My only programming experience is AutoLISP and a smidgeon of visual basic. I don't know if any of that will even help me at all. But if I give this a try, it should move you up the ranks from moron to beginner, I will assume the moron position and scrub the kX toilets on the night shift. |
|
|
|
|
|
|
#14 |
|
DriverHeaven Extreme Member
Join Date: Jan 2005
Posts: 4,836
Rep Power: 41 ![]() ![]() ![]() |
Here is some updated info:
The WDK link has been moved, so it seems it is not so easy to get now (although it can be found elsewhere on the web). In any case it should not be needed. The Windows Server 2003 SP1 DDK should also work, and it is only 236MB (as opposed to 2.4 gigabytes). Install the DDK: The minimum options to install: Windows Driver Development Kit Common HeadersAnything else is optional. Add the WINDDK\3790.1830\inc\mfc42 folder to the list of includes (at the top) in VC. Add the WINDDK\3790.1830\lib\mfc\i386 folder to the list of libraries (at the top) in VC. Tested with MS Visual Studio .NET 2003. -Russ Last edited by Russ; Apr 19, 2007 at 01:23 AM. |
|
|
|
|
|
#15 |
|
DriverHeaven Junior Member
Join Date: Jan 2006
Posts: 28
Rep Power: 0 ![]() |
kx gui classes - reference
Hello,
Is there any document or thread here ini the forum or anywhere else which gives some details about the kx gui classes (kKnob, kPeak, kSlider, ...) and functions (create_vfader, ...)? I am looking at the header files and provided source code. Many of the gui classes are not used in the sources and header files don't have any comments .Regards, Frank |
|
|
|
|
|
#16 | ||
|
DH Senior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,884
Rep Power: 48 ![]() ![]() ![]() ![]() |
Quote:
Quote:
Besides, the class member function names in the headers (should) more or less speak for themself. FYI; kx gui classes are subclassed MFC controls so it shouldn't be to hard to figure out how they work. Else, just ask here. Cheers. Last edited by Lex Nahumury; Aug 6, 2008 at 10:12 AM. Reason: typo |
||
|
|
|
|
|
#17 |
|
DriverHeaven Junior Member
Join Date: Jan 2006
Posts: 28
Rep Power: 0 ![]() |
Thanks for the reply.
I shouldn't have said "most of" ... but some of the controls are not used in the sample sources. I am not able to find an example of using kKnob class. Actually I have no idea how it is supposed to look like. Is there a plugin somewhere that uses this class? I tried this: Code:
// kKnob test
knob = new kKnob;
knob->Size.init(50,50);
knob->create(0, 4, 4, this, KNOB_ID, 0, 100, -150, 300);
knob->set_pos(20);
knob->show();
Anybody has some sample code that uses this control? Regards, Frank |
|
|
|
|
|
#18 |
|
DH Senior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,884
Rep Power: 48 ![]() ![]() ![]() ![]() |
That is correct, kKnob is a non-functional control.
IIRC it's only a draft. It never got finished. Last edited by Lex Nahumury; Aug 6, 2008 at 10:14 AM. Reason: corr. |
|
|
|
|
|
#19 |
|
DriverHeaven Newbie
Join Date: May 2009
Posts: 10
Rep Power: 0 ![]() |
Re: kX Project SDK and development
thanks.But Im more interested in the ability to import KX lib into other languages that are at least within my comprehension level - like FreeBasic or PureBasic. Which, can import C++ libs (in purebasic AFAIK)- but the name mangling need 'conversion' or something like that - But I was told the original SDK could be exported or wrapped in VC to allow more easier import... I most certainly could be (probably) confused in this
________________________________________________ http://doiop.com/7283.jpghttp://doiop.com/7282.jpghttp://doiop.com/7281.jpghttp://doiop.com/7280.jpghttp://doiop.com/7279.jpghttp://doiop.com/7278.jpghttp://doiop.com/7277.jpghttp://doiop.com/7276.jpghttp://doiop.com/7275.jpghttp://doiop.com/7274.jpg |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|