Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2005

Tip: Looking for answers? Try searching our database.

Can't Link Mixed DLL with Visual Studio

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
andrew.bell.ia@gmail.com - 29 Jun 2005 18:52 GMT
Hi,

I'm trying to link a mixed (CLR and native) DLL with visual studio.  I
have it working fine on the command line, where cl is used to invoke
link, but I can't get it to work with VS.  I get:

unresolved external symbol: __CorDllMain@12

I am linking in msvcrt.lib and msvcprt.lib explicitly.

Link info from visual studio is:

/OUT:"C:\acbell\mrsid\Release\mrsid.dll" /NOLOGO
/LIBPATH:"C:\acbell\thirdparty\LizardTech\Geo_DSDK-5.0.6.955\3rd-party\lib\Release_md"
/LIBPATH:"C:\acbell\thirdparty\LizardTech\Geo_DSDK-5.0.6.955\lib\Release_md"
/DLL /NODEFAULTLIB:"nochkclr.obj" /INCLUDE:"__DllMainCRTStartup@12"
msvcrt.lib msvcprt.lib lti_dsdk.lib gdal.lib gdalogr.lib gdalcpl.lib
ltikdu.lib advapi32.lib user32.lib  kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
"\acbell\thirdparty\LizardTech\Geo_DSDK-5.0.6.955\lib\Release_md\lti_dsdk.lib"
"\acbell\thirdparty\LizardTech\Geo_DSDK-5.0.6.955\3rd-party\lib\Release_md\gdal.lib"
"\acbell\thirdparty\LizardTech\Geo_DSDK-5.0.6.955\3rd-party\lib\Release_md\gdalogr.lib"
"\acbell\thirdparty\LizardTech\Geo_DSDK-5.0.6.955\3rd-party\lib\Release_md\gdalcpl.lib"

/noentry is also specified as an additional property.

Any help appreciated.

-- Andrew Bell
andrew.bell.ia@gmail.com
andrew.bell.ia@gmail.com - 30 Jun 2005 20:45 GMT
I get to answer my own question again.  Linking in mscoree.lib fixed
things.  Another group posting suggested that the symbol was in
msvcprt.lib, which doesn't seem to be the case.  BTW, is there a way to
list the exported symbols in a library?  I tried lib /list /verbose,
but it only gave the corresponding dll name, not the symbol name.

Thanks,

-- Andrew Bell
andrew.bell.ia@gmail.com
Carl Daniel [VC++ MVP] - 30 Jun 2005 21:23 GMT
> I get to answer my own question again.  Linking in mscoree.lib fixed
> things.  Another group posting suggested that the symbol was in
> msvcprt.lib, which doesn't seem to be the case.  BTW, is there a way
> to list the exported symbols in a library?  I tried lib /list
> /verbose, but it only gave the corresponding dll name, not the symbol
> name.

try dumpbin /symbols.

It'll list lots of stuff that you don't need, but you can find all the
public symbols in the results.

-cd

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.