Raised This Month: $12 Target: $400
 3% 

C linkage error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
killerZM
Senior Member
Join Date: Sep 2016
Old 03-16-2017 , 09:34   C linkage error
Reply With Quote #1

PHP Code:
c:\users\mhmdbedo\desktop\module_sdk\md_sdk\amxxmodule.cpp(2250): error C2733'Meta_Query' second C linkage of overloaded function not allowed
          c
:\users\mhmdbedo\desktop\module_sdk\metamod\meta_api.h(130) : see declaration of 'Meta_Query' 
tried :
1 : https://forum.openframeworks.cc/t/er...of-0-8-0/13333

2 : http://stackoverflow.com/questions/4...-allowed-c2733

3 : http://stackoverflow.com/questions/3...ibrary-stdio-h

4 : http://stackoverflow.com/questions/2...is-not-allowed

none helped
killerZM is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-16-2017 , 09:59   Re: C linkage error
Reply With Quote #2

Meta_Query in amxxmodule.cpp probably has a different prototype than one in meta_api.h for whatever reason. Where did you get your amxx SDK and metamod from?+

Post your code, or if you are using VS the whole project folder.

Last edited by klippy; 03-16-2017 at 10:01.
klippy is offline
killerZM
Senior Member
Join Date: Sep 2016
Old 03-16-2017 , 10:09   Re: C linkage error
Reply With Quote #3

i use vs 2013
sdk from https://forums.alliedmods.net/showth...27769?t=227769
i tried to compile fun module same error
killerZM is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-16-2017 , 10:52   Re: C linkage error
Reply With Quote #4

Clone HLSDK and Metamod from
https://github.com/alliedmodders/hlsdk
https://github.com/alliedmodders/metamod-hl1

and use those instead.
klippy is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-16-2017 , 10:52   Re: C linkage error
Reply With Quote #5

https://wiki.alliedmods.net/Building_AMX_Mod_X
__________________
Arkshine is offline
killerZM
Senior Member
Join Date: Sep 2016
Old 03-16-2017 , 12:11   Re: C linkage error
Reply With Quote #6

nvm fixed
i commented :
/*
cell* get_amxaddr(AMX *amx, cell amx_addr)
{
return (cell *)(amx->base + (int)(((AMX_HEADER *)amx->base)->dat + amx_addr));
}*/

and define FN_AMMX_QUERY

Last edited by killerZM; 03-16-2017 at 12:35.
killerZM is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-16-2017 , 13:39   Re: C linkage error
Reply With Quote #7

You should not have to change the code and especially this one. Just follow the official way to compile and use the HLSDK/Metamod from alliedmods github repository.
__________________
Arkshine is offline
killerZM
Senior Member
Join Date: Sep 2016
Old 03-16-2017 , 16:37   Re: C linkage error
Reply With Quote #8

but it didnt compile
bcz /*
cell* get_amxaddr(AMX *amx, cell amx_addr)
{
return (cell *)(amx->base + (int)(((AMX_HEADER *)amx->base)->dat + amx_addr));
}*/

undefind symbol AMX_HEADER
killerZM is offline
Old 03-16-2017, 16:38
killerZM
This message has been deleted by killerZM. Reason: my net freezed
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-16-2017 , 18:52   Re: C linkage error
Reply With Quote #9

You are doing something wrong. Just post your VS project and the whole compiler output. Damn it.

Last edited by klippy; 03-16-2017 at 18:52.
klippy is offline
killerZM
Senior Member
Join Date: Sep 2016
Old 03-17-2017 , 07:17   Re: C linkage error
Reply With Quote #10

how to post all VS project ? lol
no errors after commented amxx dir thing , also i updated SDKS from ur links
killerZM is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode