Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: BlackBox on September 24, 2005, 07:07:11 PM

Title: Op2 Compiler
Post by: BlackBox on September 24, 2005, 07:07:11 PM
I've finally put together a 'package' for OP2 DLL coding, which no longer needs a copy of MSVC to work properly.

This package uses the free Microsoft Visual C++ Toolkit 2003 compiler, CodeBlocks IDE, and the Platform SDK headers.

Instructions and download at http://wiki.outpostuniverse.net/Compiler_Setup (http://wiki.outpostuniverse.net/Compiler_Setup)

We suggest everyone download this, as it's much better than MSVC!

(Note: We will always continue to support MSVC. This is mainly for the people who don't want a large download or don't want to get MSVC. Besides, it's more stable than MSVC anyway <_<).

Any questions / comments, post them here!

-- op2hacker
Title: Op2 Compiler
Post by: spirit1flyer on September 24, 2005, 08:19:39 PM
Thanks Hacker  :)  I am downloading now   :D


spirit
Title: Op2 Compiler
Post by: thablkpanda on September 24, 2005, 11:13:27 PM
I've kept up with the development process, so I'm looking forward to the outcome. Nice idea- I'll be downloading now.

Panda
Title: Op2 Compiler
Post by: Leviathan on September 25, 2005, 06:43:19 AM
Good work!
Title: Op2 Compiler
Post by: BlackBox on September 25, 2005, 08:10:55 AM
Good to see people like it :)

The instructions are clear enough, I hope?
Title: Op2 Compiler
Post by: spirit1flyer on September 25, 2005, 09:43:38 AM
yes I am working on coding now   B)
  You could not have made the install help better  ;)  
Title: Op2 Compiler
Post by: leeor_net on September 25, 2005, 01:45:43 PM
'tis pretty cool... but... I find MSVC to be very stable. Unless you're talking about the IDE... in which case mine is still very stable. Are you using 6.0? If that's the case then that's your problem. I've got .NET/2002 and it works very well for me (i just can't compile things for use on less than Win2K systems which I'm ok with anyway).
Title: Op2 Compiler
Post by: TH300 on September 25, 2005, 03:56:02 PM
how hard would it be to support MingW/GCC as compiler? Then I could actually use it. The VC++ Toolkit doesn't run (not even install) on Windows 98.

PS: since VC++6 works on my comp it doesn't hurry.
Title: Op2 Compiler
Post by: BlackBox on September 25, 2005, 04:20:00 PM
MingW will probably never work because the exported name decoration is way different from MSVC's. OP2 uses MSVC name decoration.

Yeah, I was talking MSVC 6 IDE. It has a tendency to crash or do some odd things. Not sure about .NET IDE, I've never used it but I'll have to assume it's better...

As for Win9x -- It'd probably run fine. Maybe I'll make a package with just the exe's for the compiler; maybe you can get that to work.

the .NET framework is probably the reason it won't install. (Which it doesn't REQUIRE to run)
Title: Op2 Compiler
Post by: TH300 on September 25, 2005, 04:26:42 PM
Quote
the .NET framework is probably the reason it won't install. (Which it doesn't REQUIRE to run)
its probably not. I have installed the .net-framework. Yea, the exe's might still work. Its the installer that refuses to unpack them.
Title: Op2 Compiler
Post by: Leviathan on September 25, 2005, 04:30:36 PM
When i run the toolkit installer it says: The InstallScript engine is missing from this machine. If available, please run ISScript.msi, or contact your support personnel for further assistance.

Dam microsoft.
Title: Op2 Compiler
Post by: BlackBox on September 25, 2005, 05:28:25 PM
Download and run the MSI file located inside this ZIP to fix the problem:

http://support.installshield.com/kb/files/...8/IsScript9.zip (http://support.installshield.com/kb/files/Q108158/IsScript9.zip)

And you can download the compiler files at:
http://www.outpostuniverse.net/files/coding/toolkit.rar (http://www.outpostuniverse.net/files/coding/toolkit.rar)

Just extract to a folder. Start Codeblocks, go to Settings > Compiler. Select MSVC++ Toolkit from the list. Go to the Programs tab and browse for the folder you extracted to.

Follow the rest of the directions as normal.
Title: Op2 Compiler
Post by: zigzagjoe on September 25, 2005, 08:32:43 PM
gj. i find both msvc environments rock solid; have never had it crash on me. [MSVC+ 6; MSVS.net 2003 Enterprise]
Title: Op2 Compiler
Post by: HaXtOr on October 04, 2005, 10:04:33 PM
Wee now I can make use of my old trusty 286 and comile op2 levels with it lol
Title: Op2 Compiler
Post by: Mcshay on October 12, 2005, 05:22:19 PM
Is there another way to make missions? I can't run Microsoft Visual C++ on my Me.

Edit: I figured it out  :D

Edit2: When i close CodeBlocks, i get a error message... hmmm.
Title: Op2 Compiler
Post by: Leviathan on October 12, 2005, 06:56:57 PM
Yeah if people wanna use notepad/text editor they can. Just gotta get someone else to compile it to a DLL.
Title: Op2 Compiler
Post by: Stormy on October 12, 2005, 11:20:50 PM
So, will this allow me to program other things besides op2 stuff also? (if i download that library thing ZZJ was talking about)


Whee... 200th post :D:D:D

I think i have a new title now :D:D:D  :P  B)

Stormy  :op2:
wasn't here  :ph34r:  
Title: Op2 Compiler
Post by: spirit1flyer on October 12, 2005, 11:49:47 PM
Quote
Edit2: When i close CodeBlocks, i get a error message... hmmm.

that happens to me everytime I use it too  ;)  but it does not seem to create any problems so its fine by me  :P  
Title: Op2 Compiler
Post by: zigzagjoe on October 13, 2005, 08:00:24 AM
if you need/want to use notepad to edit files for some reason, pm me for the cmdline bit i made.

I also get said error msg.....
Title: Op2 Compiler
Post by: BlackBox on October 13, 2005, 01:56:09 PM
Yeah, the error message is nothing to be concerned about.

I've had it happen to me as well, but not every time I exit.

It has something to do with wxWindows (not sure exactly what), but I'd hope it'll be fixed in a coming version of CodeBlocks.

The program still works proper functionally.

stormy: Library thing? It should work properly if you downloaded the platformsdk-headers.rar (or have MSVC installed and used the headers/libs from that)

You won't need any extra files to compile normal windows programs.
Title: Op2 Compiler
Post by: Stormy on October 13, 2005, 04:28:00 PM
Ok cool, And it's legal too :D:D, so I can give my copy of MSVC 2.1 to a Museum or something  :lol:

So, If I ever get back into coding... (Modeling is a bigger priority now... man I wish I didn't have to sleep.... go alll day and alll night.. and then go to school... and then come home, do Homework, Model stuff, play op2, go outside or something, program something...


If only...  :ph34r:

Stormy  :op2:  
Title: Op2 Compiler
Post by: Mcshay on October 13, 2005, 06:36:39 PM
I've gotten everything to work, untill I noticed code blocks wasn't making dlls. I checked the settings, and they're right. I used the link Hacker posted instead of the MSVC++ download, because it wouldn't work on Me (somehow the other one did). What is wrong?
Title: Op2 Compiler
Post by: zigzagjoe on October 13, 2005, 06:57:39 PM
check in ./ReleaseMinSize for OP2Script.dll. it should be there when using msvc; for codeblocks i have no idea where it puts it.
Title: Op2 Compiler
Post by: Mcshay on October 13, 2005, 07:04:19 PM
What are you asking me to do?? I don't get it.
Title: Op2 Compiler
Post by: spirit1flyer on October 13, 2005, 07:25:46 PM
did you do this step?

Quote
Installing the OP2 SDK
Unpack the op2_cbsdk.rar file you downloaded to any folder. Go into CodeBlocks, to the Settings > Compiler > Directories tab again. Click the lower Compiler tab, and add the \Include folder from the OP2 SDK that you just unpacked to the list. Next, click the lower Linker tab, and add the \Lib folder from the folder you just unpacked. Click OK in the dialog box, and exit CodeBlocks.

Go into the folder you just unpacked, and open the \CB_Templates folder. This folder contains the project templates for use in CodeBlocks.

Copy the contents of the folder (not the CB_Templates folder itself, but the share folder inside of it) to the CodeBlocks installation folder. (Usually C:\Program Files\CodeBlocks). Click Yes to All if it asks about overwriting files with the same names here.

Title: Op2 Compiler
Post by: Mcshay on October 13, 2005, 07:26:55 PM
Yes.
Title: Op2 Compiler
Post by: Hooman on October 14, 2005, 01:48:26 AM
Well, if the compiler runs, and you're not getting a DLL, then it's probably gotta have something to do with the linker. Are you not getting any output? Or are you getting an EXE instead of a DLL? If that's the case, it's a compiler flag. If you're not getting anything out, then it's probably not calling the linker on the compiled object modules.
Title: Op2 Compiler
Post by: Mcshay on October 14, 2005, 05:37:59 AM
I'm not getting anything out.
Title: Op2 Compiler
Post by: BlackBox on October 14, 2005, 07:30:37 AM
You tried this right?

Quote
And you can download the compiler files at:
http://www.outpostuniverse.net/files/coding/toolkit.rar (http://www.outpostuniverse.net/files/coding/toolkit.rar)

Just extract to a folder. Start Codeblocks, go to Settings > Compiler. Select MSVC++ Toolkit from the list. Go to the Programs tab and browse for the folder you extracted to.

This sets the correct path for your compiler (since it won't auto-detect it since you didn't run the actual installer)

Make sure you follow all of the other directions on the setup page, to configure the linker settings and what not. Just skip the part about the "Compilers auto detection" window, and insert the above directions in instead.

Are you getting any error messages at all when you try to compile?
Title: Op2 Compiler
Post by: TH300 on October 14, 2005, 01:04:20 PM
CodeBlocks + the toolkit do also not work on my comp. (I have the toolkit-package that hacker made, too)
I got some error, but don't remember it. I will find it out later.

EDIT: here is it:
Quote
Switching to target: default
Main.cpp
c1xx : fatal error C1083:
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings
Title: Op2 Compiler
Post by: Mcshay on October 14, 2005, 06:49:33 PM
i did use that toolkit, I get no errors, I followed all the instructions. So then it's not calling the linker?
Title: Op2 Compiler
Post by: Mcshay on October 15, 2005, 07:45:58 AM
Quote
CodeBlocks + the toolkit do also not work on my comp. (I have the toolkit-package that hacker made, too)
I got some error, but don't remember it. I will find it out later.

EDIT: here is it:
Quote
Switching to target: default
Main.cpp
c1xx : fatal error C1083:
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings
I just noticed i get that too.
Title: Op2 Compiler
Post by: Mcshay on October 15, 2005, 11:53:32 AM
Quote
check in ./ReleaseMinSize for OP2Script.dll. it should be there when using msvc; for codeblocks i have no idea where it puts it.
I just did a search for that dll, and nothing turned up.
Title: Op2 Compiler
Post by: Leviathan on October 15, 2005, 01:39:42 PM
I suggest you download MSVC. Your have no problems with it.
Title: Op2 Compiler
Post by: Hooman on October 15, 2005, 05:11:50 PM
I have no idea what the problem is, and to be honest I've never used codeblocks, but I've googled the error message and came across the following:

Quote
When "Command execution failed" appears, switch to the "Code::Blocks Debug" message tab. It contains the failed command line.
To display this tab, if it is not visible, go to Settings/Environment (you will have to restart CB to show it).

and if that's nonsense:
Quote
in Setting/Configure Plugins/Compiler
select the correct compiler,
click on the "Other" tab and
set "Compiler Logging" combo to "Full Command Line"
than post again the compiler log
Apparently that will give better error messages. At least then we'd have a better idea how to help.

Or maybe this is all just nonsense. I really wouldn't know. :(
 
Title: Op2 Compiler
Post by: Mcshay on October 15, 2005, 07:21:04 PM
Hmm... nothing in any areas discovered using those instructions said anything about an error.

Edit: I saw something online in which these two lines i get:

Main.cpp
c1xx : fatal error C1083:

would mean that Main.ccp does not exist, or cannot be opened.

Linky: http://www.icsharpcode.net/opensource/sd/F...p?TOPIC_ID=7714 (http://www.icsharpcode.net/opensource/sd/Forum/topic.asp?TOPIC_ID=7714)

Edit2: also, this is my full compiler readout from the mentioning of Main.ccp:

Main.cpp
c1xx : fatal error C1083:
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Title: Op2 Compiler
Post by: Mcshay on November 23, 2005, 04:38:33 PM
I seem to only get 1/10th of the files in MSVC++'s /include file and mabe my lib file on my Xp computer, I get all of them on my Me.