PDA

View Full Version : [SOLVED] Module Compile Error - Unresolved External Symbol


Shooting King
10-06-2013, 12:22
1>------ Build started: Project: csx, Configuration: Debug Win32 ------
1>Build started 10/6/2013 3:28:31 AM.
1>InitializeBuildStatus:
1> Touching "Debug\csx.unsuccessfulbuild".
1>ClCompile:
1> CMisc.cpp
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Hl sdk\hlsdk-2.3-p3\multiplayer\engine\eiface.h(416): warning C4005: 'ARRAYSIZE' : macro redefinition
1> C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\winnt.h(1140) : see previous definition of 'ARRAYSIZE'
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Metamod Sdk\metamod-1.19\metamod\meta_api.h : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
1> CRank.cpp
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Hl sdk\hlsdk-2.3-p3\multiplayer\engine\eiface.h(416): warning C4005: 'ARRAYSIZE' : macro redefinition
1> C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\winnt.h(1140) : see previous definition of 'ARRAYSIZE'
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Metamod Sdk\metamod-1.19\metamod\meta_api.h : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
1> meta_api.cpp
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Hl sdk\hlsdk-2.3-p3\multiplayer\engine\eiface.h(416): warning C4005: 'ARRAYSIZE' : macro redefinition
1> C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\winnt.h(1140) : see previous definition of 'ARRAYSIZE'
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Metamod Sdk\metamod-1.19\metamod\meta_api.h : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
1> rank.cpp
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Hl sdk\hlsdk-2.3-p3\multiplayer\engine\eiface.h(416): warning C4005: 'ARRAYSIZE' : macro redefinition
1> C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\winnt.h(1140) : see previous definition of 'ARRAYSIZE'
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Metamod Sdk\metamod-1.19\metamod\meta_api.h : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
1> usermsg.cpp
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Hl sdk\hlsdk-2.3-p3\multiplayer\engine\eiface.h(416): warning C4005: 'ARRAYSIZE' : macro redefinition
1> C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\winnt.h(1140) : see previous definition of 'ARRAYSIZE'
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Metamod Sdk\metamod-1.19\metamod\meta_api.h : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
1> amxxmodule.cpp
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Hl sdk\hlsdk-2.3-p3\multiplayer\engine\eiface.h(416): warning C4005: 'ARRAYSIZE' : macro redefinition
1> C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\winnt.h(1140) : see previous definition of 'ARRAYSIZE'
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Metamod Sdk\metamod-1.19\metamod\meta_api.h : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
1>..\sdk\amxxmodule.cpp(2064): error C2065: 'SVN_VERSION' : undeclared identifier
1>..\sdk\amxxmodule.cpp(2427): error C2065: 'SVN_VERSION' : undeclared identifier
1> Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:06.04

Bos93
10-06-2013, 13:11
comment this define and convert the source file to either DOS or UNIX format with notepad

claudiuhks
10-06-2013, 15:31
Make sure SVN_VERSION is declared before to be used.

Shooting King
10-06-2013, 23:59
This is CSX module given by AmxModx SDK it self and the rest is from HLSDK, Microsoft SDK, MetaModSDK. Why should we have to edit it ??

claudiuhks
10-07-2013, 05:45
This is CSX module given by AmxModx SDK it self and the rest is from HLSDK, Microsoft SDK, MetaModSDK. Why should we have to edit it ??

Make sure your HLSDK and Meta Mod header files are alright. There are many versions that mismatch. Please try to edit as required, otherwise, I'll publish when I'll get home an archive containing these headers that work. Also I'll post some explanations.

Shooting King
10-08-2013, 01:27
I don't understand why should you edit these SDK's ?? Doesn't these error's be rectified my Valve or respective SDK organisations ?? Or Does these people use another compiler ??

commonbullet
10-08-2013, 23:17
I don't understand why should you edit these SDK's ?? Doesn't these error's be rectified my Valve or respective SDK organisations ?? Or Does these people use another compiler ??

It's been a long time since the latest "official" HLSDK was released. Some changes have been made in order to prevent errors and warnings on newer compilers. It's now being updated on github (https://github.com/ValveSoftware/halflife); you might want use the one provided on http://hg.alliedmods.net/hl2sdks since that's the source for amxmodx builds.

You should get rid of those "Mac file format detected" if you use the metamod-am from http://hg.alliedmods.net (recommended).

joropito
10-09-2013, 09:14
If you use valve provided SDK you have to compile using VC6.0

There's a pull request to support VC++ 2010

https://github.com/ValveSoftware/halflife/pull/1375

Also you have to fix SVN_VERSION issue maybe you can define it in your project properties

Shooting King
10-10-2013, 03:07
Ok. Thanks. Now my Head is Flooding with these suggestions :D. I have converted some of metamod headers from Mac Format and edited some errors :/. Now it shows a New Compilation error :(.
1>------ Build started: Project: csx, Configuration: Debug Win32 ------
1>Build started 10/8/2013 10:33:24 PM.
1>InitializeBuildStatus:
1> Touching "Debug\csx.unsuccessfulbuild".
1>ClCompile:
1> CMisc.cpp
1> CRank.cpp
1> meta_api.cpp
1> rank.cpp
1> usermsg.cpp
1> amxxmodule.cpp
1> Generating Code...
1>Link:
1> Creating library .\Debug/csx_amxx.lib and object .\Debug/csx_amxx.exp
1>amxxmodule.obj : error LNK2019: unresolved external symbol "void __cdecl UTIL_LogPrintf(char const *,...)" ([email protected]@YAXPBDZZ) referenced in function _Meta_Query
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Amxx sdk\amxmodx-central-81ff4ff3da92\dlls\cstrike\csx\msvc10\Debug\cs x_amxx.dll : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:06.68
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I am using "metamod-1.19" SDK. Will it cause any problems ??

joropito
10-10-2013, 09:02
I am using "metamod-1.19" SDK. Will it cause any problems ??
You have to use latest amxmodx/metamod/hlsdk sources supported by amxmodx

Shooting King
10-10-2013, 10:04
-_-

2013-02-16 1.20
- Changed loading of Linux game dll to first try to find the dll under
known name with the last '_*' part stripped out. Falls back to the
old known name if a file with the stripped name is not found.

I am On Windows. If again replace 1.19 by 1.20, these errors will come again from the first and i have to fo bla bla... things again :(

joropito
10-10-2013, 10:28
Get 1.21-am from here
http://www.amxmodx.org/downloads.php

Shooting King
10-10-2013, 10:37
With MetaMod 1.20 FAIL :(
Same story.
1>------ Build started: Project: csx, Configuration: Debug Win32 ------
1>Build started 10/9/2013 5:18:25 AM.
1>InitializeBuildStatus:
1> Touching "Debug\csx.unsuccessfulbuild".
1>ClCompile:
1> CMisc.cpp
1> CRank.cpp
1> meta_api.cpp
1> rank.cpp
1> usermsg.cpp
1> amxxmodule.cpp
1> Generating Code...
1>Link:
1> Creating library .\Debug/csx_amxx.lib and object .\Debug/csx_amxx.exp
1>amxxmodule.obj : error LNK2019: unresolved external symbol "void __cdecl UTIL_LogPrintf(char const *,...)" ([email protected]@YAXPBDZZ) referenced in function _Meta_Query
1>C:\Documents and Settings\Administrator\My Documents\Backup\Tutorials\Amxx Modules\Amxx sdk\amxmodx-central-81ff4ff3da92\dlls\cstrike\csx\msvc10\Debug\cs x_amxx.dll : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:09.39
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Now will do with 1.21-am :(
EDit: There is no source in the link you have provided. Only Binaries.

YamiKaitou
10-10-2013, 18:33
Metamod-AM: http://hg.alliedmods.net/metamod-am/
HLSDK: http://hg.alliedmods.net/hl2sdks/hlsdk/
AMXX: http://hg.alliedmods.net/amxmodx-central/

You need the latest version from each of those links to properly compile the modules

Shooting King
10-13-2013, 08:44
Sorry for the delay, AlliedModders is down for the past days.Thanks guys At last the Compile Succeeded. I forgot to update Amx Source :P.