Hi David,
I've been testing PolyML 5.1 on windows and was wondering how I should go about creating a console PolyML application.
I've built polyml using Visual Studio 2005 and the Visual Studio 6 workspace. This worked with hardly any problems. Visual studio 2005 converted the .dsp to a solution without any warnings. Building the solution failed however, as two of the custom build commands needed the $(InputPath) variables double-quoting to protect spaces in the filenames. After this the build succeeded and I was able to export a simple function (fib.obj) and link it using:
link /OUT:fib.exe /SUBSYSTEM:WINDOWS fib.obj PolyLib.lib PolyMainLib.lib libcmtd.lib
This produces a windows executable using your console GUI (using WinMain as entry point which calls PolyWinMain).
What I would really like is an executable or DLL I can use from another application. I don't have much experience with windows programming and in particular DDE which you use for the console GUI so I realise I may be asking a silly question. I would be happy with a simple console application with interaction through stdin, stdout and stderr, so my question is - what's the best way of building such an application?
Am I right in thinking that the main runtime is entered through polymain() in PolyLib? Could this be exported along with PolyWinMain from PolyLib.dll and a main() stub be provided in PolyMain.lib. (I've noticed that if you call WinMain with a null pointer for the hInstance parameter you get an (apparently working) console application but this is surely a bad idea and unnecessary! ;-))
regards, Richard.