Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating DLL with SWIG from VS2010 error LNK2019: unresolved external symbol "int __cdecl axtoi
    primarykey
    data
    text
    <p>I'm trying to generate a dll file with swig from Visual Studio 2010, I created and compiled my wrapper.cpp code successfully and add every library dependencies to my project. Now when I try to build release version of my project with .dll target extension, I've got the following error:</p> <pre><code> Generating non-SAFESEH image. 1&gt;Ccrypto_wrap.obj : error LNK2019: unresolved external symbol "int __cdecl axtoi(char const *)" (?axtoi@@YAHPBD@Z) referenced in function __wrap_axtoi </code></pre> <p>That's wired, cause every other external symbols in wrapper.cpp have been resolved except </p> <p><code>axtoi</code>! I mean for example in my wrapper.cpp I have 2 references of <code>axtoi</code>:</p> <p>(1)</p> <pre><code>ZEND_NAMED_FUNCTION(_wrap_axtoi) { char *arg1 = (char *) 0 ; zval **args[1]; int result; SWIG_ResetError(); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) { WRONG_PARAM_COUNT; } /*@SWIG:C:\Users\user\Desktop\Ccrypto\Lib\php\utils.i,62,CONVERT_STRING_IN@*/ if ((*args[0])-&gt;type==IS_NULL) { arg1 = (char *) 0; } else { convert_to_string_ex(args[0]); arg1 = (char *) Z_STRVAL_PP(args[0]); } /*@SWIG@*/; result = (int)axtoi((char const *)arg1); { ZVAL_LONG(return_value,result); } return; fail: SWIG_FAIL(); } </code></pre> <p>(2)</p> <blockquote> <p>SWIG_ZEND_NAMED_FE(axtoi,_wrap_axtoi,NULL)</p> </blockquote> <p>I created the shared object of my class successfully in Linux and I included it in my php codes and it works fine, so I tried to check <code>axtoi</code> in my shared object in Linux and I figured out an strange thing! when I grep <code>axtoi</code> inside my shared object I got:</p> <pre><code> U _Z5axtoiPKc 0006ccf1 T _wrap_axtoi </code></pre> <p>but for every other symbols for example <code>itoax</code> which its usage is the same as <code>axtoi</code> in the wrapper code I have:</p> <pre><code>00093660 T _Z5itoaxi 0006e19f T _wrap_itoax </code></pre> <p>I have several similar symbols which are used exactly the same as <code>axtoi</code> in my wrapper.cpp code as mentioned above, but I didn't get any unresolved external symbol errors. Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload