Quantcast
Viewing latest article 13
Browse Latest Browse All 5362

Building LabWindows 2017 GUI using Microsoft compiler - Error -86

As we work on migrating away from LabWindows, I began trying to build a simple one-panel GUI program using the Microsoft C compiler. I am using the free Code::Blocks IDE. It came with GCC, but allows using other compilers. Once I had it set up to use the MSVC compiler, I was able to build my test app just by linking to some LabWindows .lib files, and adding some Windows .libs it needed.

 

But when I run, I get this:

Image may be NSFW.
Clik here to view.
AllenInIowa_0-1749563968879.png

I then learned about generating a .c file that is supposed to resolve this. The .c file looks like this:

#pragma pack(4) typedef struct {char *name; void *address; unsigned long isFunction:1; unsigned long reserved:31;} ExeSymbol; int __cdecl ClickMeButtonCB (int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int __cdecl panelCB (int panel, int event, void *callbackData, int eventData1, int eventData2); int __UICallbackSymbolCount = 2; ExeSymbol __UICallbackSymbols [2] = { {"_ClickMeButtonCB", (void*)ClickMeButtonCB, 1, 0}, {"_panelCB", (void*)panelCB, 1, 0} };

However, when I add this to my project and build it, I still get the same error. I have verified it is linking the proper names (if I change the function name in this table, or change the function name itself, I get linker errors).

 

Perhaps I am missing some lib or something? Anyone have any tips?

 

TO GET IT TO WORK we were able to convert the panel to a .c and .h and change from using LoadPanel() to the generated BuildPanel() routine. Adding those .h and .c files produces a working GUI program, compiled by MSVC in an external IDE. Nice.

 

But we have hundreds of panels, and it would save much time just being able to generate these table files and add them and use the LoadPanel() with the .uir files.

 


Viewing latest article 13
Browse Latest Browse All 5362

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>