02-11-2011 06:43 AM
Hello,
in some projects i use the same software, only with different interfaces, or sometimes with customized panels. Within the sourcecode i just activate or deactivate the functions i need with defines, f.e: #define USE_TCP...and #ifdef USE_TCP...........#endif.
Is it possible to set the application name in source code (instead of BUILD -> TARGET SETTINGS) ?.
I'm lookink for something like
#idfef UART_TARGET........project_uart.exe
#elif defined TCP_TARGET........project_tcp.exe
#else ............... project_standard.exe
#endif
in other compilers (for microcontrollers) i can do something like this with #EXPORT (HEX, FILE=HEX_FILENAME)
Any ideas?
Thanks and greetings from Bremerhaven, Germany
Norbert Rieper
02-13-2011 05:03 AM
Hi ,
I don't know if it's possible but you can save file names / directory as a simple char fileName[256] ,
You can make a simple code that scan a designated directory and choose the file you need....
Still maybe one of the CVI Developer's will give you the best answer , base on my C knowledge i don't it's possible....
02-14-2011 01:36 AM
Hi Kobi Kalif,
thanks for trying helping me.
I'm not looking for source code to find a particualar file at runtime. I'm looking for a compiler command within my source code to generate a exe-file with a predefined name.
Norbert Rieper
02-14-2011 02:17 AM - edited 02-14-2011 02:22 AM
Ohh....
Well there is the :
CVI_AppBuildProject (CAObjHandle objectHandle, ERRORINFO *errorInfo, long *returnValue);
But it's only for build with no names support , that's what I know but maybe there is something else which I don't know of.....
One more thing - At the menu Build > Builed Steps
there you can define your options at 3 stages :