From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA26905; Wed, 22 Aug 2001 00:34:24 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA25762 for ; Wed, 22 Aug 2001 00:34:23 +0200 (MET DST) Received: from bbs.avalancheint.com (mail.avalanchesoftware.com [63.224.100.9]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f7LMYMX28481 for ; Wed, 22 Aug 2001 00:34:22 +0200 (MET DST) Received: from [10.0.0.7] (HELO travis2) by bbs.avalancheint.com (CommuniGate Pro SMTP 3.2.4) with SMTP id 1790293 for caml-list@inria.fr; Tue, 21 Aug 2001 16:34:20 -0600 Message-ID: <004d01c12a8f$3a21ad20$0700000a@travis2> From: "Travis Nixon" To: Subject: [Caml-list] Trouble getting Win32 native port to work Date: Tue, 21 Aug 2001 16:18:38 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I cannot for the life of me get labltk to compile under the native Win32 port. If I remove labltk from the "other libraries" list, everything is peachy keen (well, except for the fact that I can't use labltk yet). Has anybody else had this problem, and if so, were you able to solve it? I've tried both 3.01 and 3.02 and there was no difference between the two. I ran into a couple problems that I was able to solve. First, the rule to make io.h (copy it from the system includes) is circular with something else. I didn't really take the time to figure out what, I ended up just commenting out the rule for io.h and copying it manually. (I don't expect to be changing it anytime soon) :) Second, I had to add quotations around the end everywhere -cclib option was specified because the following: -cclib -lunix wsock32.lib only passes on -lunix as an option to the linker, the wsock32.lib and anything following goes to the original command. It should be written like this: -cclib "-lunix wsock32.lib" which gets rather hairy when you also have paths with spaces in them (like, oh, say, Program Files which is where windows likes to put everything), but I figured that one out too. (you can specify the paths in single quotes, so: -cclib "-lunix 'c:/program files/whoever/wsock32.lib'") Then I came to a problem I have no clue on. After those changes, when it got around to doing the final bytecode compile for labltk, I kept getting the following error: 4NT: /nologo is not a valid command Or whatever it is 4NT says. Speaking of which, I'm not positive, but I don't think the makefiles would work without 4dos or some other shell that understands the & command concatonation. I think we had problems with that on another project, but I don't remember for sure. Anyway...back to the problem I haven't figured out how to solve: After quite a lot of digging (and spending quite a bit of time looking at the same spot in the makefile saying "there is no command anywhere near there that has the /nologo argument") I think I figured out what's happening. This error happens while ocamlrun is using ocamlc to bytecompile and link all the labltk stuff together. As far as I can tell, the commands get hardcoded into the bytecode version of ocamlc, and that's where the command with /nologo is coming in. I'm not sure if this is present on the unix side of things, but /nologo is the command for most of the VC tools to keep it from printing "Hi, I'm Make" or "Hi, I'm CL, duh". However, the problem was not the /nologo argument. It just happened to be the first argument to the command that wasn't running correctly. If I look with a hex editor, it's easy to find the few instances of /nologo in there, and one of them turns out to be %cl /nologo /ML%. I verified that's where the command was coming from by changing the text to nolobo. Now, this is where I get lost. Because if it's really running "cl /nologo /ML yadda yadda" then there shouldn't be a problem. What it looks like it's actually doing though is dropping off the cl and trying to run "/nologo /ML" which obviously is not a valid command. The command itself comes from BYTECC followed by BYTECCLINKOPTS in config/Makefile.nt. Has anybody come across this very bizarre problem before? I suppose I could use the Win32 api instead of TK, but it's much easier to put things together quickly with tk. Please help, I'm drowning in ocaml.... PS, I had the binary install running perfectly, but if I end up using ocaml at all, it will be on console game machines, so I sort of need to be able to recompile. (although labltk certainly isn't a necessity for that end of things) :) While I'm here, I have a quick question. I had been looking at python previously, but there are a number of things that scare me half to death about it. Primarily the fact that it's dynamically typed. Combine that with the fact that I think you can actually have syntax errors in code that's been compiled but not yet run, and you really have far too many ways to set yourself up for disaster. Of course, there were also a number of things that I really liked about python. For one, it's dynamically typed. (heh, just kidding. I really like it for small things, but for anything large scale, I really think that's the clincher that would keep me away) Joking aside, there is one thing I had figured out how to do very well in python that I don't really see any way to do in ocaml: dynamically load/unload/reload code without restarting. It's a little tricky, and I really only got it working for functions, but with a little more work I think I could get it to work for objects too. But even if it only worked for functions, it could be a huge timesaver in a situation where you're trying to debug a level that takes 5 minutes to load to your PS2 devsystem across the network. :) I'm guessing no, but hopefully somebody will correct me and say there is a way to dynamically load code into ocaml? I'm just talking bytecode, not native compiled code. Which incidentally is another reason I'm looking at ocaml instead of python (although I really like python's syntax much more...caml is a little...er...weird?) Even if we couldn't get native compiled code on every platform we are working on, everything I've seen would lead me to believe that even bytecode ocaml is quite a bit faster than python. :) Anyway, hoping for some answers from somebody who knows a little more than me. Especially about the compile problems. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr