Visual Studio 2008 Express Edition

Started by Hooman, September 16, 2008, 06:47:28 PM

Hooman

Just so people know, you can download C++, C#, VB, ... and some other junk, for free, from Microsoft. It might be an alternative for those people that want to make OP2 levels and don't want to use CodeBlocks. This download comes with an IDE as well as the compiler. Please note that only the C++ pack is particularly relevant to making OP2 levels. Of course some of the others might be fun to download and try out too. :)

http://www.microsoft.com/express/product/default.aspx


Btw, I haven't actually tried to use this version of C++ to make an OP2 level yet. No word yet on how well that works.


Edit: And of course, the MSDN library, in case you need to look up any system related API functions. It's huge and takes a while to install.


Sirbomber

#1
Thanks, Hooman!  CodeBlocks was making my DLLs buggy!
Of course, now I need to figure out how to set it up...
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Hooman

#2
Try starting a new DLL project, moving all your files into it, placing the SDK where the files can be #included properly, add the .lib for the SDK, and possibly for LibCTiny as well, and try to adjust the DLL load address. That should be all the important things to do.

Or in terms of errors you'll likely encounter:
1) Compile Errors: 
    a] Set project type to DLL (so it looks for DllMain instead of main)
    b] Find a good place for the SDK headers, so you can #include them
2) Link Errors:
    a] Include needed libraries, so all the functions in the SDK headers are found in Outpost2.exe
3) Load performance:
    a] Set the load address to an unoccupied memory range so the DLL doesn't need to be relocated when the Windows loader loads it. Check the old project files for MSVC 6.0 or CodeBlocks to find the address used there. (Possibly "Module Address" or something like that).



Perhaps we need a preformatted text tag. :P

HaXtOr

trying to get it to work getting this problem

LibCTiny.lib(DLLCRT0.OBJ) : warning LNK4229: invalid directive '/OPT:NOWIN98' encountered; ignored
LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
Build log was saved at "file://c:\Outpost2\Mission_SDK__2008\Outpost2-Mission-SDK\TemplateMission-Hooville\ReleaseMinSize\BuildLog.htm"
OP2Script - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

HaXtOr

Oh GAY! i figured it out!

MSVS2008

QuoteThe Windows 95, Windows 98, Windows ME, and Windows NT platforms are no longer supported. These operating systems have been removed from the list of targeted platforms.

zigzagjoe


AmIMeYet

#6
Sorry for this necropost, but I think it's worth mentioning (for new people looking in to this, like me) that there is now a way to make this work.

topic here

The thing stopping the compiler from compiling was libctiny.lib, added in an effort to decrease dll size, that calls another library not compatible with this new release.