NO

Author Topic: POLINK: error: Unresolved external symbol 'system'.  (Read 14626 times)

jasch212

  • Guest
POLINK: error: Unresolved external symbol 'system'.
« on: April 16, 2010, 10:25:58 AM »
hello,
next question:
how to link a program which uses:
system("notify") ;

how can i find the lib for this function?

thanks
Thomas

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #1 on: April 16, 2010, 11:18:22 AM »
Have you already tried to compile it?
What error did you get?
What libraries are already included?

I had never had to include a special library for standard functions.
---
Stefan

Proud member of the UltraDefrag Development Team

JohnF

  • Guest
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #2 on: April 16, 2010, 11:58:49 AM »
hello,
next question:
how to link a program which uses:
system("notify") ;

how can i find the lib for this function?

thanks
Thomas

Place the caret over the word 'system' then press F1, you should be presented with the PellesC help. Within the text you will see what header to include.

John

jasch212

  • Guest
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #3 on: April 16, 2010, 12:29:11 PM »
hi,
compile is OK, linking is the problem!
when I used the F1 key over:
system("notify") ;
I get the Help for system, but there is NO info about the lib I had to linked with my progrem.
Help:
Purpose:
Executes a system command.

I used following libs: (some systemLibs and some ownLibs for calculations:
aygshell.lib coredll.lib corelibc.lib geolib_ce.lib AviationFormularyLib.lib

Thomas

JohnF

  • Guest
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #4 on: April 16, 2010, 01:23:12 PM »
'system' will compile and link without you needing to specify libs.

All you need to do is include the right header.

John

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #5 on: April 16, 2010, 01:40:55 PM »
Are you sure, that system is available for Pocket PC?

System starts an other program with cmd.exe, which does not exist on Windows Mobile. :(
best regards
 Alex ;)

jasch212

  • Guest
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #6 on: April 16, 2010, 01:43:12 PM »
F1 says:
Declared in:
<stdlib.h>

I included it (compile is OK)

linker:
POLINK: error: Unresolved external symbol 'system'.
POLINK: fatal error: 1 unresolved external(s).
*** Fehlercode: 1 ***
Fertig.

I used pelle 5.0

It seems that "system" is not implememted.
can I otherwise execute an external program?

Thomas

JohnF

  • Guest
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #7 on: April 16, 2010, 03:06:53 PM »
linker:
POLINK: error: Unresolved external symbol 'system'.
POLINK: fatal error: 1 unresolved external(s).
*** Fehlercode: 1 ***
Fertig.

I used pelle 5.0

It seems that "system" is not implememted.
Thomas

It is implemented, there must be another problem somewhere. Can you post a small zipped project that shows the error?

John
« Last Edit: April 16, 2010, 03:08:40 PM by JohnF »

jasch212

  • Guest
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #8 on: April 16, 2010, 03:22:30 PM »
ok,
I have build (via wizzard) a short TestProject, what i now see is an addtional warning:

Erzeugen von main.obj.
E:\ts\workspace\test\main.c(59): warning #2027: Missing prototype for 'system'.
Erzeugen von main.res.
Erzeugen von test.exe.
POLINK: error: Unresolved external symbol 'system'.
POLINK: fatal error: 1 unresolved external(s).
*** Fehlercode: 1 ***
Fertig.

Thomas

JohnF

  • Guest
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #9 on: April 16, 2010, 03:48:46 PM »
Sorry, I can't test ARM things, maybe someone else can help.

Also, maybe system is not implemented on ARM, if that is the case I apologize.

John

jasch212

  • Guest
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #10 on: April 16, 2010, 03:53:46 PM »
ok,
thankyou JohnF,

does anyone know how to execute an external program on ARM?
or how to create a "beep" or littele sound on the loudspeaker.

Thomas
« Last Edit: April 16, 2010, 05:00:45 PM by jasch212 »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #12 on: April 16, 2010, 06:54:22 PM »
MessageBeep
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

int __cdecl WinMainCRTStartup(void)
{
MessageBeep(0);
ExitThread(0);
}
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <tchar.h>

void StartPrg(TCHAR *szModule, TCHAR *szCmdLine)
{
//STARTUPINFO si = { 0 };
PROCESS_INFORMATION pi = { 0 };
TCHAR szBuff[260];

//si.cb = sizeof(si);

// Start the child process.
if (!CreateProcess(szModule, // No module name (use command line)
szCmdLine, // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
CREATE_NEW_CONSOLE, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
NULL, // Pointer to STARTUPINFO structure
&pi) // Pointer to PROCESS_INFORMATION structure
)
{
wsprintf(szBuff, L"CreateProcess failed (%d).\n", GetLastError());
MessageBox(0, szBuff, L"StartPrg", MB_OK);
return;
}
/*
    // Wait until child process exits.
    WaitForSingleObject( pi.hProcess, INFINITE );
*/
// Close process and thread handles.
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);

}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
StartPrg(L"\\Windows\\calc.exe", NULL);
return 0;
}
« Last Edit: April 16, 2010, 07:25:25 PM by timovjl »
May the source be with you

jasch212

  • Guest
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #13 on: April 16, 2010, 07:39:57 PM »
hello all,

1. MessageBeep(0); compile and link OK but it doesn't work.

2. StartPrg(L"\\Windows\\calc.exe", NULL); compile and link OK it works!!!

3. but I want to here sound or a beep
if (!CreateProcess(L"\\windows\\sndply.exe",
            _T("\\windows\\notify.wav"),
            NULL,
            NULL,
            FALSE,
            0,
            NULL,
            NULL,
            NULL,
            &pi) )
compile and link OK but it doesn't work.
I have now a problem with sndply.exe or with the *.wav file

Thomas

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: POLINK: error: Unresolved external symbol 'system'.
« Reply #14 on: April 16, 2010, 08:28:21 PM »
- L"\\windows\\sndplay.exe"
- Try to use that CREATE_NEW_CONSOLE
« Last Edit: April 16, 2010, 08:45:57 PM by timovjl »
May the source be with you