dllimport


Mangled member function name different during dllimport


I'm getting some unresolved externals when importing a DLL of a project (Project 1) in a .exe project (Project 2) using MSVC 2013 (it compiles fine in Mingw 4.8.1):
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class chakra::Message * __thiscall chakra::PublisherSubscriberChannel::GetMessageA(unsigned __int64)" (__imp_?GetMessageA#PublisherSubscriberChannel#chakra##QAEPAVMessage#2#_K#Z) referenced in function "public: virtual void __thiscall Bar2::ProcessMessages(void)" (?ProcessMessages#Bar2##UAEXXZ)
test_wrap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class chakra::Message * __thiscall chakra::PublisherSubscriberChannel::GetMessageA(unsigned __int64)" (__imp_?GetMessageA#PublisherSubscriberChannel#chakra##QAEPAVMessage#2#_K#Z)
The function GetMessage is a member function of class PublisherSubscriberChannel of namespace chakra in Project 1.
Examined the .exp and .dll file of Project 1 using dumpbin.exe /exports and found the function to be exported as ?GetMessage#PublisherSubscriberChannel#chakra##QAEPAVMessage#2#_K#Z whereas during importing it is looking for ?GetMessageA#PublisherSubscriberChannel#chakra##QAEPAVMessage#2#_K#Z as per the above error.
It happens only when I #include "Ogre.h" or any of the other Ogre headers in test_wrap.cxx file (which is a SWIG generated file).
Does anyone have any idea why the function name mismatch with the extra 'A'?

Related Links

DllImport is not found C++
Mangled member function name different during dllimport
how to use DllImport in metro-style app
Converting doc file to post script
How can I get a COM component which can be used on Windows phone 8 project with C#
Externs and DLL imports
Mixed native and managed code heap corruption
MarshalDirectiveException
call unmanaged C++ code from C# using pinvoke
Detecting DLL Code Splicing
WOW64 Redirection and LoadLibrary
Using C# dll in Windows phone 7
Python 2.5 Import dll AttributeError
Replacing the Import Table in PE file by standart LoadLibrary
Unresolved external symbol
Declare and <DllImport> in VB.NET have different results

Categories

HOME
phantom-dsl
microsoftgraph
turing-machines
developer-tools
merge
jmeter
nvd3.js
google-spreadsheet
twig
numbers
jwplayer
graphics
can
xbee
google-apps
emscripten
hugo
jquery-ui
google-cloud-datalab
banner
nfs
pcl-crypto
minecraft-forge
mel
gson
plist
project-intu
mautic
spring-social
azure-powershell
powershell-v5.0
video-editing
delphi-xe5
sencha-touch
sar
ag
pagespeed
pimcore
php-mysqlidb
mount
firebase-analytics
handler
sinch
paperjs
r-grid
papaparse
card.io
installshield-le
carriage-return
nested-lists
python-pptx
xcode7.3
typesafe-config
resolution
skylink
memory-mapping
vaadin-charts
stylecop
mesosphere
httrack
opennms
automapper-5
serde
cnc
wcftestclient
singleinstance
payara-micro
context-switch
tinkerpop
otp
trigger.io
cmp
renaming
stripe-connect
redistributable
async.js
myspace
google-query-language
deep
yajsw
findfirst
exim4
phpgrid
crouton-os
jbase
state-restoration
dynamics-nav-2016
r-package
mraid
beatsmusic
punycode
jama
gnumeric
cfcache
mt4j
merb
jquery-blockui
azman
infobright
jqote
cgbitmapcontextcreate
ajax-polling
xpsdocument
scrubyt
wysiwym

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App