LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

debugging a dll

Do I need to link my CVI executable to the debug versions of the export libraries when I want to debug a DLL?
 
CVI generates debug versions of both the dll and the export library when you build the dll in debug mode.
 
Does CVI automagically switch when debugging the executable and I want to trace into the DLL?
 
Menchar
0 Kudos
Message 1 of 13
(4,480 Views)
And here's another mystery.
 
I have a dll with a dll main entry point.
 
On process attach I was initializing the CVI runtime engine.
 
This was causing a fault.  Getting strange popups from the CVI RTE.
 
I eliminated RTE init and now OK.
 
So what are the rules for using the RTE init call in dllmain?  I think I had it in there to get rte going if dll called from a non-CVI app.
 
Looks like it's not benign if called from a cvi app.
 
Menchar
0 Kudos
Message 2 of 13
(4,472 Views)
What happens if I link both the debug and release versions of the export library into my executable?
0 Kudos
Message 3 of 13
(4,471 Views)
> What happens if I link both the debug and release versions of the export
> library into
> my executable?

Duplicate symbols ?
--
Guillaume Dargaud
http://www.gdargaud.net/


0 Kudos
Message 4 of 13
(4,441 Views)

Surprisingly enough, no 🙂

 

Menchar

0 Kudos
Message 5 of 13
(4,429 Views)
To answer some of my own questions since NI can't / won't:

1.  CVI IDE does not automatically switch to using the debug version of a DLL when you try to trace into a CVI-developed DLL from a CVI application.
2.  You have to link the debug version of the export library to be able to trace into a CVI-developed DLL from a debugged CVI application.
3.  If you link both the debug and release versions of the export library into the debugged CVI application, the release mode version is used.  No duplicate symbol errors occur during the link.

0 Kudos
Message 6 of 13
(4,391 Views)
G. Dargaud -

I've used your utility, LargeImage - it does a good job.  Thank you for writing it.

Is it truly freeware?  Can we use it at work to view images?

Menchar
0 Kudos
Message 7 of 13
(4,389 Views)

I'm using CVI2009 - are there any changes concerning the mentioned behavior?

 

Or does anyone know a tip/trick e.g. to use build setting/steps or other tools to automatically include different libraries when switching from release to debug version of a exe/dll? (my idea is: i want to create a release and debug-version of each DLL/EXE i'm using, which may include many other release/debuggable DLLs and i don't want to switch each library type every time i change from release to debug version...)

 

 

0 Kudos
Message 8 of 13
(3,634 Views)

Hi olhass,

 

From what I understand, you're wanting to change the different libraries that are built with the DLL or Executable each time you select to build in release or debug mode. BUT you don't want to have to specify the libraries each time... I guess I'm wondering why you're wanting to do this. The point of building in either debug or release mode is so that you can debug the application before you build the release version. So your build specs would most likely be the same. 

 

Take a look at these resources and see if they're any help for you:

http://zone.ni.com/reference/en-XX/help/370051M-01/cvi/usermanual/prjbldmenudebdlls/

http://digital.ni.com/public.nsf/allkb/2A11A12C31CABDBF86257B570079D84E?OpenDocument

 

The second link is a Knowledge Base article related to a switching between the build libraries for 32-bit and 64-bit configurations. So the process might be similar for doing what you're asking about. 

 

Additionally, you'll typically get a better response from the community when you create new posts on the discussion forums as opposed to commenting on old ones. I'd recommend doing that if my post does not lead you to a solution.

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 9 of 13
(3,611 Views)

6 years later an NI still doesn't understand the issue 😉

 

 

0 Kudos
Message 10 of 13
(3,605 Views)