From: Andrew S. <ac...@sy...> - 2003-01-08 18:16:00
|
> -----Original Message----- > From: min...@li... > [mailto:min...@li...]On Behalf Of Ralph > Nichols > Sent: January 8, 2003 13:01 > To: min...@li... > Subject: [Mingw-users] undefined reference to 'InitCommonControlsEx@4' > > <snipped> > > testlist.exe: testlist.cpp > g++ -s -mwindows -lcomctl32 -D_WIN32_IE=0x0401 testlist.cpp > -o testlist.exe > The order in which objects are listed on the command line is relevant. In this instance, your testlist.cpp requires some objects specified by libcomctl32.a, therefore, the -lcomctl32 *must* follow testlist.cpp. e.g. g++ -s -mwindows -D_WIN32_IE=0x0401 -o testlist.exe testlist.cpp -lcomctl32 As a general rule, you should always list the libraries last. In cases where your libraries depend on other libraries, the same still holds true. <snipped> > > Thanks for any answers! > In the future, please do a search of the archives first. Virtually the same question was asked by Nuno Sousa (and answered by Max Bowsher) on Jan 4th. |