Author Topic: compiling fonline_tla.cpp  (Read 2473 times)

compiling fonline_tla.cpp
« on: April 28, 2014, 05:39:29 pm »
Hello,
I'm quite new to modding, although i do have some programming experience, and i'm new working on a windows platform and batch files. I have made some changes to the fonline_tla.cpp, and wanted to compile it, as i've seen in this forum, i got all the relevant SDK's (6.0a, 7.0a), and i have VS2013 (if that's relevant, although i am working with notepad++ as i am not familiar with VS IDE), when i finished my changes i went to the make_tla file and got the relevant directories changes to match where i have installed my sdk's and VS, and tried to comiple, but it failed resulting in the following errors:

Code: [Select]
Could Not Find C:\Users\Avishay\Google Drive\Van Buren Project\Van Buren\Server\
scripts\./fonline_tla.dll
'cl.exe' is not recognized as an internal or external command,
operable program or batch file.
'link.exe' is not recognized as an internal or external command,
operable program or batch file.
and a bunch of following errors resulting from not having compiled or linked anything.


I am not sure what i am doing wrong, it could perhaps be just me being ignorant in compiling under windows and using batch files.
the following is my "make_tla" batch, after i have modified it according to my folders:
Code: [Select]
@echo off

@: Environment
@set PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;%PATH%
@set PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN;%PATH%
@set LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB;%LIB%
@set LIB=C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Lib;%LIB%
@set LIB=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib;%LIB%
@set LIB=.\StlPort;%LIB%
@set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;%INCLUDE%
@set INCLUDE=.\StlPort;%INCLUDE%

@: Server
@del "./fonline_tla.dll"
cl.exe /nologo /MT /W3 /O2 /Gd /D "__SERVER" /Fo"./fonline_tla.obj" /FD /c "./fonline_tla.cpp"
link.exe /nologo /dll /incremental:no /machine:I386 "./fonline_tla.obj" /out:"./fonline_tla.dll"

@: Client
@del "./fonline_tla_client.dll"
cl.exe /nologo /MT /W3 /O2 /Gd /D "__CLIENT" /Fo"./fonline_tla_client.obj" /Fd"./" /FD /c "./fonline_tla.cpp"
link.exe /nologo /dll /incremental:no /machine:I386 "./fonline_tla_client.obj" /out:"./fonline_tla_client.dll"

@: Delete unnecessary stuff
@del "./fonline_tla.obj"
@del "./fonline_tla.exp"
@del "./fonline_tla.lib"
@del "./fonline_tla_client.obj"
@del "./fonline_tla_client.exp"
@del "./fonline_tla_client.lib"
@del "./vc100.idb"

@pause

Offline Wipe

  • Rotator
  • Random is god
Re: compiling fonline_tla.cpp
« Reply #1 on: April 29, 2014, 08:48:13 am »
You have to run them under VS command prompt (in MSVC 2008 it's Programs -> Microsoft Visual C++ -> Visual Studio Tools -> Visual Studio Command Prompt) which sets all what should be set.

It may be really good idea to sit before IDE for a day, get used to it, and make a project(s) for your dlls. Time "wasted" now will pay off later, when/if code will grow.
Sadly TLA does not provide any project, but you can use 2238 extensions as a base and cut everything you won't need. There's at least one project for each target so it shouldn't be too hard to modify it to your needs.
Games are meant to be created, not played...

Re: compiling fonline_tla.cpp
« Reply #2 on: April 29, 2014, 11:04:28 am »
Hi, and thanks for the answer, it helped, i did manage to compile the project as you suggested. so thanks :)