Building Program in Windows XP


#1

Grettings!!!
I am trying to compile an app under windows using juce, in which i am getting the following errors:

Here is the log:

Compiler: Default compiler
Building Makefile: “C:\holamundo\Makefile.win"
Executing make…
make.exe -f “C:\holamundo\Makefile.win” all
g++.exe -c Main.cpp -o Main.o -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" -fexceptions -fexpensive-optimizations -O3

g++.exe Main.o -o “Project2.exe” -L"C:/Dev-Cpp/lib" -mwindows …/juce/bin/libjuce.a -s

…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x1b53):juce_win32_Windowing.cpp: undefined reference to DoDragDrop@16' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x1e98):juce_win32_Windowing.cpp: undefined reference toIID_IOleWindow’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x1ea5):juce_win32_Windowing.cpp: undefined reference to IID_IOleWindow' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x1eab):juce_win32_Windowing.cpp: undefined reference toIID_IOleWindow’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x1eb4):juce_win32_Windowing.cpp: undefined reference to IID_IOleWindow' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x1fc5):juce_win32_Windowing.cpp: undefined reference toIID_IOleWindow’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x1fcb):juce_win32_Windowing.cpp: more undefined references to IID_IOleWindow' follow ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x279f):juce_win32_Windowing.cpp: undefined reference toIID_IOleObject’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x27c8):juce_win32_Windowing.cpp: undefined reference to OleCreate@28' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x28f2):juce_win32_Windowing.cpp: undefined reference toOleSetContainedObject@8’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x29bb):juce_win32_Windowing.cpp: undefined reference to IID_IOleWindow' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x29c3):juce_win32_Windowing.cpp: undefined reference toIID_IOleWindow’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x29c9):juce_win32_Windowing.cpp: undefined reference to IID_IOleWindow' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x29ce):juce_win32_Windowing.cpp: undefined reference toIID_IOleWindow’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x2aa1):juce_win32_Windowing.cpp: undefined reference to IID_IOleWindow' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text+0x2aa9):juce_win32_Windowing.cpp: more undefined references toIID_IOleWindow’ follow
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18Win32ComponentPeer18handlePaintMessageEv[juce::Win32ComponentPeer::handlePaintMessage()]+0xc50):juce_win32_Windowing.cpp: undefined reference to DrawDibOpen@0' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18Win32ComponentPeer18handlePaintMessageEv[juce::Win32ComponentPeer::handlePaintMessage()]+0xe47):juce_win32_Windowing.cpp: undefined reference toDrawDibDraw@52’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce14JuceDropSource14QueryInterfaceERK5_GUIDPPv+0x21):juce_win32_Windowing.cpp: undefined reference to IID_IUnknown' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce14JuceDropSource14QueryInterfaceERK5_GUIDPPv+0x2d):juce_win32_Windowing.cpp: undefined reference toIID_IDropSource’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce17JuceEnumFormatEtc14QueryInterfaceERK5_GUIDPPv+0x21):juce_win32_Windowing.cpp: undefined reference to IID_IUnknown' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce17JuceEnumFormatEtc14QueryInterfaceERK5_GUIDPPv+0x2d):juce_win32_Windowing.cpp: undefined reference toIID_IEnumFORMATETC’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce17JuceEnumFormatEtc4NextEmP12tagFORMATETCPm+0xd7):juce_win32_Windowing.cpp: undefined reference to CoTaskMemAlloc@4' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce14JuceDataObject14QueryInterfaceERK5_GUIDPPv+0x21):juce_win32_Windowing.cpp: undefined reference toIID_IUnknown’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce14JuceDataObject14QueryInterfaceERK5_GUIDPPv+0x2d):juce_win32_Windowing.cpp: undefined reference to IID_IDataObject' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce12JuceIStorage14QueryInterfaceERK5_GUIDPPv+0x21):juce_win32_Windowing.cpp: undefined reference toIID_IUnknown’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce12JuceIStorage14QueryInterfaceERK5_GUIDPPv+0x2d):juce_win32_Windowing.cpp: undefined reference to IID_IStorage' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce19JuceOleInPlaceFrame14QueryInterfaceERK5_GUIDPPv+0x21):juce_win32_Windowing.cpp: undefined reference toIID_IUnknown’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce19JuceOleInPlaceFrame14QueryInterfaceERK5_GUIDPPv+0x2d):juce_win32_Windowing.cpp: undefined reference to IID_IOleInPlaceFrame' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce19JuceIOleInPlaceSite14QueryInterfaceERK5_GUIDPPv+0x21):juce_win32_Windowing.cpp: undefined reference toIID_IUnknown’

…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce19JuceIOleInPlaceSite14QueryInterfaceERK5_GUIDPPv+0x2d):juce_win32_Windowing.cpp: undefined reference to IID_IOleInPlaceSite' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18JuceIOleClientSite14QueryInterfaceERK5_GUIDPPv+0x1c):juce_win32_Windowing.cpp: undefined reference toIID_IUnknown’

…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18JuceIOleClientSite14QueryInterfaceERK5_GUIDPPv+0x2c):juce_win32_Windowing.cpp: undefined reference to IID_IOleClientSite' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18JuceIOleClientSite14QueryInterfaceERK5_GUIDPPv+0x3d):juce_win32_Windowing.cpp: undefined reference toIID_IOleInPlaceSite’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18ActiveXControlData20componentPeerChangedEv[juce::ActiveXControlData::componentPeerChanged()]+0x22):juce_win32_Windowing.cpp: undefined reference to IID_IOleWindow' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18ActiveXControlData20componentPeerChangedEv[juce::ActiveXControlData::componentPeerChanged()]+0x32):juce_win32_Windowing.cpp: undefined reference toIID_IOleWindow’

…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18ActiveXControlData20componentPeerChangedEv[juce::ActiveXControlData::componentPeerChanged()]+0x37):juce_win32_Windowing.cpp: undefined reference to IID_IOleWindow' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18ActiveXControlData20componentPeerChangedEv[juce::ActiveXControlData::componentPeerChanged()]+0x40):juce_win32_Windowing.cpp: undefined reference toIID_IOleWindow’
…/juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18ActiveXControlData23componentMovedOrResizedEbb[juce::ActiveXControlData::componentMovedOrResized(bool, bool)]+0xd6):juce_win32_Windowing.cpp: undefined reference to IID_IOleWindow' ../juce/bin/libjuce.a(juce_win32_Windowing.o)(.text$_ZN4juce18ActiveXControlData23componentMovedOrResizedEbb[juce::ActiveXControlData::componentMovedOrResized(bool, bool)]+0xdc):juce_win32_Windowing.cpp: more undefined references toIID_IOleWindow’ follow
…/juce/bin/libjuce.a(juce_win32_Messaging.o)(.text+0x4ff):juce_win32_Messaging.cpp: undefined reference to OleInitialize@4' ../juce/bin/libjuce.a(juce_win32_Messaging.o)(.text+0x76b):juce_win32_Messaging.cpp: undefined reference toOleUninitialize@0’
…/juce/bin/libjuce.a(juce_win32_SystemStats.o)(.text+0x5d4):juce_win32_SystemStats.cpp: undefined reference to `timeBeginPeriod@4’
collect2: ld returned 1 exit status

make.exe: *** [Project2.exe] Error 1

Execution terminated

So in order to see if i was doing something wrong i did compile the typical “Hellow World” example and it gave me the
same error, I did so if i was wrong. Although, i did compile the demo and surprise it did compile just fine indeed,
but the jucer didn`t compile at all. (i did also try with the 1.39v which i compiled several times but getting the same results)
Actually, i am using the 1.40v juce, along with the Dev C++ 4.9.9.2, gcc version 3.4.2.
In fact, all this app that i have done, i compiled under linux and it works just fine.
Please, i would appreciate any help you could give me.


#2

First of all, DevC++ is horribly borked, get rid of it and get something decent (The two best free alts for windows are mingw if you just want a compiler, or VC2k5Ex for IDE+compiler).

Second, looks like you are missing some windows header files, specifically OLE automation I would guess, might go with the DevC++ being borked part…


#3

Hi Rurbina,

I just had the very same problem a couple of days ago, I think you need to include the following libraries to your project as well as libjuce:

libwininet.a
libdsound.a
libole32.a
libwinmm.a
libgdi32.a
libuuid.a
libshell32.a
libvfw32.a
librpcrt4.a

That should work (I hope!)

Sam


#4