cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Can this Toolkit linking nightmare be solved?

msteffke
12-Amethyst

Can this Toolkit linking nightmare be solved?

For any project using these convert functions like itoa I get LNK2019  unresolved external symbol __imp_itoa referenced in ...my programs.obj   So far the only solution I have found is not to use the functions gcvt, _ftoa, itoa, etc.  Thats hardly realistic.

 

I have stdlib.h included in the program.  My project settings for linker include the following. 

protk_dll_nu.lib
ucore.lib
udata.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
ws2_32.lib
mpr.lib
netapi32.lib
psapi.lib

 

I have several Toolkit programs that do not contain these functions that do number to string type conversions, and they seem to compile/link and run fine as DLL's.

Does anyone have any advice to offer?   I have literally spent DAYS looking into this!

 

1 ACCEPTED SOLUTION

Accepted Solutions
PARTHIBAN_K
15-Moonstone
(To:msteffke)

Hello @msteffke I'm using following code to convert to string

 

  1. Convert integer to string
    ProCharLine iVal;
    int i = 15;
    ProTKSprintf(Val,"%d",i);
  2. Convert double to string
    ProCharLine dVal;
    double d = 15.5555;
    ProTKSprintf(Val,"%f",d);

 

 

 

 

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"

View solution in original post

2 REPLIES 2
PARTHIBAN_K
15-Moonstone
(To:msteffke)

Hello @msteffke I'm using following code to convert to string

 

  1. Convert integer to string
    ProCharLine iVal;
    int i = 15;
    ProTKSprintf(Val,"%d",i);
  2. Convert double to string
    ProCharLine dVal;
    double d = 15.5555;
    ProTKSprintf(Val,"%f",d);

 

 

 

 

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"

Thank You JK.   Yes as it turns out itoa and ftoa are not standard C functions.  They are available in MSDN stdlib.h, but they cannot link with our toolkit Dlls.   I guess I got used to using them in VB.   My C programs have successfully compiled for many years using itoa and ftoa, prior to my moving to Visual Studio Professional 2012.  Even in 2012 Studio Express they compiled.    So for my solution here I have changed to using the sprintf functions like you show.   Thanks!

Top Tags