unresolved external symbol _imp_exit

I get eight unresolved external symbols when i link my program. Seven are from the conio.h file (_imp_exit, _imp_getch, _imp_putch, etc.) and one is from bool setcursorposition(x,y). I don't know how i got this far since i never tried to program a pocket pc before. I am using (C++ win32) to build a console program. i got the program to compile and when i link it i get unresolved external symbol errors. i tried changing the functions "exit, getch, and the rest", then i could not build the cpp file. i believe i'm missing a library call. I scanned all the .lib files and did not find a fix.

i just got my copy of mvs2005 seven days ago. it's new to me but works real good.

is there a .lib that includes these functions?

thanks.

[768 byte] By [SOAC] at [2007-12-23]
# 1
Pocket PC does not have a console and as a result does not have console I/O functions available. I suggest experimenting with Win32 GUI applications instead as a starting point. A book on Win32 (native) or Windows CE development is not out of question either
AlexFeinman at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 2

i do not know if i am on the right track !!! i read up on GUI. the only book i could find. what i did, was to put all my unresolved enternal symbols into my own functions. next i am going to pass the function's arguements to another program that paints the pocket pc screen. the conio.h functions will not work. from what i read about GUI, leads me to believe that my screen function will draw the text to the screen. i converted all the conio.h functions to voids in c++; from what i read about c++ this will work. now i have to build a sreen handler.

i now get stuck on error in crtdefs.h "Use of runtime internal header file".

i tried to change the include files so i did not access crtdefs.h , this should work from what i have seen on the net.

I get stuck on winnt.h "no target architecture".

on the command line for compile and link i typed the option /Wp64. under project-properties-linker-advanced-target machine i selected arm.

i missed the boat somewhere.

any help deserves great thanks.

SOAC at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 3
Create your project as a SmartDevice C++ project. That would set all apropriate linker and compiler options. As for conio.h - there is no console nor console I/O on pocket pc. There is on generic CE device if the image includes it
AlexFeinman at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 4

I HAVE MVS 2005 STANDARD.I DO NOT THINK I CAN BUILD A NEW PROJECT THE WAY U SUGGESTED. I SELECT SMART DEVICE AND THEN I CANNOT SELECT ANYTHING ELSE.

SO I GO BACK TO BUILD NEW PROJECT. SELECT C++. SELECT WIN32 PROGRAM AND THAT WORKS. AND I STILL GET ALL THE SAME ERROR MESSAGES

ANYWAYS I AM LEARNING HOW THINGS WORK?

SOAC at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 5

well guess what!!!! You got it to work. rarararara

i built a new project with c++, then win32 project.

the includes were all ok and it worked for win32.

my functions, that run the screen all compiled, linked, and i got my exe.

now im after the big pocket pc.

do i need the professional version or is the standard version ok.

and what do u suggest for drawtext.

i want to set the draw position x,y and draw a character.

i got Qt4 with GUI except i want to do it my way.

thanks again...

ps thanks again!!! rararara

simple as it is, i spent two weeks trying to figure that out.

this is the first windows program i wrote, in 35 years and i like it.

SOAC at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 6

case WM_PAINT:

hdc = BeginPaint(hWnd, &ps);

// font(hdc,TimesNewRomanBold);

// font 12,"ms shell hlg";

// font(hdc,-512);

// font.DrawText(hdc,put_char_to_screen_1,xpos,ypos,5);

// DrawText(hdc,TEXT("xxxx"),xpos,ypos,5);

// DrawText(hdc,TEXT("this is a test"),-1,&rc, DT_LEFT | DT_TOP);

// DrawText(hdc,put_char_to_screen_1 , -1, &ps, DT_LEFT | DT_TOP);

// DrawText(hdc,LPCWSTR , -1, &ps, DT_LEFT | DT_TOP);

// nHeight = ::DrawText(m_hAttribDC, lpszString, nCount, &rect,nFormat

// int nHeight = ::DrawTextEx(m_hDC, lpszString, nCount, lpRect, nFormat, lpDTParams);

// TODO: Add any drawing code here...

EndPaint(hWnd, &ps);

break;

case WM_DESTROY:

i am trying to set a font and draw text. these are the commands i came up with.

any help would be appreciated.

SOAC at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 7

Aside of some of the commented text not making much sense syntactically, the idea is correct. Use DrawText(hDC, string, .... ) to draw text on the window surface. To start you can just use default font, brush etc. Just leave

BeginPaint
DrawText
EndPaint

AlexFeinman at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 8

case WM_PAINT:

hdc = BeginPaint(hWnd, &ps);

font.DrawText(hdc,put_char_to_screen_1,xpos,ypos,5);

DrawText(hdc,put_char_to_screen_1 , 1, &ps, DT_LEFT | DT_TOP);

EndPaint(hWnd, &ps);

put_char_to_screen_1 gives an error WCHAR is not LPCWSTR

&ps gives an error not a pointer.

I need to point to a rectangle, so i thought, y not the main window hWnd?

did not work

I changed my char to wchar to LPCWSTR

did not work

what i really want is font.DrawText

I can not even get DrawText to work

I tried building a new rectangle and pointing to it.

did not work

do u know of a search that explains more

i have tried this off and on for two weeks and i ran out of ideas

i tried looking at *.cpp files

no help

and textout is out of the question

SOAC at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 9

i got drawtext to compile

idefined a string LPCWSTR abcxyz

and it worked

what does font mean in font.DrawText?

the compiler says its a "class/struct" problem

next i will send messages to drawtext

once i find out how.

question: when i compile my program in win32 i get a exe.

when i compile in either pocket pc i get the errors LPCONTEXT or PCCONTEXT.

SOAC at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 10

do u known where there is more informatio on font.drawtext

i need to know what font stands for?

SOAC at 2007-8-30 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...