Andy Poulsen
04-15-2003, 10:16 AM
Hi,
I know the only supported compiler on Windows is VC++ 6.0. Unfortunately, I've only got Visual Studio .NET.
I've discovered some things that will help to get this working, but still have some problems that I'd love to get help with.
The (compile-file ...) function appears to blow up in pass 3 (after the .C file has been generated). When I tried to compile a file, I got the error (in the console window) that 'cl' was not a valid program file (cl is the C compiler). I figured that it probably was just not in the path, so added that to the environment variable, restarted Designer Modeling, and tried again. Slightly different error, but still no go -- error on pass 3 (still).
So after doing a little digging, I found a file in the Visual Studio .NET\Common7\tools directory called vsvars32.bat whose whole purpose is to set up the correct environment variables to allow Visual Studio .NET to work from the command line. Since the batch file where the error was occurring is 'sdlcpas3.bat' I added a line right at the top to call vsvars32.bat to set the environment. It worked! (well, almost...)
It turns out that VC++ 6.0 missed some definitions and structures in their header files, (one notable one is tagPALETTEENTRY structure). As such, the .C file generated has this definition in it. VC++ .NET, however, has this defined, resulting in a duplicate definition (and thus a compile error). The line in the .C file preceding the definition is "#if _MSC_VER >= 1200" so the definition doesn't get set up on earlier versions. Unfortunately, it *does* get set up for ALL later versions...
I looked for any files that might be used as templates for this .C file to see if I could modify the above "#if ..." line not to define the structure, but was unable to find anything containing "tagPALETTEENTRY" in any of the OSD 11.6 directories.
I was able to generate the .dll file by modifying the .C file and manually running it through sdlcpas3.bat, but when I tried to load the resulting dll, I got an error message "Lisp Error: Initializer function not found for <filename>.dll" Is there something else that I need to do manually to make the dll work?
So 2 questions:
1) Any thoughts on how I can make solve the problem with the compiler (i.e. the duplicate struct definitions)?
2) Any ideas why the dll won't load properly? (I've compiled and loaded files on Unix before, but not on Windows).
Thanks for any help you can provide!
Andy
I know the only supported compiler on Windows is VC++ 6.0. Unfortunately, I've only got Visual Studio .NET.
I've discovered some things that will help to get this working, but still have some problems that I'd love to get help with.
The (compile-file ...) function appears to blow up in pass 3 (after the .C file has been generated). When I tried to compile a file, I got the error (in the console window) that 'cl' was not a valid program file (cl is the C compiler). I figured that it probably was just not in the path, so added that to the environment variable, restarted Designer Modeling, and tried again. Slightly different error, but still no go -- error on pass 3 (still).
So after doing a little digging, I found a file in the Visual Studio .NET\Common7\tools directory called vsvars32.bat whose whole purpose is to set up the correct environment variables to allow Visual Studio .NET to work from the command line. Since the batch file where the error was occurring is 'sdlcpas3.bat' I added a line right at the top to call vsvars32.bat to set the environment. It worked! (well, almost...)
It turns out that VC++ 6.0 missed some definitions and structures in their header files, (one notable one is tagPALETTEENTRY structure). As such, the .C file generated has this definition in it. VC++ .NET, however, has this defined, resulting in a duplicate definition (and thus a compile error). The line in the .C file preceding the definition is "#if _MSC_VER >= 1200" so the definition doesn't get set up on earlier versions. Unfortunately, it *does* get set up for ALL later versions...
I looked for any files that might be used as templates for this .C file to see if I could modify the above "#if ..." line not to define the structure, but was unable to find anything containing "tagPALETTEENTRY" in any of the OSD 11.6 directories.
I was able to generate the .dll file by modifying the .C file and manually running it through sdlcpas3.bat, but when I tried to load the resulting dll, I got an error message "Lisp Error: Initializer function not found for <filename>.dll" Is there something else that I need to do manually to make the dll work?
So 2 questions:
1) Any thoughts on how I can make solve the problem with the compiler (i.e. the duplicate struct definitions)?
2) Any ideas why the dll won't load properly? (I've compiled and loaded files on Unix before, but not on Windows).
Thanks for any help you can provide!
Andy