Jump to content

Undefined Reference (Compiling Source Error)


 Share

Recommended Posts

So I downloaded the source, and I'm trying to get a basic autoit application to run in C++, and I tried to compile application.cpp right off the bat, and I got a bunch of Undefined Reference errors when I tried to compile it.

Am I missing a header file or something?

Link to comment
Share on other sites

Nope, I did not modify the source at all, I just downloaded it and tried to compile it. :P

If you aren't using Visual Studio, then chances are the linker isn't linking to the Windows API libraries (or even the other C++ files?). Even if you are using Visual Studio, check if the libraries are being linked. Edited by cppman
Link to comment
Share on other sites

Here is the compile log:

Compiler: Default compiler
Executing  g++.exe...
g++.exe "C:\Documents and Settings\joe\My Documents\Source\src\application.cpp" -o "C:\Documents and Settings\joe\My Documents\Source\src\application.exe"  -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include"  -I"C:\Dev-Cpp\include\c++\3.4.2\backward"  -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32"  -I"C:\Dev-Cpp\include\c++\3.4.2"  -I"C:\Dev-Cpp\include"   -L"C:\Dev-Cpp\lib" 
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x10):application.cpp: undefined reference to `AString::AString()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x16):application.cpp: undefined reference to `g_hWnd'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x20):application.cpp: undefined reference to `g_hWndEdit'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x2a):application.cpp: undefined reference to `g_hWndSplash'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x34):application.cpp: undefined reference to `g_hSplashBitmap'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x3e):application.cpp: undefined reference to `g_hWndProgress'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x48):application.cpp: undefined reference to `g_hWndProgBar'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x52):application.cpp: undefined reference to `g_hWndProgLblA'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x5c):application.cpp: undefined reference to `g_hWndProgLblB'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x66):application.cpp: undefined reference to `g_bTrayIcon'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x6d):application.cpp: undefined reference to `g_bTrayIconInitial'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x85):application.cpp: undefined reference to `g_bScriptPaused'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x8c):application.cpp: undefined reference to `g_bBreakEnabled'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x93):application.cpp: undefined reference to `g_bTrayIconDebug'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x9a):application.cpp: undefined reference to `g_bStdOut'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xa1):application.cpp: undefined reference to `g_bTrayExitClicked'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xa8):application.cpp: undefined reference to `g_bKillWorkerThreads'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xaf):application.cpp: undefined reference to `g_HotKeyNext'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xd4):application.cpp: undefined reference to `AString::AString()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xda):application.cpp: undefined reference to `g_hWnd'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xe4):application.cpp: undefined reference to `g_hWndEdit'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xee):application.cpp: undefined reference to `g_hWndSplash'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xf8):application.cpp: undefined reference to `g_hSplashBitmap'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x102):application.cpp: undefined reference to `g_hWndProgress'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x10c):application.cpp: undefined reference to `g_hWndProgBar'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x116):application.cpp: undefined reference to `g_hWndProgLblA'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x120):application.cpp: undefined reference to `g_hWndProgLblB'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x12a):application.cpp: undefined reference to `g_bTrayIcon'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x131):application.cpp: undefined reference to `g_bTrayIconInitial'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x149):application.cpp: undefined reference to `g_bScriptPaused'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x150):application.cpp: undefined reference to `g_bBreakEnabled'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x157):application.cpp: undefined reference to `g_bTrayIconDebug'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x15e):application.cpp: undefined reference to `g_bStdOut'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x165):application.cpp: undefined reference to `g_bTrayExitClicked'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x16c):application.cpp: undefined reference to `g_bKillWorkerThreads'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x173):application.cpp: undefined reference to `g_HotKeyNext'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x329):application.cpp: undefined reference to `g_oScriptFile'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x32e):application.cpp: undefined reference to `AutoIt_ScriptFile::AddLine(int, char const*, int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x341):application.cpp: undefined reference to `g_oScriptFile'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x346):application.cpp: undefined reference to `AutoIt_ScriptFile::LoadScript(char*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x350):application.cpp: undefined reference to `g_nExitCode'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x38f):application.cpp: undefined reference to `g_oScriptFile'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x394):application.cpp: undefined reference to `AutoIt_ScriptFile::PrepareScript()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x3a5):application.cpp: undefined reference to `g_oScript'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x3aa):application.cpp: undefined reference to `AutoIt_Script::InitScript(char*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x3b5):application.cpp: undefined reference to `g_oScriptFile'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x3ba):application.cpp: undefined reference to `AutoIt_ScriptFile::UnloadScript()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x3c0):application.cpp: undefined reference to `g_nExitCode'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x3fc):application.cpp: undefined reference to `g_bTrayIconInitial'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x41b):application.cpp: undefined reference to `g_oScript'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x420):application.cpp: undefined reference to `AutoIt_Script::Execute(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x427):application.cpp: undefined reference to `g_oScriptFile'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x42c):application.cpp: undefined reference to `AutoIt_ScriptFile::UnloadScript()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x483):application.cpp: undefined reference to `g_hInstance'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x4a0):application.cpp: undefined reference to `g_hInstance'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x4b5):application.cpp: undefined reference to `g_oVersion'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x4c5):application.cpp: undefined reference to `g_oVersion'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x4f7):application.cpp: undefined reference to `Util_LoadIcon(int, int, int, int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x523):application.cpp: undefined reference to `Util_LoadIcon(int, int, int, int)'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x547):application.cpp: undefined reference to `g_hInstance'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x5a3):application.cpp: undefined reference to `g_hInstance'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x605):application.cpp: undefined reference to `g_hWnd'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x612):application.cpp: undefined reference to `g_hInstance'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x623):application.cpp: undefined reference to `g_hWnd'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x673):application.cpp: undefined reference to `g_hWndEdit'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x680):application.cpp: undefined reference to `g_hWnd'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x698):application.cpp: undefined reference to `g_hWnd'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x727):application.cpp: undefined reference to `g_oCmdLine'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x748):application.cpp: undefined reference to `Variant::operator=(char const*)'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x75e):application.cpp: undefined reference to `AString::AString(char const*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x789):application.cpp: undefined reference to `g_oVarTable'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x798):application.cpp: undefined reference to `VariableTable::Assign(AString, Variant const&, bool, int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x7f3):application.cpp: undefined reference to `Variant::operator=(int)'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x809):application.cpp: undefined reference to `AString::AString(char const*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x834):application.cpp: undefined reference to `g_oVarTable'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x843):application.cpp: undefined reference to `VariableTable::Assign(AString, Variant const&, bool, int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x89e):application.cpp: undefined reference to `AString::AString(char const*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x8cb):application.cpp: undefined reference to `g_oVarTable'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x8da):application.cpp: undefined reference to `VariableTable::GetRef(AString, Variant**, bool&, int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x95e):application.cpp: undefined reference to `g_oCmdLine'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x98e):application.cpp: undefined reference to `Variant::ArraySubscriptClear()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x9a4):application.cpp: undefined reference to `Variant::ArraySubscriptSetNext(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x9b2):application.cpp: undefined reference to `Variant::ArrayDim()'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x9c0):application.cpp: undefined reference to `Variant::ArraySubscriptClear()'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x9d6):application.cpp: undefined reference to `Variant::ArraySubscriptSetNext(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x9ec):application.cpp: undefined reference to `Variant::ArrayGetRef(bool)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xa08):application.cpp: undefined reference to `Variant::operator=(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xa20):application.cpp: undefined reference to `Variant::~Variant()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xa36):application.cpp: undefined reference to `g_oCmdLine'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xa45):application.cpp: undefined reference to `CmdLine::GetNextParam(char*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xa9c):application.cpp: undefined reference to `g_oCmdLine'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xaa1):application.cpp: undefined reference to `CmdLine::GetNextParam(char*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xab9):application.cpp: undefined reference to `AString::operator=(char const*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xac7):application.cpp: undefined reference to `Variant::ArraySubscriptClear()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xadd):application.cpp: undefined reference to `Variant::ArraySubscriptSetNext(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xaeb):application.cpp: undefined reference to `Variant::ArrayDim()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xaf9):application.cpp: undefined reference to `Variant::ArraySubscriptClear()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xb0f):application.cpp: undefined reference to `Variant::ArraySubscriptSetNext(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xb25):application.cpp: undefined reference to `Variant::ArrayGetRef(bool)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xb41):application.cpp: undefined reference to `Variant::operator=(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xb59):application.cpp: undefined reference to `Variant::~Variant()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xb8c):application.cpp: undefined reference to `g_bStdOut'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xba8):application.cpp: undefined reference to `Variant::ArraySubscriptClear()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xbbe):application.cpp: undefined reference to `Variant::ArraySubscriptSetNext(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xbcc):application.cpp: undefined reference to `Variant::ArrayDim()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xbda):application.cpp: undefined reference to `Variant::ArraySubscriptClear()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xbf0):application.cpp: undefined reference to `Variant::ArraySubscriptSetNext(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xc06):application.cpp: undefined reference to `Variant::ArrayGetRef(bool)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xc22):application.cpp: undefined reference to `Variant::operator=(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xc3a):application.cpp: undefined reference to `Variant::~Variant()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xc58):application.cpp: undefined reference to `g_oCmdLine'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xc67):application.cpp: undefined reference to `CmdLine::GetNextParam(char*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xc97):application.cpp: undefined reference to `Variant::ArraySubscriptClear()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xcaf):application.cpp: undefined reference to `Variant::ArraySubscriptSetNext(int)'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xcbd):application.cpp: undefined reference to `Variant::ArrayDim()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xccb):application.cpp: undefined reference to `Variant::ArraySubscriptClear()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xce1):application.cpp: undefined reference to `Variant::ArraySubscriptSetNext(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xcf7):application.cpp: undefined reference to `Variant::ArrayGetRef(bool)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xd16):application.cpp: undefined reference to `Variant::operator=(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xd31):application.cpp: undefined reference to `g_oCmdLine'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xd40):application.cpp: undefined reference to `CmdLine::GetNextParam(char*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xd62):application.cpp: undefined reference to `Variant::ArraySubscriptClear()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xd7a):application.cpp: undefined reference to `Variant::ArraySubscriptSetNext(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xd90):application.cpp: undefined reference to `Variant::ArrayGetRef(bool)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xdae):application.cpp: undefined reference to `Variant::operator=(char const*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xdd7):application.cpp: undefined reference to `Variant::~Variant()'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xe13):application.cpp: undefined reference to `Variant::~Variant()'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xe53):application.cpp: undefined reference to `g_oApplication'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xe6b):application.cpp: undefined reference to `g_hWnd'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xe73):application.cpp: undefined reference to `g_hWnd'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xfc2):application.cpp: undefined reference to `g_bTrayExitClicked'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0xfc9):application.cpp: undefined reference to `g_bKillWorkerThreads'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1017):application.cpp: undefined reference to `g_hWndEdit'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1062):application.cpp: undefined reference to `g_hWndEdit'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x10b2):application.cpp: undefined reference to `g_bScriptPaused'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x10ba):application.cpp: undefined reference to `g_HotKeyNext'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x10c6):application.cpp: undefined reference to `g_HotKeyQueue'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x10cc):application.cpp: undefined reference to `g_HotKeyNext'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x10d2):application.cpp: undefined reference to `g_HotKeyNext'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x10db):application.cpp: undefined reference to `g_HotKeyNext'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x10f3):application.cpp: undefined reference to `g_bTrayIcon'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x115e):application.cpp: undefined reference to `g_bTrayIcon'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1186):application.cpp: undefined reference to `g_bScriptPaused'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1277):application.cpp: undefined reference to `g_bTrayExitClicked'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1287):application.cpp: undefined reference to `g_bScriptPaused'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x12c5):application.cpp: undefined reference to `g_bTrayIcon'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x12d2):application.cpp: undefined reference to `g_bTrayIcon'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x12df):application.cpp: undefined reference to `g_hWnd'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1388):application.cpp: undefined reference to `AString::AString(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x138e):application.cpp: undefined reference to `g_bTrayIcon'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x13b0):application.cpp: undefined reference to `g_hWnd'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x13c8):application.cpp: undefined reference to `g_bScriptPaused'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x13ec):application.cpp: undefined reference to `g_hInstance'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x142c):application.cpp: undefined reference to `AString::operator=(char const*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1432):application.cpp: undefined reference to `g_bTrayIconDebug'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x144b):application.cpp: undefined reference to `AString::operator+=(char const*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1466):application.cpp: undefined reference to `AString::operator+=(char const*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1472):application.cpp: undefined reference to `g_oScript'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x148e):application.cpp: undefined reference to `g_oScriptFile'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x149d):application.cpp: undefined reference to `AutoIt_ScriptFile::GetLine(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x14b6):application.cpp: undefined reference to `g_oScriptFile'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x14bb):application.cpp: undefined reference to `AutoIt_ScriptFile::GetIncludeID(int)'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x14c6):application.cpp: undefined reference to `g_oScriptFile'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x14cb):application.cpp: undefined reference to `AutoIt_ScriptFile::GetIncludeFileName(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x14dd):application.cpp: undefined reference to `AString::operator+=(char const*)'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x14ee):application.cpp: undefined reference to `g_oScriptFile'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x14f3):application.cpp: undefined reference to `AutoIt_ScriptFile::GetAutLineNumber(int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1525):application.cpp: undefined reference to `AString::operator+=(char const*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1536):application.cpp: undefined reference to `g_oScriptFile'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x153b):application.cpp: undefined reference to `AutoIt_ScriptFile::GetLine(int)'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x154d):application.cpp: undefined reference to `AString::operator+=(char const*)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x157f):application.cpp: undefined reference to `Util_Strncpy(char*, char const*, int)'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x162c):application.cpp: undefined reference to `g_bTrayIcon'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1637):application.cpp: undefined reference to `g_bTrayIcon'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x1644):application.cpp: undefined reference to `g_hWnd'

C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x168f):application.cpp: undefined reference to `g_bBreakEnabled'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x169d):application.cpp: undefined reference to `g_bScriptPaused'
C:\DOCUME~1\joe\LOCALS~1\Temp/ccUnbaaa.o(.text+0x16ab):application.cpp: undefined reference to `g_hInstance'
C:\Dev-Cpp\lib/libmingw32.a(main.o)(.text+0x106):main.c: undefined reference to `WinMain@16'

collect2: ld returned 1 exit status

Execution terminated
Link to comment
Share on other sites

Thank you cppman, I was able to compile the autoit source now,

but I have another question. Lets say I just want to use one function from the autoit source. Like, for example, Asc()

///////////////////////////////////////////////////////////////////////////////
// Asc()
///////////////////////////////////////////////////////////////////////////////

AUT_RESULT AutoIt_Script::F_Asc(VectorVariant &vParams, Variant &vResult)
{
    vResult = int(uchar(vParams[0].szValue()[0]));
    return AUT_OK;

} // Asc()

In other words, how would I compile only one C++ file (I am using script_math.cpp in the example above)

I have these errors:

'_MAX_PATH' was not declared in this scope
implicit declaration of function 'int atof(...)'
implicit declaration of function 'int_atoi64(...)'
implicit declaration of function 'int atoi(...)'
Link to comment
Share on other sites

You can't really pull any of the AutoIt functions out of AutoIt and use them somewhere else unless you're also using some of AutoIt's types or you're willing to re-write the function to take native C++ types. You also can't compile most of the source files stand-alone because once again things depend on other things you aren't including as part of the compilation unit. The AutoIt source can be useful to use for reference, but it's not really something that can be easily adapted to other purposes.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...