LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling a DLL for Windows XP

I am trying to compile a dll for Windows XP.  Currently, no matter which files I include in the header file, it will still somehow link my dll with the Windows Error Reporting dll or WER.dll.  This is not available on Windows XP so I cannot call on my DLL.  In the build options I tried using /WIN32 or /WINNT but I keep getting an error stating: macro names must be identifiers.  I cannot find examples to lead me.  Anyone know how to compile so that I am excluding windows completely or how to resolve the compiler issue?

 

Thanks,

Chris

0 Kudos
Message 1 of 3
(1,547 Views)

You are seeming to bark up the wrong tree here. If you do not reference any Windows Error Report functions in your code anywhere, the problem is not at the compilation stage but at the link stage.

 

When you build an application, the compiler first compiles the different source files and after all sources are successfully compiled into object code, it links them together into an executable together with various compiler specific object libraries. These contain the startup stub that gets invoked by Windows when loading the executable and eventually calls your main (or WinMain) function, but also various C runtime functions that are required by this startup stub and also any such function you may call yourself.

 

It seems that this startup stub and C runtime library somehow references this Windows error reporting API and there is no simple way to get rid of that. Replacing the startup stub code with your own is almost never an option for most C compilers as they contain all kind of code and sometimes even code directly created from assembly code. The only way to do what you want without going very deep into undocumented functionaliry is to use a version of the C compiler that supports the OS you want to use. For LabWindows CVI this means that you will need to use LabWindows CVI 2013 SP2 or earlier. Similar limitations exist for Visual Studio, Microsoft is quick to add features to their C runtime for Visual Studio that will make an executable not run on unsupported OSes.

 

But you might have trouble installing LabWindows CVI 2013 on Windows 10 as it is not officially supported.

Rolf Kalbermatter
My Blog
Message 2 of 3
(1,507 Views)

Thank you for that. I had 2010 on my Windows 10 PC at one time. I will try to reinstall it and see if it works.

0 Kudos
Message 3 of 3
(1,467 Views)