Dev-C++ Compiler Error Created 8 years ago2015-12-28 20:29:09 UTC by EsprimoP EsprimoP

Created 8 years ago2015-12-28 20:29:09 UTC by EsprimoP EsprimoP

Posted 8 years ago2015-12-28 20:29:26 UTC Post #327941
I'm sorta new to this program as well as new to c++ programming. I do know the basics of programming, just to make things a little clear.

I downloaded the sdk for goldsrc from moddb, opened the cl_dll project in dev-c++, changed the hud color, there's a tutorial on this site. So when I clicked on compile, this error showed up : "multiple target patterns" . And it highlighted this in red:
$(BIN): $(LINKOBJ) Tried searching the error on the web and nothing helped at all... I don't understand it. Something about colons but can't find the path to the line.

I'm simply a "noob" to this.
EsprimoP EsprimoPwEight
Posted 8 years ago2015-12-31 01:24:26 UTC Post #327993
Found some sort of path.. turns out every cpp and header file, every file actually... I was just changing hud color (r g and b values in health.cpp file)
EsprimoP EsprimoPwEight
Posted 8 years ago2015-12-31 01:31:49 UTC Post #327994
Did you test to see if the code compiled successfully BEFORE you made any changes? If it did, you've likely messed up some formatting somewhere, e.g. accidentally added a comma or something... If not then it's a deeper issue, either concerning the code or your software.
monster_urby monster_urbyGoldsourcerer
Posted 8 years ago2015-12-31 02:50:53 UTC Post #327996
I'm not 100% sure, but I've never compiled HL with anything aside from MS VC++. You might need to grab the express edition of VS2008 and try again.
Penguinboy PenguinboyHaha, I died again!
Posted 8 years ago2015-12-31 04:52:40 UTC Post #328000
sdk 2.3 works well with vc++ 6, u can time travel to the past and buy it from M$ for $5000
Posted 8 years ago2015-12-31 08:53:38 UTC Post #328001
Don't use the code from Moddb. The latest code can always be found on Valve's official github, updated for Visual Studio 2008
Oskar Potatis Oskar Potatis🦔
Posted 8 years ago2015-12-31 09:18:38 UTC Post #328002
Yeah, here's the link https://github.com/ValveSoftware/halflife?files=1. Though, it's actually Visual Studio 2010, but I think it has been updated to work with Visual Studio 2012 as well.
Dr. Orange Dr. OrangeSource good.
Posted 8 years ago2016-01-01 13:28:25 UTC Post #328024
Not gonna buy anything, Thanks for your replies. I'll keep digging until I find a free compiler that works well on SDK.
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-01 13:33:05 UTC Post #328025
I think old MSV C++ 6.0 it' s roud there for free.
Posted 8 years ago2016-01-01 13:40:22 UTC Post #328026
Visual Studio 2010 Express Edition is free: http://go.microsoft.com/?linkid=9709969
Oskar Potatis Oskar Potatis🦔
Posted 8 years ago2016-01-01 13:51:37 UTC Post #328028
I deleted a post that was linking to pirated software.

Just a reminder that we do not encourage piracy of any software on TWHL and you should avoid discussing it. We're usually pretty lenient on most rules but absolutely don't post links to pirated software on the site or you will be banned. Use common sense, people.

The SDK from Github compiles fine with express editions of VS, which are available for free from the Microsoft website. You don't need to buy (or pirate) anything.
Penguinboy PenguinboyHaha, I died again!
Posted 8 years ago2016-01-01 15:02:35 UTC Post #328030
@potatis_invalid, Thanks. I just hope It Isn't too large for my HDD, they are both 35 GB.

@Penguinboy I didn't request any cracked software and never will, thanks for the information.
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-01 15:50:04 UTC Post #328034
I can't find any tutorials about modding hl with vs. I simply create a project, add cl_dll folder files and after compilation get an error... missing file or directory const.h

I seriously can't find any help about setting up correctly
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-01 16:26:44 UTC Post #328035
Hope it wasn't me, penguinboy... :(
Posted 8 years ago2016-01-01 19:38:14 UTC Post #328038
Still found nothing useful... not even on Youtube, on the steam community there's only modding for source which I don't want.
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-01 20:34:57 UTC Post #328039
If you're using the github code, try the pre-made VS project files in the projects\vs2010 folder. projects.sln should work, or hldll.vcxproj and hl_cdll.vcxproj.
Oskar Potatis Oskar Potatis🦔
Posted 8 years ago2016-01-01 21:06:19 UTC Post #328040
Oh thanks. I'm not very familiar with projects in VS and stuff.. but C++ is understandable. What I did is create a project and inserted only stuff from cl_dll. Thanks for the info. I'm gonna edit something and see what happens

Edit: Another error...

1>------ Build started: Project: hl_cdll, Configuration: Debug Win32 ----
1> Creating library Debug\hl_cdll\client.lib and object Debug\hl_cdll\client.exp
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-01 21:44:57 UTC Post #328041
Oh yeah, I remember getting that error. I think I installed VS 2010 Service Pack 1 (it's an update): https://www.microsoft.com/en-us/download/details.aspx?id=23691
After that, switch from Debug to Release mode and click Clean solution. It should compile fine after that.
Oskar Potatis Oskar Potatis🦔
Posted 8 years ago2016-01-01 22:31:43 UTC Post #328042
Alright thanks.
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-01 23:03:41 UTC Post #328044
1> Generating code
1> Finished generating code
1> hl_cdll.vcxproj -> D:\HLSDK\projects\vs2010\Release\hl_cdll\client.dll
1> 'p4' is not recognized as an internal or external command,
1> operable program or batch file.
1> The system cannot find the path specified.
1> 0 file(s) copied.
1> 'p4' is not recognized as an internal or external command,
1> operable program or batch file.
1> The system cannot find the path specified.
1> 0 file(s) copied.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command "call ..\..\filecopy.bat D:\HLSDK\projects\vs2010\Release\hl_cdll\client.dll ..\..\..\game\mod\cl_dlls\client.dll
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: call ..\..\filecopy.bat D:\HLSDK\projects\vs2010\Release\hl_cdll\\client.pdb ..\..\..\game\mod\cl_dlls\client.pdb
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd" exited with code 1.
Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-01 23:58:05 UTC Post #328045
Go to hl_cdll Project properties. Select Configuration: "All Configurations" in the list at the top left. Go to Build Events > Post-Build Event. Replace the text in Command Line with this:
copy "$(TargetPath)" "YOUR-MOD\cl_dlls\$(TargetName).dll"
Replace YOUR-MOD with the path to your Half-Life mod folder. Example:
copy "$(TargetPath)" "D:\Games\Steam\steamapps\common\Half-Life\mymod\cl_dlls\$(TargetName).dll"
The equivalent Command Line text for the hldll project is:
[quote]
copy "$(TargetPath)" "YOUR-MOD\dlls\$(TargetName).dll"
Make sure the cl_dlls and dlls folders exist in your mod folder if they don't already.
Oskar Potatis Oskar Potatis🦔
Posted 8 years ago2016-01-02 11:43:07 UTC Post #328047
Success. It compiled.

When I run the mod, the "could not load library .../client.dll" error shows up. I did put it in mod/cl_dlls and the other one in mod/dlls.
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-02 12:23:39 UTC Post #328048
What's the content of your liblist.gam file?
Oskar Potatis Oskar Potatis🦔
Posted 8 years ago2016-01-02 13:06:53 UTC Post #328049
game "My Mod (Afraid of Idea stealers)"
startmap "lvl_1a0"
trainmap "null"
mpentity "info_player_deathmatch"
gamedll "dlls\hl.dll"
gamedll_linux "dlls/hl.so"
gamedll_osx "dlls/hl.dylib"
secure "1"
type "singleplayer_only"
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-02 14:49:35 UTC Post #328050
Weird... I just went through the same steps and set up a mod and it worked...

Do you have a Half-Life folder in Steam\SteamApps\YOUR-STEAM-LOGIN-NAME? (you shouldn't)

Are your files named like this:
Steam
-SteamApps
--common
---Half-Life
--mymod
-----liblist.gam
-----cl_dlls
------client.dll
-----dlls
------hl.dll
?

Is your client.dll 592 KiB in size and your hl.dll 1073 KiB?
Oskar Potatis Oskar Potatis🦔
Posted 8 years ago2016-01-02 14:56:53 UTC Post #328051
I have nonsteam. If it is not supported here then I will buy it. If you are not going to ban me then what can I do with nonsteam to make it work?
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-02 15:06:35 UTC Post #328052
Check your PM inbox.
Oskar Potatis Oskar Potatis🦔
Posted 8 years ago2016-01-02 15:14:54 UTC Post #328053
If you mean the WON version of Half-Life, here's some links which could interest you:

Installing instructions

http://articles.thewavelength.net/218/

Programs needed

https://www.microsoft.com/en-us/download/details.aspx?id=26

https://www.microsoft.com/en-us/download/details.aspx?id=16217

https://www.gnu.org/software/make/

A bit hard to follow, but TWL is known for its seriousness.
Posted 8 years ago2016-01-02 15:23:18 UTC Post #328054
Posted 8 years ago2016-01-03 12:03:04 UTC Post #328064
Your last post is for any version since It's the old SDK right?
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-03 15:25:58 UTC Post #328066
It's for WON versions afaik.
Posted 8 years ago2016-01-03 15:34:52 UTC Post #328067
The hell are you talking here, sdk 2.3 came out in 2002 or smth when HL was already at it's best
Posted 8 years ago2016-01-03 16:02:57 UTC Post #328068
SDK 2.3 is what I'm using to make my WON mod :/
Posted 8 years ago2016-01-03 16:14:35 UTC Post #328069
I'll try on the other than WON
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-03 18:24:27 UTC Post #328071
In your liblist.gam you will need:

cldll "1"

to tell the game you have a custom client dll.
Posted 8 years ago2016-01-03 21:03:44 UTC Post #328073
Maybe I'll do a silly question but... why VALVE haven't released a program to compile and edit its own SDKs like they did with their maps and Worldcraft?, is it because the actual version of C++11 it's a licensed languaje (ISO/IEC 14882:2011)?. :rly. :
Posted 8 years ago2016-01-03 21:12:37 UTC Post #328074
@Unq, nope, tried that before.

@abbadon Seriously though... but I don't know.

I didn't actually uninstall 2010 because It takes so long. I'm gonna do it again but are VS 2008 and the SDK you gave me correct for my nonsteam mod? (Not sharing links and not author of the pirated version just saying not to get in trouble). I mean, I just edit the hud color. Nothing else.
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-03 21:23:51 UTC Post #328075
Sure it'll work, tried when I compiled my old v1.0 of my Mod and also worked for others. Btw, none of the links are of illegal sw... :\
Posted 8 years ago2016-01-04 16:16:44 UTC Post #328083
Oh my god please give me a direct link to the needed 2008 I beg you, the one you gave above downloads 2015.
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-04 16:53:48 UTC Post #328084
Posted 8 years ago2016-01-04 18:38:44 UTC Post #328087
Thanks, everything works just fine now. Woo :D
Also thanks for having patience.
EsprimoP EsprimoPwEight
Posted 8 years ago2016-01-04 18:41:54 UTC Post #328089
Welcome to the mod experience!!, but, warning!!! is SO adictive!!! ;)
Posted 8 years ago2016-01-11 01:45:03 UTC Post #328181
@abbadon C++ is not a licensed language, ISO/IEC are a list of norms for anyone involved into the development C++ language.

VALVE used Microsoft Visual C++ 5 with Service Pack to code Half-Life, they didn't had to make compilers.

@EsprimoP I strongly suggest that you don't start Gold Source programming right now, learn the C and C++ languages and how to create basic console applications with those languages. Once you have done that and you are enough confident with those languages, you may proceed to Gold Source programming.
You must be logged in to post a response.