Jeg får følgende fejl med MingW Compiler i Dev-C++.
Compiler: Default compiler
Building Makefile: "C:\\Private\\projekter\\calculator\\source\\dev-cpp\\Makefile.win"
Executing make...
make.exe -f "C:\\Private\\projekter\\calculator\\source\\dev-cpp\\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++/3.3.1" -I"C:/Dev-Cpp/include/c++/3.3.1/mingw32" -I"C:/Dev-Cpp/include/c++/3.3.1/backward" -I"C:/Dev-Cpp/lib/gcc-lib/mingw32/3.3.1/include" -I"C:/Dev-Cpp/include"
g++.exe main.o math.o -o "calculator.exe" -L"C:/Dev-Cpp/lib"
math.o(.text+0x100):math.cpp: multiple definition of `Plus()'
main.o(.text+0x100):main.cpp: first defined here
math.o(.text+0x188):math.cpp: multiple definition of `Minus()'
main.o(.text+0x188):main.cpp: first defined here
math.o(.text+0x210):math.cpp: multiple definition of `Dividere()'
main.o(.text+0x210):main.cpp: first defined here
math.o(.text+0x298):math.cpp: multiple definition of `Gange()'
main.o(.text+0x298):main.cpp: first defined here
math.o(.text+0x320):math.cpp: multiple definition of `ArealCirkel()'
main.o(.text+0x320):main.cpp: first defined here
math.o(.text+0x36a):math.cpp: multiple definition of `ArealRektangel()'
main.o(.text+0x36a):main.cpp: first defined here
math.o(.text+0x3d2):math.cpp: multiple definition of `ArealTrekant()'
main.o(.text+0x3d2):main.cpp: first defined here
math.o(.text+0x442):math.cpp: multiple definition of `ArealTrapez()'
main.o(.text+0x442):main.cpp: first defined here
math.o(.text+0x4dc):math.cpp: multiple definition of `RumfangPrisme()'
main.o(.text+0x4dc):main.cpp: first defined here
math.o(.text+0x526):math.cpp: multiple definition of `RumfangCylinder()'
main.o(.text+0x526):main.cpp: first defined here
math.o(.text+0x570):math.cpp: multiple definition of `RumfangKegle()'
main.o(.text+0x570):main.cpp: first defined here
math.o(.text+0x5c2):math.cpp: multiple definition of `RumfangKegleStub()'
main.o(.text+0x5c2):main.cpp: first defined here
math.o(.text+0x676):math.cpp: multiple definition of `RumfangPyramide()'
main.o(.text+0x676):main.cpp: first defined here
math.o(.text+0x6c8):math.cpp: multiple definition of `RumfangPyramideStub()'
main.o(.text+0x6c8):main.cpp: first defined here
math.o(.text+0x75e):math.cpp: multiple definition of `RumfangKugle()'
main.o(.text+0x75e):main.cpp: first defined here
math.o(.text+0x7ba):math.cpp: multiple definition of `Hastighed()'
main.o(.text+0x7ba):main.cpp: first defined here
math.o(.text+0x822):math.cpp: multiple definition of `Kvadratrod()'
main.o(.text+0x822):main.cpp: first defined here
math.o(.text+0x878):math.cpp: multiple definition of `DiameterTilRadius()'
main.o(.text+0x878):main.cpp: first defined here
math.o(.text+0x8ce):math.cpp: multiple definition of `RadiusTilDiameter()'
main.o(.text+0x8ce):main.cpp: first defined here
math.o(.text+0x91e):math.cpp: multiple definition of `HastighedTilTid()'
main.o(.text+0x91e):main.cpp: first defined here
math.o(.text+0x950):math.cpp: multiple definition of `Massefylde()'
main.o(.text+0x950):main.cpp: first defined here
math.o(.text+0x98e):math.cpp: multiple definition of `Procent()'
main.o(.text+0x98e):main.cpp: first defined here
math.o(.text+0x9d4):math.cpp: multiple definition of `Hjaelp()'
main.o(.text+0x9d4):main.cpp: first defined here
math.o(.text+0xa10):math.cpp: multiple definition of `Om()'
main.o(.text+0xa10):main.cpp: first defined here
math.o(.text+0xa8c):math.cpp: multiple definition of `OhmsLov()'
main.o(.text+0xa8c):main.cpp: first defined here
math.o(.text+0xe20):math.cpp: multiple definition of `Effekt()'
main.o(.text+0xe20):main.cpp: first defined here
math.o(.text+0xd90):math.cpp: multiple definition of `Modstand()'
main.o(.text+0xd90):main.cpp: first defined here
math.o(.text+0xd00):math.cpp: multiple definition of `Spaending()'
main.o(.text+0xd00):main.cpp: first defined here
math.o(.text+0xc70):math.cpp: multiple definition of `StroemStyrke()'
main.o(.text+0xc70):main.cpp: first defined here
math.o(.bss+0x0):math.cpp: multiple definition of `sum'
main.o(.bss+0x0):main.cpp: first defined here
math.o(.bss+0x8):math.cpp: multiple definition of `areal'
main.o(.bss+0x8):main.cpp: first defined here
math.o(.bss+0x10):math.cpp: multiple definition of `volumen'
main.o(.bss+0x10):main.cpp: first defined here
math.o(.bss+0x18):math.cpp: multiple definition of `hastighed'
main.o(.bss+0x18):main.cpp: first defined here
math.o(.bss+0x20):math.cpp: multiple definition of `kvadratrod'
main.o(.bss+0x20):main.cpp: first defined here
math.o(.bss+0x28):math.cpp: multiple definition of `radius'
main.o(.bss+0x28):main.cpp: first defined here
math.o(.bss+0x30):math.cpp: multiple definition of `R'
main.o(.bss+0x30):main.cpp: first defined here
math.o(.bss+0x38):math.cpp: multiple definition of `U'
main.o(.bss+0x38):main.cpp: first defined here
math.o(.bss+0x40):math.cpp: multiple definition of `I'
main.o(.bss+0x40):main.cpp: first defined here
math.o(.bss+0x48):math.cpp: multiple definition of `P'
main.o(.bss+0x48):main.cpp: first defined here
math.o(.bss+0x50):math.cpp: multiple definition of `pctsum'
main.o(.bss+0x50):main.cpp: first defined here
collect2: ld returned 1 exit status
make.exe: *** [calculator.exe] Error 1
Execution terminated
Nogen som måske har et hint til hvor fejlen kan findes?
source koderne ligger her:
Main.cpp
http://www.jaj.hj.dyndns.dk/tmp/main.cpp.txtMath.cpp
http://www.jaj.hj.dyndns.dk/tmp/math.cpp.txtMath.h
http://www.jaj.hj.dyndns.dk/tmp/math.h.txtPå forhånd tak.
Mvh. Jan Arni Jacobsen