473,326 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Can't Link Mixed DLL with Visual Studio

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
an************@gmail.com

Nov 17 '05 #1
4 3078
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
an************@gmail.com

Nov 17 '05 #2
an************@gmail.com wrote:
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
Nov 17 '05 #3
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
an************@gmail.com

Nov 17 '05 #4
an************@gmail.com wrote:
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
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael Howes | last post by:
I have some old C code that uses MFC and some C Run Time Library. I need to be able to call this from C# I thought i'd be able to create a Managed C++ DLL, tell the project it was using MFC, ...
0
by: Domenic Albano | last post by:
Any ideas truly appreciated. I wrote a mixed mode dll component in VC 7.1 which compiles with no errors and works great. It is being consumed by a C# program, which when it compiles again, works...
4
by: Tim Hitchcock | last post by:
I have an existing MFC program consisting of an EXE and one DLL that I am trying to convert into a mixed mode program. I am using Visual Studio.NET 2003 Professional and I am compiling in the IDE....
0
by: andrew.bell.ia | last post by:
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:...
2
by: Doug Belkofer | last post by:
We have created a fairly complex mixed-mode DLL that we want to use from VB.NET. The mixed-mode DLL is written in C++, and does use the standard C runtime libraries. An unusual thing is happening...
0
by: Doug Belkofer | last post by:
We have created a fairly complex mixed-mode DLL that we want to use from VB.NET. The mixed-mode DLL is written in C++, and does use the standard C runtime libraries. An unusual thing is happening...
3
by: Andreas | last post by:
Hi! I'm currently developing a DLL that makes use of C++ and .net (mixed) using Visual Studio 2003. Now, as I wanted to move to the new Visual Studio 2005, I converted this project into the...
8
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR...
4
by: Edson Tadeu | last post by:
I have imported a project from Visual Studio .Net 2003, consisting only of native (unmanaged) C++ code. Debugging was very fast in that IDE, and I didn't even notice a delay when stepping over...
1
yabansu
by: yabansu | last post by:
Hi all, I implemented a basic client application. It communicates with server and works properly. Building processes succeed just by giving the following warning: LINK : D:\DOC\Visual Studio...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.